Finding Part of Playername
#4

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
pawn Код:
stock FindName(name[])
{
  new pName[MAX_PLAYER_NAME], id = -1;
  for(new i; i < MAX_PLAYERS; i++)
  {
    if(!IsPlayerConnected(i)) continue;
    GetPlayerName(i, pName, sizeof pName);
    if(strfind(pName, name, true) != -1)
    {
      if(id != -1) id = -2;
      else id = i;
    }
  }
  return i;
}
Returns the ID of the player when found, returns -1 when the player IS NOT found and returns -2 when MORE THEN ONE player is found.

Unsure if it works though
uhhm, i dont get it... where do i put which skin is for members only? so ID 259.. where i put that?
this only seems to be to find the name...
Reply


Messages In This Thread
Finding Part of Playername - by Mike_Peterson - 11.08.2010, 08:16
Re: Finding Part of Playername - by Sascha - 11.08.2010, 08:51
Re: Finding Part of Playername - by Hiddos - 11.08.2010, 08:57
Re: Finding Part of Playername - by Mike_Peterson - 11.08.2010, 10:42
Re: Finding Part of Playername - by Mike_Peterson - 11.08.2010, 11:05
Re: Finding Part of Playername - by Mike_Peterson - 11.08.2010, 18:37
Re: Finding Part of Playername - by 0ne - 11.08.2010, 18:42
Re: Finding Part of Playername - by Mike_Peterson - 14.08.2010, 09:56

Forum Jump:


Users browsing this thread: 1 Guest(s)