ZCMD Problems
#1

I decided to use in my GameMode ZCMD commands, but I can not use the other old commands, only ZCMD other commands generate the message. "Server: Unknow Command"

What's wrong?
Reply
#2

ZCMD isn't natively compatible with "OnPlayerCommandText". I think there's a way around it, but I'm not sure how to do it myself. Either switch your commands to ZCMD or use "OnPlayerCommandText", sorry bro.
Reply
#3

Okay, i'll change my commands to dcmd cuz it works

Thank you man.
Reply
#4

There's a special callback written for zcmd (in zcmd), it's called OnPlayerCommandReceived. Try move your commands to that.
Reply
#5

Solution is simple.

Change OnPlayerCommandText to some random name (I have ProcessOldCommand). then add ZCMD callbacks to your model:

pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    return 1;
}

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) success = ProcessOldCommand(playerid,cmdtext);
    return success;
}
Now add your ZCMD commands and don't mind other commands. You don't even need to delete old commands since ZCMD will have priority anyway.
Reply
#6

@Sergei

it works !!


Thank You Very Much !!

Edit:

it's possible with ZCMD?

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys == 128 ))
{
OnPlayerCommandText(playerid, "/engine");
}
}

this command is not in OnPlayerCommandText and is in CMD:engine...

is possible make it with ZCMD?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)