08.09.2015, 18:36
When regular member without a degree (admin) I'm write name + text. .. ' Ex: Quix [0]: Hello. And when I do I set no longer appears adminu, neither name nor text.
Код:
public OnPlayerText(playerid, text[]) { if(stringContainsIP(text)) { format(strg, sizeof(strg), ""STEELBLUE"- AS - {%06x}%s(%d) "STEELBLUE"has been automatically kicked for advertising.", (GetPlayerColor(playerid) >>> 8), GetName(playerid), playerid); SendClientMessageToAll(-1, strg); SendClientMessage(playerid, -1, ""RED"ERROR: "GREY"Your message has been blocked because it contains an IP. You have been kicked for advertising."); SetTimerEx("KickPlayer", 100, false, "i", playerid); return 0; } //---------------------- // Admin Chat //---------------------- new str[128]; if(text[0] == '.' && PlayerInfo[playerid][Admin] >= 1) { format( str, sizeof(str), ""GREY"["ORANGE"AdminChat"GREY"] {%06x}%s(%d): "STEELBLUE"%s", (GetPlayerColor(playerid) >>> 8), GetName( playerid ), playerid, text[1] ); for ( new i = 0; i < MAX_PLAYERS; i++ ) { if (IsPlayerConnected(i)) { if (PlayerInfo[i][Admin] >= 1) { SendClientMessage( i, -1, str ); } } } return 0; } //------------------- // Mute System //------------------- if ( PlayerInfo[ playerid ][ Muted ] >= 1 ) { new str1[60]; format( str1, sizeof(str1), ""RED"ERROR: "GREY"You are still muted for %d seconds!", PlayerInfo[ playerid ][ Muted ] ); SendClientMessage( playerid, -1, str1 ); return 0; } //=============================================== new string[500]; switch (PlayerInfo[playerid][Admin]) { case 0: format(string, sizeof(string), "%s(%d): "WHITE"%s", GetName(playerid), playerid, text); case 1: format(string, sizeof(string), "%s "GREY"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text); case 2: format(string, sizeof(string), "%s "GREY"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text); case 3: format(string, sizeof(string), "%s "TELEPORTBLUE"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text); case 4: format(string, sizeof(string), "%s "RED"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text); } if (PlayerInfo[playerid][VIP] >= 1 && PlayerInfo[playerid][Admin] == 0) { format(string, sizeof(string), "%s "PREMIUM"[%d]: {ABBBCB}%s", GetName(playerid), playerid, text); } SendClientMessageToAll(GetPlayerColor(playerid), string); SetPlayerChatBubble(playerid, text, 0xFFFFFFFF, 35.0,7000); return 0; }