04.01.2016, 03:18
The playerid ofcourse, SendClientMessageToAll only have 2 arguments: color and message. So remove playerid, also you can't format the string like that.
Код:
CMD:togt(playerid, params[]) { new str[128]; if (PlayerInfo[playerid][pAdmin] < 9) return SendClientMessage(playerid, COLOR_RED, "You don't have permission to use this command."); if(!t_chat) { format(str, sizeof(str), "[ADMIN]: %s [%d] has disabled talk chat.", GetName(playerid), playerid); // is this mean to be "enabled"? SendClientMessageToAll(COLOR_RED, str); t_chat = true; } else { format(str, sizeof(str), "[ADMIN]: %s [%d] has enabled talk chat.", GetName(playerid), playerid); // is this mean to be "disabled"? SendClientMessageToAll(COLOR_GREEN, str); t_chat = false; } return 1; }