get a specif number value. - 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: get a specif number value. (
/showthread.php?tid=497913)
get a specif number value. -
audriuxxx - 01.03.2014
Hi,
I show player dialog, and i need that player input numbers. Ok i check IsNumeric there, but + i need to check is the 3 first numbers, for ex: player input:
58987412354
And i need to check is this three numbers in start:
589
5 i need that player write here a 7.
8 i need that player write here a 5.
9 i need that player write here a 1.
Re: get a specif number value. -
LocMax - 01.03.2014
Limit the numbers to 3 so player can only input 3 numbers, not more or less.
Then you can easily detect those 3 numbers because inputtext will equal the 3 numbers.
if(strlen(inputtext) > 3 || strlen(inputtext) < 3) return SendClientMessage(playerid, 0xFF0000AA, "You need to input 3 numbers.");