26.02.2015, 17:59
Do you think this would be the issue we only not long ago added this and am unsure if this can be it.
Код:
CMD:backup(playerid, params[]) { if (GetFactionType(playerid) != FACTION_POLICE) return SendErrorMessage(playerid, "You are not a police officer."); if (Backup[playerid] != 1) { static Float:fX, Float:fY, Float:fZ; GetPlayerPos(playerid, fX, fY, fZ); SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s requests backup over their radio.", ReturnName(playerid, 0)); SendFactionMessage(PlayerData[playerid][pFaction], COLOR_RADIO, "RADIO: %s is requesting immediate backup at %s.", ReturnName(playerid, 0), GetLocation(fX, fY, fZ)); Backup[playerid] = 1; foreach(Player, i) { if (GetFactionType(i) == FACTION_POLICE) { SetPlayerMarkerForPlayer(playerid, i, 0x2641FEAA); } } SendClientMessageEx(playerid, COLOR_WHITE, "Type /nobackup to clear your backup request."); SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1); } return 1; } forward BackupClear(playerid, calledbytimer); public BackupClear(playerid, calledbytimer) { if(IsPlayerConnected(playerid)) { if (GetFactionType(playerid) != FACTION_POLICE) return SendErrorMessage(playerid, "You are not a police officer."); { if (Backup[playerid] == 1) { foreach(Player, i) { if (GetFactionType(i) == FACTION_POLICE) { SetPlayerMarkerForPlayer(playerid, i, 0x2641FEAA); } } if (calledbytimer != 1) { SendClientMessageEx(playerid, COLOR_GRAD2, "Your backup request has been cleared."); } else { SendClientMessageEx(playerid, COLOR_GRAD2, "Your backup request has been cleared automatically."); } Backup[playerid] = 0; } else { if (calledbytimer != 1) { SendClientMessageEx(playerid, COLOR_GRAD2, "You don't have an active backup request!"); } } } } return 1; }