Advertisement
DraKiNs

[COD] Chat Para quem está Perto

Jun 30th, 2011
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.43 KB | None | 0 0
  1. public OnPlayerText(playerid, text[])
  2. {
  3.     #if !defined MAX_DRAW
  4.         #define MAX_DRAW 100.0 // muda a distancia aqui
  5.     #endif
  6.  
  7.     static
  8.         Float:xPos,
  9.         Float:yPos,
  10.         Float:zPos
  11.     ;
  12.     GetPlayerPos(playerid, xPos, yPos, zPos);
  13.  
  14.     for(new i; i < MAX_PLAYERS; ++i) if(IsPlayerConnected(i))
  15.     {
  16.         if(!IsPlayerInRangeOfPoint(i, MAX_DRAW, xPos, yPos, zPos)) continue;           
  17.         SendClientMessage(i, 0xFFFFFFFF, text);    
  18.     }
  19.     return false;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement