Advertisement
DraKiNs

[COD] GetPlayerTag SAMP

Aug 11th, 2011
470
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.61 KB | None | 0 0
  1. /*
  2.   Exemplo de Uso:
  3.  
  4.      new name[MAX_PLAYER_NAME];
  5.      GetPlayerTag(playerid, name, sizeof(name));
  6.  
  7.      Digamos que o nome do cara seja [iPs]BrunoSilva.
  8.      Retornará iPs na string 'name'
  9. */
  10.  
  11. GetPlayerTag(playerid, string[], size = MAX_PLAYER_NAME)
  12. {
  13.     GetPlayerName(playerid, string, size);
  14.     new a = strfind(string, "[", true);
  15.  
  16.     if(!a)
  17.     {
  18.         format(string, size, string[a]);
  19.         string[strfind(string, "]", true) + 1] = EOS;
  20.         if(strlen(string) == 2 || a != -1) GetPlayerName(playerid, string, size);
  21.         return string;
  22.     }
  23.     return string;
  24. }
  25.  
  26. // Criado por Bruno da Silva
  27. // www.ips-team.blogspot.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement