SA-MP Forums Archive
OnPlayerCommandPerformed - 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: OnPlayerCommandPerformed (/showthread.php?tid=513026)



OnPlayerCommandPerformed - SickAttack - 14.05.2014

Wrong callback and just a misunderstanding, sorry.


Re: OnPlayerCommandPerformed - ChuckyBabe - 14.05.2014

Why you want a "%s" you can just simply send a "wrong command lol" ? btw, here's my code in my server..

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "That {00FF00}command{FFFFFF} doesn't exist. Use /help or /newb to see the commands or seek a help.");
    return 1;
}
+rep if i help


Re: OnPlayerCommandPerformed - SickAttack - 14.05.2014

Quote:
Originally Posted by ChuckyBabe
Посмотреть сообщение
Why you want a "%s" you can just simply send a "wrong command lol" ? btw, here's my code in my server..

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) SendClientMessage(playerid, COLOR_WHITE, "That {00FF00}command{FFFFFF} doesn't exist. Use /help or /newb to see the commands or seek a help.");
    return 1;
}
+rep if i help
Did you even read my post?
That doesn't help me with anything, but thanks anyway ._.


Re: OnPlayerCommandPerformed - Scottas - 14.05.2014

So you want to send custom message, when command is longer than 31 symbol? Then try:
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if(strlen(cmdtext) > 31)
    {
        // custom message
        return 0;
    }
    return 1;
}



Re: OnPlayerCommandPerformed - SickAttack - 14.05.2014

Nevermind, it has been solved.


Re: OnPlayerCommandPerformed - Tingesport - 14.05.2014

Just a heads up, don't use strings bigger than 128, useless.. WHY YOU SHOULD NOT USE CELLS BIGGER THAN 128


Re: OnPlayerCommandPerformed - RajatPawar - 14.05.2014

Also, a side-note, AFAIK, functions more than 32 characters are not supported. (IIRC) Since ZCMD makes functions out of commands, it shouldn't probably work.