11.10.2013, 14:57
Will this code work? I've scripted this but I can't test it with my self ^^
Player who will write /bk (backup) will be seen to other officers as purple marker on map? but other players won't see him?
Player who will write /bk (backup) will be seen to other officers as purple marker on map? but other players won't see him?
pawn Код:
CMD:bk(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if (!IsPlayerCop(playerid))
{
SendClientMessage(playerid, 0xFF0000AA, "You are not authorized to use this command");
}
new string[100];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), ".:DISPATCH:.: ALL UNITS! %s is requesting immediate assistance, they have been marked on the radar.", pName);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerCop(i))
{
SendClientMessage(i,0x0FFDD349,string);
SetPlayerMarkerForPlayer(i, playerid, COLOR_PURPLE);
}
}
}
return 1;
}