26.04.2018, 13:21
i want admins can also talk at /hc even they are not helpers...
here is the codes :
here is the codes :
Код:
CMD:hc(playerid, params[]) { if(PlayerInfo[playerid][pHelper] < 1) { return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command."); } if(isnull(params)) { return SendClientMessage(playerid, COLOR_GREY3, "[Usage]: /hc [helper chat]"); } if(PlayerInfo[playerid][pToggleHelper]) { return SendClientMessage(playerid, COLOR_GREY, "You can't speak in the helper chat as you have it toggled."); } foreach(new i : Player) { if(PlayerInfo[i][pHelper] > 0 && !PlayerInfo[i][pToggleHelper]) { if(strlen(params) > MAX_SPLIT_LENGTH) { SendClientMessageEx(i, COLOR_AQUA, "** %s %s: %.*s... **", GetHelperRank(playerid), GetPlayerRPName(playerid), MAX_SPLIT_LENGTH, params); SendClientMessageEx(i, COLOR_AQUA, "** %s %s: ...%s **", GetHelperRank(playerid), GetPlayerRPName(playerid), params[MAX_SPLIT_LENGTH]); } else { SendClientMessageEx(i, COLOR_AQUA, "** %s %s: %s **", GetHelperRank(playerid), GetPlayerRPName(playerid), params); } } } return 1; }