SA-MP Forums Archive
how to make command error message - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: how to make command error message (/showthread.php?tid=188195)



how to make command error message - [WSF]ThA_Devil - 06.11.2010

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!


Re: how to make command error message - RyDeR` - 06.11.2010

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);
}



Re: how to make command error message - [WSF]ThA_Devil - 06.11.2010

it dont work right good with zcmd


Re: how to make command error message - RyDeR` - 06.11.2010

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.


Re: how to make command error message - [WSF]ThA_Devil - 06.11.2010

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


Re: how to make command error message - RyDeR` - 06.11.2010

Sorry, it's a typo ^^


Re: how to make command error message - [WSF]ThA_Devil - 06.11.2010

ye.... typing is always a problem