if(gangData[playerid][gangID] == 5) /*if(gangData[i][gangID] == 5)*/ { format(tag, sizeof(tag),"{%s}[BL]%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text); } else { format(tag, sizeof(tag),"{%s}%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text); } SendClientMessageToAll(COLOR_WHITE, tag);
public OnPlayerText(playerid, text[]) { if(playerData[playerid][playerLoggedIn]) { if (playerData[playerid][playerScore] < 4) { TextDrawSetString(chat, "You need to have atleast 5 score to chat!"); TextDrawHideForPlayer(playerid, chat); TextDrawShowForPlayer(playerid, chat); SetTimerEx("chat1", 3000, false, "i", playerid); return 0; } if(text[0] == '@' && playerData[playerid][playerLevel] >= 1) { new string[128]; GetPlayerName(playerid, string, sizeof(string)); format(string, sizeof(string), "{47476B}[Admin Chat] {FFFFFF}%s: %s", string, text[1]); adminchat(COLOR_WHITE, string); return 0; } else if(text[0] == '#' && playerData[playerid][playerHelper] == 1) { new string[128]; GetPlayerName(playerid, string, sizeof(string)); format(string, sizeof(string), "{A5DF00}[Helper Chat] {FFFFFF}%s: %s", string, text[1]); helperchat(COLOR_WHITE, string); return 0; } else { if (playerData[playerid][playerMuteTime] != 0) { new message[128]; format(message, sizeof(message), "{FFDC2E}[MUTED] {FFFFFF}You are muted for another {FFDC2E}%i {FFFFFF}seconds and cannot talk!", playerData[playerid][playerMuteTime]); SendClientMessage(playerid, COLOR_WHITE, message); return 0; } else { if (FindIP(text)) { SendClientMessage(playerid, COLOR_WHITE, "{FFDC2E}[SPAM] {FFFFFF}Advert detected! If this occurs frequently, you will be kicked."); playerData[playerid][adDetected]++; new administratorAlert[256]; format(administratorAlert, sizeof(administratorAlert), "{C73E3E}[ADVERTISING] {FFFFFF}%s(%d): %s", playerData[playerid][playerNamee], playerid, text); adminchat(COLOR_WHITE, administratorAlert); if (playerData[playerid][adDetected] == 2) { // Kick KickWithMessage(playerid, "You have been kicked for advertising."); } return 0; } if(strfind(text, "asshole", true) != -1 || strfind(text, "fuck", true) != -1 || strfind(text, "fucker", true) != -1 || strfind(text, "fuk", true) != -1 || strfind(text, "bitch", true) != -1 || strfind(text, "assfuck", true) != -1) { SendClientMessage(playerid, COLOR_WHITE, "{FFDC2E}[ABUSE] {FFFFFF}Please donot abuse."); return 0; } if (playerData[playerid][messageCount] != 3) { new tag[400], color[20]; switch(playerData[playerid][playerClass]) { case 0, 6, CLASS_FIREFIGHTER: { if(playerData[playerid][playerWantedLevel] == 0) { if (playerData[playerid][vipColour]) { color = "58D3F7"; } else { if(playerData[playerid][playerClass] == CLASS_MEDIC) { // Medic Colour color = "F78181"; } else if(playerData[playerid][playerClass] == CLASS_FIREFIGHTER) { color = "9C3D36"; } else { color = "FFFFFF"; } } } if (playerData[playerid][playerWantedLevel] >= 1) { // Yellow Wanted Level color = "FFEC41"; } if(playerData[playerid][playerWantedLevel] >= 6) { // Orange Wanted Level color = "DF802D"; } if(playerData[playerid][playerWantedLevel] >= 25) { // Red Wanted Level color = "D92C3C"; } } case 1: // Police { if (playerData[playerid][vipColour]) { color = "58D3F7"; } else { color = "3E7EFF"; } } case 2: // FBI { if (playerData[playerid][vipColour]) { color = "58D3F7"; } else { color = "8F48F5"; } } case 3: // CIA { if (playerData[playerid][vipColour]) { color = "58D3F7"; } else { color = "2F205B"; } } case 4: // Army { if (playerData[playerid][vipColour]) { color = "58D3F7"; } else { color = "1C3EFF"; } } case 7: // Secret Service { if (playerData[playerid][vipColour]) { color = "58D3F7"; } else { color = "2F205B"; } } } if (playerData[playerid][playerAdminDuty]) // Admin On Duty { color = "063684"; } if(gangData[playerid][gangID] == 5) /*if(gangData[i][gangID] == 5)*/ { format(tag, sizeof(tag),"{%s}[BL]%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text); } else { format(tag, sizeof(tag),"{%s}%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text); } SendClientMessageToAll(COLOR_WHITE, tag); playerData[playerid][messageCount]++; KillTimer(playerData[playerid][spamTimer]); playerData[playerid][spamTimer] = SetTimerEx("StopSpam", 2000, false, "i", playerid); } else { TextDrawSetString(spam, "Please don't spam!"); TextDrawHideForPlayer(playerid, spam); TextDrawShowForPlayer(playerid, spam); SetTimerEx("spam1", 3000, false, "i", playerid); } } } } return 0; }
if(!strcmp(text[0], "!") && gangData[playerid][gangID] == 5)//Try this
{
format(tag, sizeof(tag),"{%s}[BL]%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text);
}
else
{
format(tag, sizeof(tag),"{%s}%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text);
}
SendClientMessageToAll(COLOR_WHITE, tag);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(gangData[i][gangID] == 5)
{
format(tag, sizeof(tag),"{%s}[BL]%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text);
}
else
{
format(tag, sizeof(tag),"{%s}%s(%i): {FFFFFF}%s", color, playerData[playerid][playerNamee], playerid, text);
}
SendClientMessageToAll(COLOR_WHITE, tag);
}
Dude you're lazy asf!
I already answered you in your older post but you aren't taking look at it and your just making new thread that contains the same problem... Btw you've got to use Loop: PHP код:
|