how to make command error message
#1

i have seen in others servers like this when u do wrong cmd:
'' Command s% is wrong! Please look at /cmds!''

please help me how to make that!
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    // Your commands

    new
        string[64]
    ;
    format(string, sizeof(string), "Command %s is wrong! Please look at /cmds!", cmdtext);
    return SendClientMessage(playerid, 0xFFFFFFFF, string);
}
Reply
#3

it dont work right good with zcmd
Reply
#4

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!succes)
    {
        new
            string[64]
        ;
        format(string, sizeof(string), "Command %s is wrong! Please look at /cmds!", cmdtext);
        return SendClientMessage(playerid, 0xFFFFFFFF, string);
    }
    return 1;
}
Well, I'm not experienced with zcmd, but I think this should work.
Reply
#5

pawn Код:
if(!succes)// is wrong
i just added 1 s at end...
no errors thanx!
Reply
#6

Sorry, it's a typo ^^
Reply
#7

ye.... typing is always a problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)