Taking the inputtext from a dialog and checking if it's a playerid
#3

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
And then check if the player is connected.
Код:
if(!IsNumeric(inputtext) || strlen(inputtext) > 5) return SendClientMessage(playerid, -1, "{FF0000}You entered an invalid playerid.");
new id = strval(inputtext);
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "{FF0000}You entered an invalid playerid.");
That's what I had before but when I use it won't work at all. The dialog just closes

EDIT: NVM it works!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)