Help needed OnPlayerText - 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: Help needed OnPlayerText (
/showthread.php?tid=76996)
Help needed OnPlayerText -
Henry11200 - 08.05.2009
I know that it can be done so:
Код:
if(!strcmp(text , "a,b,c", true))
But how can i do it so that i can writ like b, c ,a and so on.
So spaces and order diffrence.
Sorry for bad english but i hope u understand.
Re: Help needed OnPlayerText -
yom - 08.05.2009
I don't understand what you want to do, you should give a better example.
Re: Help needed OnPlayerText -
Henry11200 - 08.05.2009
There's question like:
Bla-bla-blah?
And then answers:
a)bla
b)blah
c)blabla
And correct ones are lets say a and c
But if player writes c,a or c, a (with spaces) then those would be true too.
And i really see no point of doing:
Код:
if(!strcmp(text , "a,c", true))
if(!strcmp(text , "c,a", true))
if(!strcmp(text , "a ,c", true))
if(!strcmp(text , " a,c", true))
if(!strcmp(text , "a , c", true))
if(!strcmp(text , " a, c", true))
And so...
I hope u understand now.
Re: Help needed OnPlayerText -
Henry11200 - 09.05.2009
Can i split the text[] like a/b or a/b/c and so?