Playerid Error
#2

In the function, there's no "playerid" param. That's why it isn't working.
Use an "GetIDFromName" function:

pawn Код:
stock GetIDFromName(name[])
{
    new pName[MAX_PLAYER_NAME];
    for(new i = 0; i < MAX_PLAYERS; i++){
        GetPlayerName(i, pName, MAX_PLAYER_NAME);
        if(!strcmp(name, pName, false))
            return i;
        else continue;
    }
    return -1;
}
Reply


Messages In This Thread
Playerid Error - by Anthonyx3' - 09.01.2011, 04:32
Re: Playerid Error - by Kwarde - 09.01.2011, 04:36
Re: Playerid Error - by California - 09.01.2011, 04:48
Re: Playerid Error - by Kwarde - 09.01.2011, 04:49

Forum Jump:


Users browsing this thread: 2 Guest(s)