01.04.2016, 08:19
When a player types a cmd that dont exist it says Unknown cmd. How can i change that message?
public OnPlayerCommandPerformed(playerid, cmdtext[], success) { if (!success) { // Error message } return 1; }
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
new
string[256], output1[50], output2[50];
sscanf(cmdtext, "p< >s[50]s[50]", output1, output2);
SendClientMessage(playerid, -1, ""red"Unknown command");
GameTextForPlayer(playerid, string, 3000, 3);
}
return 1;
}
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, -1, "YOUR MESSAGE HERE");
return 1;
}