OnPlayerText bugged - 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: OnPlayerText bugged (
/showthread.php?tid=114963)
OnPlayerText bugged -
MJ! - 21.12.2009
-
Re: OnPlayerText bugged -
Zamaroht - 21.12.2009
Judging by that code you posted you shouldn't be seeing "Val seted to 100.", since you are using wrong the strcmp function.
The if should be:
pawn Код:
if ((!strcmp("setval", text, true) && (strlen(text) == strlen("setval")))
or
pawn Код:
if ((strcmp("setval", text, true)==0 && (strlen(text) == strlen("setval")))
Since strcmp returns 0 if the strings are identical.
Re: OnPlayerText bugged -
MJ! - 21.12.2009
Yea , my fault on the forum , but in script i used if(strcmp(...,...,true) == 0)