Alphanumeric data only in Input Dialog
#1

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
Reply
#2

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");
Reply
#3

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


Forum Jump:


Users browsing this thread: 1 Guest(s)