Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerText(playerid, text[]) {
- if(FaceReclama(text)) {
- Reclama(playerid, text);
- return 0;
- }
- static Text[MAX_PLAYERS][128];
- if(Text[playerid][0] != '\0' && !strcmp(text,Text[playerid],true)) return 0;
- strcat((Text[playerid][0]='\0', Text[playerid]), text, 128);
- new string[180];
- if(PlayerInfo[playerid][pMuted] == 1) {
- format(string, sizeof(string), "Nu poti vorbi deoarece ai mute. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
- SCM(playerid, COLOR_GREY, string);
- return 0;
- }
- assert(AntiFlood_Check(playerid));
- if(TalkingLive[playerid] != 255) {
- if(PlayerInfo[playerid][pLeader] == 9 || PlayerInfo[playerid][pMember] == 9) format(string, sizeof(string), "Reporter %s: %s", GetNameEx(playerid), text);
- else format(string, sizeof(string), "Jucator %s: %s", GetNameEx(playerid), text);
- OOCNews(COLOR_LIGHTGREEN, string);
- return 0;
- }
- if(Mobile[playerid] != 255) {
- new idx, tmp[180];
- tmp = strtok(text, idx);
- format(string, sizeof(string), "%s spune (telefon): %s", GetNameEx(playerid), text);
- ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- if(IsPlayerConnected(Mobile[playerid])) {
- if(Mobile[Mobile[playerid]] == playerid) {
- if(PlayerInfo[Mobile[playerid]][pSpeaker] == 1) ProxDetector(20.0, Mobile[playerid], string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- else SCM(Mobile[playerid], COLOR_YELLOW,string);
- }
- }
- InsertLog(playerid, string, LOG_CHAT);
- return 0;
- }
- if(realchat) {
- if(IsPlayerLogged[playerid] == 0) return 0;
- if(TutorialActive[playerid] == 1) return 0;
- if(InGame[playerid] == 1) {
- new name[36];
- if(Team[playerid] == 1) name = "{FFA1A1}(Terrorist){FFFFFF}";
- else name ="{75AFFF}(Counter-Terrorist){FFFFFF}";
- format(string, sizeof(string), "{DE974B}[%s] %s %s: {FFFFFF}%s", ArenaRank(playerid), name, GetNameEx(playerid), text);
- SendGameTeam(Team[playerid], -1, string);
- }
- else {
- if(PaintType[playerid] != 0) format(string, sizeof(string), "{5088BF}%s [%d kills]: {FFFFFF}%s", GetNameEx(playerid), PKills[playerid], text);
- else format(string, sizeof(string), "%s: {FFFFFF}%s", GetNameEx(playerid), text);
- if(PaintType[playerid] != 0) {
- SendPaintMessage(PaintType[playerid], -1, string);
- return 0;
- }
- else if(GetPVarInt(playerid, "Cover") == 1) ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- else if(PlayerInfo[playerid][pColor] >= 1) {
- format(string, sizeof(string), "{%s}%s: {FFFFFF}%s", serverColors(PlayerInfo[playerid][pColor]), GetNameEx(playerid), text);
- ProxDetector(20.0, playerid, string,-1,-1,-1,-1,-1);
- }
- else if(PlayerInfo[playerid][pHelper] >= 1 || PlayerInfo[playerid][pAdmin] >= 1) ProxDetector(20.0, playerid, string,0xBA0404FF,0xBA0404FF,0xBA0404FF,0xBA0404FF,0xBA0404FF);
- else if(PlayerInfo[playerid][pYT] >= 1) ProxDetector(20.0, playerid, string,0x388BFFFF,0x388BFFFF,0x388BFFFF,0x388BFFFF,0x388BFFFF);
- else ProxDetector(20.0, playerid, string,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY,COLOR_GREY);
- }
- format(string, sizeof(string), "(chat) %s", text);
- ChatLog(GetName(playerid), playerid, string);
- format(string, sizeof(string), "\"%s\"", text);
- SetPlayerChatBubble(playerid, text, COLOR_CHATBUBBLE, 10.0, 10000);
- return 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement