Can we use... - 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)
+--- Thread: Can we use... (
/showthread.php?tid=350343)
Can we use... -
aksharma97 - 12.06.2012
Hello,
I want to know the Default cmds that are like :
Код:
if (strcmp("/kill", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 0);
return 1;
}
and ZCMDs:
Код:
COMMAND:kill(playerid, params[])
{
SetPlayerHealth(playerid, 0);
return 1;
}
Can we use both in gamemodes??
Re: Can we use... -
ReneG - 12.06.2012
Don't see why not.
Re: Can we use... -
iggy1 - 12.06.2012
Yes but if you are using ZCMD you must put your strcmp commands inside "OnPlayerCommandReceived" instead of "OnPlayerCommandText".
There's no good reason to mix the two though, using ZCMD for commands only is faster and easier.
Using "OnPlayerCommandText" will break your ZCMD commands.
Re: Can we use... -
Littlehelper - 12.06.2012
Quote:
Originally Posted by iggy1
Yes but if you are using ZCMD you must put your strcmp commands inside "OnPlayerCommandReceived".
There's no good reason to mix the two though, using ZCMD for commands only is faster and easier.
|
False.
You must put your strcmp commands inside "OnPlayerCommandText".
Re: Can we use... -
iggy1 - 12.06.2012
Quote:
Originally Posted by Littlehelper[MDZ]
False.
You must put your strcmp commands inside "OnPlayerCommandText".
|
Please don't say things when you don't know what your talking about. You can't use OnPlayerCommandText with zcmd.
Quote:
Originally Posted by Zeex
Important: Since v0.3 OnPlayerCommandText cannot be used anymore (also ZCMD_NO_CALLBACK option has been removed), but there are two new callbacks instead:
|
Re: Can we use... -
Littlehelper - 12.06.2012
I've seen a tutorial somewhere on how to use ZCMD with onplayertextcommand.
Re: Can we use... -
iggy1 - 12.06.2012
Please post a link.
Re: Can we use... -
Unfriendly - 12.06.2012
There's really no sense in arguing, guys!
But here's my input:
I've used zcmd with onplayercommandtext.
Worked fine for me, however my zcmds and strcmps are very basic.
Might bug it up if you want to add a lot of fancy shit.
Re: Can we use... -
JaKe Elite - 12.06.2012
Non-sense.
You can still use strcmp OnPlayerCommandRecieved
However the best method here is to use zcmd.
i don't understand why some scripters use strcmp for making command
string comparing is old.
Quote:
Originally Posted by Littlehelper[MDZ]
False.
You must put your strcmp commands inside "OnPlayerCommandText".
|
No,
iggy's post is correct,
strcmp is not only use for OnPlayerCommandText just giving you short info
Re: Can we use... -
iggy1 - 12.06.2012
Quote:
Originally Posted by Unfriendly
There's really no sense in arguing, guys!.
|
Not arguing

i was contradicted so i just wanted to see some proof that i was wrong. I'd be fine with that.
And if you read the zcmd thread you will see that you
can't use OnPlayerCommandText with zcmd.