Changing "Unknown Command" text y_commands -
jameskmonger - 16.02.2012
I am using y_commands, how would I go about changing the "SERVER: Unknown Command" text to something else, of my choice?
Re: Changing "Unknown Command" text y_commands -
Konstantinos - 16.02.2012
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
if( !success )
{
format( cmdtext, 128, "Your message!" );
SendClientMessage( playerid, -1, cmdtext );
}
return true;
}
Re: Changing "Unknown Command" text y_commands -
jameskmonger - 16.02.2012
I place that in, and still get the message.
Re: Changing "Unknown Command" text y_commands -
Konstantinos - 16.02.2012
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"
Re: Changing "Unknown Command" text y_commands -
jameskmonger - 16.02.2012
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"
Re: Changing "Unknown Command" text y_commands -
jameskmonger - 17.02.2012
bump
Re: Changing "Unknown Command" text y_commands -
Guitar - 17.02.2012
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, 0xFA5486FA, "Your wrong-command text here!" );
return 1;
}
Re: Changing "Unknown Command" text y_commands -
jameskmonger - 17.02.2012
Doesn't work.
Re: Changing "Unknown Command" text y_commands -
iPLEOMAX - 18.02.2012
Is it a filterscript or a gamemode?
Re: Changing "Unknown Command" text y_commands -
doreto - 18.02.2012
PHP код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
new string[70];
format(string, sizeof(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_RED, string);//color red
}
return true;
}
this shout work