16.02.2012, 14:29
I am using y_commands, how would I go about changing the "SERVER: Unknown Command" text to something else, of my choice?
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
if( !success )
{
format( cmdtext, 128, "Your message!" );
SendClientMessage( playerid, -1, cmdtext );
}
return true;
}
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
if( !success ) return false;
return true;
}
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
//if( !success ) return false;
SendClientMessage(playerid, -1, "test");
return true;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, 0xFA5486FA, "Your wrong-command text here!" );
return 1;
}
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;
}