Changing "Unknown Command" text y_commands
#1

I am using y_commands, how would I go about changing the "SERVER: Unknown Command" text to something else, of my choice?
Reply
#2

pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
    if( !success )
    {
        format( cmdtext, 128, "Your message!" );
        SendClientMessage( playerid, -1, cmdtext );
    }
    return true;
}
Reply
#3

I place that in, and still get the message.
Reply
#4

Weird, it should send the custom message.
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
    if( !success ) return false;
    return true;
}
That should appear the "Server: Unknown Command"
Reply
#5

Nope. I tried this too:
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
    //if( !success ) return false;
    SendClientMessage(playerid, -1, "test");
    return true;
}
So any command I type should print out "test", but it doesn't, I just get "SERVER: Unknown Command"
Reply
#6

bump
Reply
#7

pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(!success) return SendClientMessage(playerid, 0xFA5486FA, "Your wrong-command text here!" );
    return 1;
}
Reply
#8

Doesn't work.
Reply
#9

Is it a filterscript or a gamemode?
Reply
#10

PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
    if(!
success)
    {
        new 
string[70];
        
format(stringsizeof(string), "Command %s dont exits, Type /cmds for all your commands."cmdtext);//it will say /test dont exits,type /cmds for all your cmds
        
SendClientMessage(playerid,COLOR_REDstring);//color red
    
}
    return 
true;

this shout work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)