garfield

[COD]: Contar players perto de player.

Oct 6th, 2011
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.36 KB | None | 0 0
  1. stock CountPlayersRangeForMy(pid, Float:range)
  2. {
  3.     new players = -1;
  4.     static Float:x, Float:y, Float:z;
  5.     GetPlayerPos(pid, x,y,z);
  6.     for(new i; i < MAX_PLAYERS; ++i)
  7.     {
  8.         if(i != pid)
  9.         {
  10.             if(IsPlayerInRangeOfPoint(pid, range, x,y,z))
  11.             {
  12.                 players++;
  13.             }
  14.         }
  15.     }
  16.     return players;
  17. }
  18.  
  19.  
  20. // Esta função conta quantos players estão perto deele.
  21.  
Advertisement
Add Comment
Please, Sign In to add comment