22.08.2009, 04:29
ReturnUser is a function that was made in the script you took that command from. either look for it or put this in your script outside of any callbacks and below "#include <a_samp>".
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;
}