zcmd how to return an error msg (+REP) [quick]
#1

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

http://forum.sa-mp.com/showpost.php?...02&postcount=9
Reply
#3

You mean when a player typed /heafasnfjnfasf (An unknown command) they will receive a message that command does not exist?
Reply
#4

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


Forum Jump:


Users browsing this thread: 1 Guest(s)