03.04.2011, 15:34
It might be the strcmp function try this one.
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))
{
return i;
}
}
}
return -1;
}