SA-MP Forums Archive
Alphanumeric data only in Input Dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Alphanumeric data only in Input Dialog (/showthread.php?tid=332073)



Alphanumeric data only in Input Dialog - aNdReSk - 07.04.2012

hello there, I have a small plate system I'm working on, and I was wondering if you could reject plates that use weird letters like:

, . ; _ -

So when player tries a plate like this:

der,p

it will give an error message


Re: Alphanumeric data only in Input Dialog - Catalyst- - 07.04.2012

pawn Код:
if(strfind(inputtext, ",") != -1||strfind(inputtext, ".") != -1||strfind(inputtext, ";") != -1||strfind(inputtext, "_") != -1||strfind(inputtext, "-") != -1)
    return SendClientMessage(playerid, 0xFF0000FF, "Enter your error message here");



Respuesta: Alphanumeric data only in Input Dialog - aNdReSk - 07.04.2012

That worked like a charm! Thanks a lot catalyst +rep