10.06.2009, 03:51
I'm trying to make this so it only shows up for factions 1 and 2, but it shows up for everyone when a cop requests backup.
Thanks in advance to anyone that can help.
Код:
if(strcmp(cmd,"/backup",true)==0 || strcmp(cmd,"/bk",true)==0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { if (PlayerInfo[playerid][pRequestingBackup] != 1) { GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "ALL UNITS: %s is requesting backup, they have been marked on your cruisers GPS (red).", sendername); PlayerInfo[playerid][pRequestingBackup] = 1; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF); SendClientMessage(i, TEAM_BLUE_COLOR, string); } } } SendClientMessage(playerid, TEAM_BLUE_COLOR, "Type /bkc to clear your backup request."); SetTimerEx("BackupClear", 200000, false, "ii", playerid, 1); } else { SendClientMessage(playerid, COLOR_GREY, "You already have an active backup request!"); } } else { SendClientMessage(playerid, COLOR_GREY, "You are not a cop!"); } } return 1; }
Thanks in advance to anyone that can help.