Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(IsPlayerInZone(playerid, zoneid) && GetPlayersInZoneOfFaction(zoneid, PlayerInfo[playerid][pFactionID]) <= CAPTUREAMMOUNT && ZoneInfo[zoneid][Capturers] == 0) // not enough captuers so the team stops capturing
- {
- new Membersneededtocapture = GetPlayersInZoneOfFaction(zoneid, PlayerInfo[playerid][pFactionID]);
- format(String, sizeof(String), "Your faction is attempting to capture %s you need %d more players to start the capture", playerid,ZoneInfo[zoneid][ZoneName],Membersneededtocapture);
- SendClientMessageToAll(Msg,String);
- continue;
- }
- stock GetPlayersInZoneOfFaction(zoneid, factionid)
- {
- new count;
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && PlayerInfo[i][pFactionID] == factionid && IsPlayerInZone(i, zoneid) && !IsPlayerInAnyVehicle(i))
- {
- count++;
- }
- }
- return count;
- }
Add Comment
Please, Sign In to add comment