11.11.2015, 07:04
Quote:
|
here's the whole code
Code:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success)
{
SendClientMessage(playerid,COL_GREEN,"ERROR: Invalid command! Check /CMDS for the commands list");
}
format(szString, sizeof(szString), "[CMD]: %s[%d] Has Used Command: %s", PlayerName(playerid), playerid, cmdtext);
for (new a = 0; a < MAX_PLAYERS; a++) if (IsPlayerAdmin(a))
SendClientMessage(a, 0xF6BB0AA, szString);
return 1;
}
how can i fix it ? i tried to return 0 but when i did it showed the Invalid command and that white "Unkown Command" thing |
return 1 instead of 0
^^
This disables the default unknown command
and the way new YSI works is you should put your unknown command text under OnPlayerCommandReceived
because OnPlayerCommandPerformed is called after a command finishes not before


