SA-MP Forums Archive
How to... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to... (/showthread.php?tid=92454)



How to... - FreeSoul - 20.08.2009

Hello,I have two questions.

1.How can I check the lenght of the messase sent in the callback "OnPlayerText"

2.How can I check if the player sent the same message two times one after another?

Thanks!


Re: How to... - dice7 - 20.08.2009

1. strlen


Re: How to... - Joe Staff - 20.08.2009

Wiki.SA-MP.com - strlen(string[])
Create a global array (string) and use strmid or format to set that string to be the same as OnPlayerText's parameter, 'text[]'