Unknown Command Help.
#1

I've got a basic RP gamemode, i started to add some features on it, but when i write an unknown command, nothing appears, can someone help me to set it giving a text like : Server:Unknown Command, use /help for commands...
Reply
#2

add /help command in your script
Put a dialog or SendClientMessage
or whatever command u need for /help
hope i helped you
Reply
#3

Do you use y_commands, OnPlayerCommandText, zcmd or what?
For OnPlayerCommandText, you can add a SendClientMessage after all your commands, like:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/mycommand", true))
    {
        SendClientMessage(playerid, -1, "This is a command.");
        return 1;
    }
    SendClientMessage(playerid, -1, "You have not entered a command.");
    return 1;
}
For zcmd, you can simply use OnPlayerCommandPerformed.
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, -1, "You have not entered a command.");
    return 1;
}
Reply
#4

You didn't understood me, when someone write an unknown command like :/testblahblah, i want a text appears for him like : This is unknown command...
you know.

+REP if you help me
Reply
#5

Thank's ClavinC, i'll try it but i got some problems while compiling,,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)