[Ajuda] Obter o ID pelo Nick
#7

PHP код:
stock GetPlayerIdFromName(playername[])
{
  for(new 
0<= MAX_PLAYERSi++)
  {
    if(
IsPlayerConnected(i))
    {
      new 
playername2[MAX_PLAYER_NAME];
      
GetPlayerName(iplayername2sizeof(playername2));
      if(
strcmp(playername2playernametruestrlen(playername)) == 0)
      {
        return 
i;
      }
    }
  }
  return 
INVALID_PLAYER_ID;

Reply


Messages In This Thread
Obter o ID pelo Nick - by SIZET - 01.09.2018, 00:29
Re: Obter o ID pelo Nick - by Paulthaz - 01.09.2018, 00:32
Re: Obter o ID pelo Nick - by SIZET - 01.09.2018, 00:35
Re: Obter o ID pelo Nick - by Paulthaz - 01.09.2018, 00:59
Re: Obter o ID pelo Nick - by SIZET - 01.09.2018, 01:06
Re: Obter o ID pelo Nick - by InsaneBR - 01.09.2018, 01:51
Re: Obter o ID pelo Nick - by DelK - 01.09.2018, 13:27
Re: Obter o ID pelo Nick - by Paulthaz - 01.09.2018, 13:35
Re: Obter o ID pelo Nick - by Locky_ - 01.09.2018, 14:10
Re: Obter o ID pelo Nick - by SIZET - 01.09.2018, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)