06.04.2013, 04:39
Even with IsACop it is still showing the whole server...
pawn Код:
CMD:bk(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSPD Officer.");
new string[256];
foreach(Player, i)
{
if(IsACop(playerid))
{
format(string, sizeof(string), "[Police Message] %s has activated their assistance beacon, please respond immediately.", RPN(playerid));
SendClientMessage(i, COLOR_GREEN, string);
SetPlayerMarkerForPlayer(playerid, i, COLOR_BLUE);
}
}
return 1;
}
CMD:bkc(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not an LSPD Officer.");
new string[128];
foreach(Player, i)
{
if(IsACop(playerid))
{
format(string, sizeof(string), "[Police Message] %s has deactivated their assistance beacon. Code 4.", RPN(playerid));
SendClientMessage(i, COLOR_GREEN, string);
SetPlayerMarkerForPlayer(i, playerid, TEAM_HIT_COLOR);
}
}
return 1;
}