SA-MP Forums Archive
Help - 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)
+--- Thread: Help (/showthread.php?tid=550521)



Help - BlackEvils - 13.12.2014

Hi all
Im trying to send a specific message if i use a cmd don't exist on gm.
What code i need to use?


Re: Help - ConnorHunter - 13.12.2014

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) {
        SendClientMessage(playerid, /*hex code of color*/, "Unknown command!!!!!1111"); // enter whatever you want here.
    }
    return 1;
}



Re: Help - BlackEvils - 13.12.2014

Quote:
Originally Posted by ConnorHunter
Посмотреть сообщение
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) {
        SendClientMessage(playerid, /*hex code of color*/, "Unknown command!!!!!1111"); // enter whatever you want here.
    }
    return 1;
}
C:\Users\DAVIDE\Desktop\GangSystem\gamemodes\gangs ystem.pwn(6533) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandPerformed")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.


Re: Help - Sledgehammer - 13.12.2014

Do you use zcmd?


Re: Help - HY - 13.12.2014

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/mycommand", true))
    {
        // Nothing here.
        return 1;
    }
    return SendClientMessage(playerid, -1, "{FFCC33}This command doesn't exists.");
}



Re: Help - BlackEvils - 13.12.2014

yes now it work thx