Guest User

Untitled

a guest
Jun 25th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.85 KB | None | 0 0
  1. if(IsPlayerInZone(playerid, zoneid) && GetPlayersInZoneOfFaction(zoneid, PlayerInfo[playerid][pFactionID]) <= CAPTUREAMMOUNT && ZoneInfo[zoneid][Capturers] == 0) // not enough captuers so the team stops capturing
  2. {
  3. new Membersneededtocapture = GetPlayersInZoneOfFaction(zoneid, PlayerInfo[playerid][pFactionID]);
  4. 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);
  5. SendClientMessageToAll(Msg,String);
  6. continue;
  7. }
  8.  
  9. stock GetPlayersInZoneOfFaction(zoneid, factionid)
  10. {
  11.     new count;
  12.     for(new i=0; i < MAX_PLAYERS; i++)
  13.     {
  14.         if(IsPlayerConnected(i) && PlayerInfo[i][pFactionID] == factionid && IsPlayerInZone(i, zoneid) && !IsPlayerInAnyVehicle(i))
  15.         {
  16.             count++;
  17.         }
  18.     }
  19.     return count;
  20. }
Add Comment
Please, Sign In to add comment