Advertisement
garfield

[COD]: Contar quantos Players em um lugar.

Apr 10th, 2012
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.35 KB | None | 0 0
  1. //              @Função: Contar quantos players estão em um lugar
  2. //              @Créditos: iSuYaNw
  3.  
  4. static stock CountPlayersInArea(Float:X, Float:Y, Float:Z)
  5. {
  6.     new playerid, Players;
  7.     for(new i; i != MAX_PLAYERS; ++i){
  8.         #emit LOAD.S.pri i
  9.         #emit STOR.S.pri playerid
  10.         Players += IsPlayerInRangeOfPoint(playerid, 10.0, X,Y,Z) ? 1 : 0;
  11.     }
  12.     return Players;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement