18.01.2018, 22:32
Quote:
Код:
if(muted[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "SERVER: You are muted"); |
Код:
new muted[MAX_PLAYERS]; public OnPlayerText(playerid, text[]) { if(muted[playerid] == 1) return SendClientMessage(playerid, COLOR_ORANGE, "SERVER: You are muted"); return 0; } CMD:mute(playerid, params[]) { if(eUser[playerid][e_USER_ADMIN_LEVEL] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are not a administrator!"); if(eUser[playerid][e_USER_ADMIN_LEVEL] >= 1) { new string[128], id, reason[128]; if(muted[id]) { muted[id] = 1; if(sscanf(params, "uS[128]", id, reason)) return SendClientMessage(playerid, COLOR_ERROR, "USAGE: /mute [playerid] [reason]"); format(string, sizeof(string), "SERVER: %s has been muted by an admin (Reason: %s)", pName(id), reason); SendClientMessageToAll(COLOR_ORANGE, string); } } return 1; }