11.10.2010, 19:12
It should be like this.
pawn Код:
stock GetPlayerIDFromName(const name[])
{
new playerName[MAX_PLAYER_NAME];
for(new x = 0; x < MAX_PLAYERS; x++)
{
GetPlayerName(x, playerName, sizeof(playerName));
if(strcmp(playerName, name) == 0) return x;
}
return -1;
}