К всем командам
Код
if(strcmp(cmd, "/setmark", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp) && PlayerInfo[playerid][pMember] == 6) return SendClientMessage(playerid, COLOR_GRAD2, "Используйте: /setmark [id игрока]");
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pMember] == 6)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(playerid == giveplayerid) return SendClientMessage(playerid, COLOR_GRAD1, "Ошибка id.");
if(intertest[giveplayerid] == 1) return SendClientMessage(playerid, COLOR_GRAD1, "Невозможно определить местоположение игрока.");
if(PlayerInfo[giveplayerid][pWanted] == 0) return SendClientMessage(playerid, COLOR_GRAD1, "Этот игрок не в розыске.");
if(GetPVarInt(playerid, "GPSEnabled") == 0)
{
SetPVarInt(playerid, "GPSEnabled", 1);
GetPlayerPos(giveplayerid,xxx[playerid],yyy[playerid],zzz[playerid]);
SetPlayerMapIcon(playerid, 1, xxx[playerid],yyy[playerid],zzz[playerid], 37, 0, MAPICON_GLOBAL);
SendClientMessage(playerid,0x0099FFAA, "На GPS отмечено местонахождение преступника.");
}
else
{
SetPVarInt(playerid, "GPSEnabled", 0);
RemovePlayerMapIcon(playerid, 1);
SendClientMessage(playerid,0xFF9900AA, "Система GPS отключена.");
}
return true;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[{FF0000}Error{B4B5B7}] Неверный id.");
}
}
return true;
}
Автор: Cesare228