04.09.2012, 12:03
Quote:
public OnPlayerText(playerid, text[]) { new string[128]; format(string, sizeof(string), "[%d] %s",playerid,text); SendPlayerMessageToAll(playerid,string); return 0; } public OnPlayerText(playerid, text[]) { for(new i = 1; i < MAX_CHAT_LINES-1; i++) Chat[i] = Chat[i+1]; new ChatSTR[128]; GetPlayerName(playerid,ChatSTR,sizeof(ChatSTR)); format(ChatSTR,128,"[lchat]%s: %s",ChatSTR, text[0] ); Chat[MAX_CHAT_LINES-1] = ChatSTR; if(PlayerInfo[playerid][Caps] == 1) UpperToLower(text); if(ServerInfo[NoCaps] == 1) UpperToLower(text); if(ServerInfo[DisableChat] == 1) { SendClientMessage(playerid,red,"Chat has been disabled"); return 0; } if(PlayerInfo[playerid][Muted] == 1) { PlayerInfo[playerid][MuteWarnings]++; new string[128]; if(PlayerInfo[playerid][MuteWarnings] < ServerInfo[MaxMuteWarnings]) { format(string, sizeof(string),"WARNING: You are muted, if you continue to speak you will be kicked. (%d / %d)", PlayerInfo[playerid][MuteWarnings], ServerInfo[MaxMuteWarnings] ); SendClientMessage(playerid,red,string); } else { SendClientMessage(playerid,red,"You have been warned ! Now you have been kicked"); format(string, sizeof(string),"***%s (ID %d) was kicked for exceeding mute warnings", PlayerName2(playerid), playerid); SendClientMessageToAll(grey,string); SaveToFile("KickLog",string); Kick(playerid); } return 0; } |