DiogoB

[Pawn] GetPlayerNameEx

Feb 6th, 2012
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.43 KB | None | 0 0
  1. GetPlaerNameEx(nome[])
  2. {
  3.     static
  4.         name[MAX_PLAYER_NAME],
  5.         Max = GetMaxPlayers(),
  6.         x;
  7.  
  8.     for(x = 0; x != Max; x++)
  9.     {
  10.         if(IsPlayerConnected(x))
  11.         {
  12.             GetPlayerName(x, name, sizeof(name));
  13.             if(strfind(name, nome, true)) //se name = nome, o player está conectado!
  14.             {
  15.                 return x;
  16.             }
  17.         }
  18.     }
  19.     return INVALID_PLAYER_ID;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment