Can we use...
#1

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??
Reply
#2

Don't see why not.
Reply
#3

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

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".
Reply
#5

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:
Reply
#6

I've seen a tutorial somewhere on how to use ZCMD with onplayertextcommand.
Reply
#7

Please post a link.
Reply
#8

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

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
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)