07.12.2014, 12:09
I'm trying to do backup command,
Now it's only for the police and I want make it for more few factions.
Can someone help me and fix the code that I give?
Please Help me.
Now it's only for the police and I want make it for more few factions.
Can someone help me and fix the code that I give?
PHP код:
CMD:backup(playerid, params[])
{
new string[128], Float:bkx, Float:bky, Float:bkz;
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(!IsACop(playerid) && !IsFBI(playerid) && !IsNG(playerid) && !IsCTU(playerid)&& !IsMedic(playerid)&& !IsFireman(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You are not a LEO.");
if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
GetPlayerPos(playerid, bkx, bky, bkz);
format(string, sizeof(string), "[Central Dispatch]: %s is requesting backup,his coordinates have been marked on the GPS.", RPN(playerid));
SendCopMessage(COLOR_RADIO, string);
foreach(Player, i)
{
if(IsACop(i))
{
SetPlayerMarkerForPlayer(i, playerid, COLOR_BACKUP);
}
}
return 1;
}