SA-MP Forums Archive
help with strcmp - 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 with strcmp (/showthread.php?tid=268481)



help with strcmp - [MKD]Max - 12.07.2011

now i want to know what the diffrent with this tow thing help me so i can do commands

what happen if was 4
if(strcmp(cmdtext,"/loc",true,4)


what happen if was 5
if(strcmp(cmdtext,"/loc",true,5)

and what this do help!


Re: help with strcmp - Jay. - 12.07.2011

5/4 is the length of the command.
for like an example:

"example" has 7 letters. so you would put 7 , I don't really care about the length as I just use this:
pawn Код:
if(strcmp(cmdtext,"/command",true) == 0)



Re: help with strcmp - [MKD]Max - 12.07.2011

thanks bro