how do i make a custom message (instead of "Unknown Command")
#1

the tittle says everything..
Reply
#2

What command processor are you using?
Reply
#3

ZCMD
Reply
#4

Here you go, I've included some explanation inside, Enjoy!

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)//callback from #include <zcmd>
{//open
    if(!success)//If the command does not exist on the server, ! = false
        return SendClientMessage(playerid, COLOR_WHITE, "Your Error Message Here.");//showing the message
    return 1;
}//close
Reply
#5

Thanks a lot!
and for not just giving me something to past but telling me how it works.
Reply
#6

OnPlayerCommandPerformed is called after a command execution. If the command does not exist returns 0, so..
pawn Код:
if(!success)
// if it returns 0, send an error message
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)