Quote:
Originally Posted by Breto
no lol , but i like to use STRCMP
|
strcmp is NOT a command processor! Just because you like to do it, shouldn't mean you sacrifice processing time! In fact it is also a longer way of creating a command!
pawn Код:
if(strcmp("/breto", cmdtext))
{
return SendClientMessage(playerid, 0xFFFFFFFF, "/breto was called"), 1;
}
Try adding that, then type /bre and it will be called, unless you add a length (and if you're picky, the case validation rule) you will encounter such bug.
So it will actually look like:
pawn Код:
if(strcmp("/breto", cmdtext, 6, false))
{
return SendClientMessage(playerid, 0xFFFFFFFF, "/breto was called"), 1;
}
When you could just do:
pawn Код:
CMD:breto(playerid, params[])
This way you have parameters worked out for you too...
Why you want to convert your ZCMD commands to a function that can't even be classed as a command processor, I don't know. It baffles me to think that you even like the strcmp way of doing things!
Anyway, I don't think there is a way to convert them, you'll have to go through them manually moving code and changing the header.