29.12.2009, 23:06
You need the returnuser function.
[quote]
[quote]
pawn Код:
ReturnUser(string[])
{
new IsNumerical=1;
new tmpstring[MAX_PLAYER_NAME];
for(new cell; cell < strlen(string); cell++) if((string[cell]<='0') || (string[cell]>='9'))IsNumerical=0;
if(IsNumerical)return strval(string);
else
{
for(new players; players < MAX_PLAYERS; players++)
{
GetPlayerName(players,tmpstring,sizeof(tmpstring));
if(strfind(tmpstring,string,true)>-1)return players;
}
}
return INVALID_PLAYER_ID;
}