ZCMD to STRCMP ?
#6

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.
Reply


Messages In This Thread
ZCMD to STRCMP ? - by -CaRRoT - 11.09.2011, 06:55
Re: ZCMD to STRCMP ? - by =WoR=Varth - 11.09.2011, 06:58
Re: ZCMD to STRCMP ? - by -CaRRoT - 11.09.2011, 07:00
Re: ZCMD to STRCMP ? - by Generation-X - 11.09.2011, 07:10
Re: ZCMD to STRCMP ? - by -CaRRoT - 11.09.2011, 07:11
Re: ZCMD to STRCMP ? - by Ash. - 11.09.2011, 07:34
Re: ZCMD to STRCMP ? - by kingchandio - 11.09.2011, 07:48
Re: ZCMD to STRCMP ? - by AeroBlast - 11.09.2011, 08:06
Re: ZCMD to STRCMP ? - by AndreT - 11.09.2011, 08:10
Re: ZCMD to STRCMP ? - by seanny - 11.09.2011, 08:30
Re: ZCMD to STRCMP ? - by Kush - 11.09.2011, 10:47
Re: ZCMD to STRCMP ? - by =WoR=G4M3Ov3r - 11.09.2011, 10:51

Forum Jump:


Users browsing this thread: 1 Guest(s)