View Full Version : zcmd how to return an error msg (+REP) [quick]

12/04/2016, 01:35 PM
I'm using ZCMD, if I want to send a message to the client when he's typing a wrong command.
I tried to change the return 0 from the onplayercommandtext to return SendClientMessage(playerid,-1,"A"); but it didn't do anything, just kept sending the message: "SERVER: Unknown command."

12/04/2016, 01:36 PM

12/04/2016, 01:37 PM
You mean when a player typed /heafasnfjnfasf (An unknown command) they will receive a message that command does not exist?

12/04/2016, 01:38 PM
Let me clear your doubts,
the thing which your doing is for STRCMP users

you are using ZCMD so follow this:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
if (!success)
SendClientMessage(playerid,COLOR_RED,"The command you entered is invalid, please use /cmds");
return 1;
} All the best! :)