OnPlayerCommandPerformed
#1

Wrong callback and just a misunderstanding, sorry.
Reply
#2

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
Reply
#3

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 ._.
Reply
#4

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;
}
Reply
#5

Nevermind, it has been solved.
Reply
#6

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)