Array manipulation
#5

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

EDIT: Yes i printed look here [15:31:34] Owner = James_Cullen
Reply


Messages In This Thread
Array manipulation ( Fixed thank you to all for the help) - by Hornet600 - 03.04.2011, 15:16
Re: Array manipulation - by iggy1 - 03.04.2011, 15:22
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:23
Re: Array manipulation - by iggy1 - 03.04.2011, 15:24
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:25
Re: Array manipulation - by iggy1 - 03.04.2011, 15:34
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:41
Re: Array manipulation - by iggy1 - 03.04.2011, 15:45
Re: Array manipulation - by Hornet600 - 03.04.2011, 15:50
Re: Array manipulation - by Miguel - 03.04.2011, 15:51

Forum Jump:


Users browsing this thread: 7 Guest(s)