Help about is string in text - 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: Help about is string in text (
/showthread.php?tid=522243)
Help about is string in text -
leo9 - 26.06.2014
guys i wanna a code wich say is any string in inputtext like isplayerinvehicle can u help pls
Re: Help about is string in text -
RedFusion - 26.06.2014
Checks if the length of the string isn't 0
pawn Код:
if(strlen(inputtext) > 0)
Checks if the length of the string is above 0
pawn Код:
if(strlen(inputtext) != 0)
Same as the first alternative
All of these alternatives work for what you want to achieve
https://sampwiki.blast.hk/wiki/Strlen
https://sampwiki.blast.hk/wiki/Control_Structures#Operators