15.08.2014, 04:50
You can do it using an input dialog, and check if the inputtext is numeric, after that you have to strval(inputtext); and finally you can perform a second check to know if the ID entered was valid or not.
I don't know who made this function, but here it is:
PHP код:
http://wiki.sa-mp.com/wiki/ShowPlayerDialog
PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 0;
}
PHP код:
IsNumeric(const string[])
{
for (new i = 0, j = strlen(string); i < j; i++)
{
if (string[i] > '9' || string[i] < '0') return 0;
}
return 1;
}