IsPlayerConnected <- Not working
#4

Quote:
Originally Posted by DrTHE
Посмотреть сообщение
pawn Код:
new pID = strval(inputtext);
Ow.. I keep on forgetting stuff like that. thanks

EDIT: 1 thing though, inputtext is a name, not an ID.


pawn Код:
stock GetPlayerID(const Name[])
{
    for(new i; i<MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
      {
        new pName[MAX_PLAYER_NAME];
        GetPlayerName(i, pName, sizeof(pName));
        if(strcmp(Name, pName, true)==0)
        {
          return i;
        }
      }
    }
    return -1;
}
Reply


Messages In This Thread
IsPlayerConnected <- Not working - by Riddy - 14.12.2012, 21:32
Re: IsPlayerConnected <- Not working - by mastermax7777 - 14.12.2012, 21:42
Re: IsPlayerConnected <- Not working - by DrTHE - 14.12.2012, 21:42
Re: IsPlayerConnected <- Not working - by Riddy - 14.12.2012, 21:48
Re: IsPlayerConnected <- Not working - by DrTHE - 15.12.2012, 11:09
Re: IsPlayerConnected <- Not working - by Konstantinos - 15.12.2012, 11:19
Re : Re: IsPlayerConnected <- Not working - by scott1 - 15.12.2012, 11:41
Re: Re : Re: IsPlayerConnected <- Not working - by Konstantinos - 15.12.2012, 11:46
Re: IsPlayerConnected <- Not working - by Riddy - 15.12.2012, 12:18

Forum Jump:


Users browsing this thread: 4 Guest(s)