Advertisement
DraKiNs

[COD] IsPlayerConnected Bits

Aug 13th, 2011
448
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.45 KB | None | 0 0
  1.  
  2. #define IsPlayerConnected(%0) _: ((Conectado [%0 / cellbits] & Bits: (1 << (%0 % cellbits))) != Bits:false)
  3.  
  4. new Bits:Conectado[(((MAX_PLAYERS) + cellbits) / cellbits)];
  5.  
  6.  
  7. OnPlayerConnected(playerid)
  8. {
  9.     return Conectado [playerid / cellbits] |= Bits: (1 << (playerid % cellbits));
  10. }
  11.  
  12. OnPlayerDisconnected(playerid)
  13. {
  14.     return Conectado[playerid / cellbits] &= Bits: ~(1 << (playerid % cellbits));
  15. }
  16.  
  17. // Por Bruno Silva
  18. // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement