01.07.2013, 18:09
i edited another /help code and now when I do /help or /pcmds (Which shows some cmds) it shows the cmds but it also shows "Unknown command" even though it works.
CODE:
pawno
CODE:
pawno
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/help", true)) { SendClientMessage(playerid, 0xCC0000AA, "BLAHBLAH"); SendClientMessage(playerid, 0xCC0000AA, "---------------------------------------------------------"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); } if(!strcmp(cmdtext, "/pcmds", true)) { SendClientMessage(playerid, 0xCC0000AA, "SERVER: List of commands for Police"); SendClientMessage(playerid, 0xCC0000AA, "---------------------------------------------------------"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "BLAHBLAH"); SendClientMessage(playerid, 0xAFAFAFAA, "TBLAHBLAH"); // Returning 1 informs the server that the command has been processed. // OnPlayerCommandText won't be called in other scripts. } return SendClientMessage(playerid,-1,"This command doesn't exist - Use /help or contact an admin"); // Returning 0 informs the server that the command hasn't been processed by this script. // OnPlayerCommandText will be called in other scripts until one returns 1. // If no scripts return 1, the 'SERVER: Unknown Command' message will be shown. }