19.07.2009, 08:53
You need to learn to use strcmp.
This is wrong:
if(strcmp("/rules", cmdtext, true, 10) == 0)
The number 10 you have in the function has to be the amount of characters the string (in this case "/rules") has. So, as you can see the number is wrong, because "/rules" has 6 characters.
You need to use:
if(strcmp("/rules", cmdtext, true, 6) == 0)
or:
if(strcmp("/rules", cmdtext, true) == 0)
strcmp in SA-MP wiki
This is wrong:
if(strcmp("/rules", cmdtext, true, 10) == 0)
The number 10 you have in the function has to be the amount of characters the string (in this case "/rules") has. So, as you can see the number is wrong, because "/rules" has 6 characters.
You need to use:
if(strcmp("/rules", cmdtext, true, 6) == 0)
or:
if(strcmp("/rules", cmdtext, true) == 0)
strcmp in SA-MP wiki