SA-MP Forums Archive
Check if player input letters - 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: Check if player input letters (/showthread.php?tid=599472)



Check if player input letters - SystemX - 26.01.2016

How to check if a player input letters instead of numbers in dialog box, Is there any function for that? or do I need to make an array then check for it?


Re: Check if player input letters - Champagne - 26.01.2016

https://sampwiki.blast.hk/wiki/OnDialogResponse

https://sampwiki.blast.hk/wiki/Format


Re: Check if player input letters - Untonyst - 26.01.2016

PHP код:
for (new strlen(inputtext) - 1!= -1i--){
    if (
inputtext[i] >= '0' && inputtext[i] <= '9'){
        
// if player inputted numbers
        
continue;
    }
    else{
        
// if player inputted not numbers
    
}