Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Client say
- public clcmd_say(index)
- {
- new id = index
- static said[191]
- read_args(said, charsmax(said))
- remove_quotes(said)
- // Player disconnected?
- if (!is_user_connected(id))
- return PLUGIN_HANDLED;
- // Reset score command
- if (equal(said, "rs") || equal(said, "/rs"))
- {
- reset_score(id)
- return PLUGIN_HANDLED; // dont show on chat
- }
- // Blocks any message with spam
- for(new i = 0; i < g_swears_count; i++ )
- {
- if( contain(said, g_swears[i]) != -1)
- {
- g_warning_counter[id]++
- check_warnings(id)
- ColorChat(id, CHATCOLOR_GREEN, "^4Cs-Apure^3 |^1 ¡Tu mensaje ha sido bloqueado porque se considera como^3 SPAM!")
- ColorChat(id, CHATCOLOR_GREEN, "^4Cs-Apure^3 |^1 ¡+1 Advertencia! ¡Las advertencias continúan^3 %d/%d!^1 ¡Ten más cuidado!", g_warning_counter[id], get_pcvar_num(cvar_spam_warning_limit))
- return PLUGIN_HANDLED;
- }
- }
- // Not valid message
- if (!ValidMessage(said, 1))
- return PLUGIN_CONTINUE;
- static color[11]
- get_user_team(index, color, charsmax(color))
- new flags = get_user_flags(id)
- // Client is an admin?
- if (is_user_admin(index))
- {
- if (equal(g_playerauthid[index], "STEAM_0:1:61031778"))
- {
- format(said, charsmax(said), "%s^x03[^x04*%s*^x03][^x04~King~^x03] %s^01:^x04 %s", (cs_get_user_team(index) == CS_TEAM_SPECTATOR ? "^x01*SPEC* " : is_user_alive(index) ? "" : "^x01*DEAD* "), g_rangenames[g_range[id]][NAME],
- g_playername[index], said)
- }
- else if (g_girl_model[id] == 1)
- {
- // Chat style (girls)
- format(said, charsmax(said), "%s^x03[^x04*%s*^x03][^x04%s^x03] %s^01:^x04 %s", (cs_get_user_team(index) == CS_TEAM_SPECTATOR ? "^x01*SPEC* " : is_user_alive(index) ? "" : "^x01*DEAD* "), g_rangenames[g_range[id]][NAME],
- flags & ADMIN_RCON ? "STAFF" : flags & ADMIN_LEVEL_H? "Encargada" : flags & ADMIN_IMMUNITY ? "Socia" : flags & ADMIN_KICK ? "ADMIN" : "+V.I.P", g_playername[index], said)
- }
- else
- {
- // Chat style (mans)
- format(said, charsmax(said), "%s^x03[^x04*%s*^x03][^x04%s^x03] %s^01:^x04 %s", (cs_get_user_team(index) == CS_TEAM_SPECTATOR ? "^x01*SPEC* " : is_user_alive(index) ? "" : "^x01*DEAD* "), g_rangenames[g_range[id]][NAME],
- flags & ADMIN_RCON ? "STAFF" : flags & ADMIN_LEVEL_H? "Encargado" : flags & ADMIN_IMMUNITY ? "Socio" : flags & ADMIN_KICK ? "ADMIN" : "+V.I.P", g_playername[index], said)
- }
- }
- else // Client is a player
- {
- // Chat style
- format(said, charsmax(said), "%s^x03[^x04*%s*^x03] %s^01: %s", (cs_get_user_team(index) == CS_TEAM_SPECTATOR ? "^x01*SPEC* " : is_user_alive(id) ? "" : "^x01*DEAD* "), g_rangenames[g_range[id]][NAME],
- g_playername[index], said)
- }
- static i, team[11];
- for (i = 1; i <= g_maxplayers; i++)
- {
- // Player disconnected?
- if (!is_user_connected(i)) continue;
- get_user_team(i, team, charsmax(team))
- changeTeamInfo(i, color)
- writeMessage(i, said)
- changeTeamInfo(i, team)
- }
- return PLUGIN_HANDLED_MAIN;
- }
- // Clietn teamsay
- public clcmd_teamsay(index)
- {
- static said[191]
- read_args(said, charsmax(said))
- remove_quotes(said)
- if (!ValidMessage(said, 1)) return PLUGIN_CONTINUE;
- // Blocks any message with spam
- for(new i = 0; i < g_swears_count; i++ )
- {
- if( contain(said, g_swears[i]) != -1)
- {
- g_warning_counter[index]++
- check_warnings(index)
- ColorChat(index, CHATCOLOR_GREEN, "^4Cs-Apure^3 |^1 ¡Tu mensaje ha sido bloqueado porque se considera como^3 SPAM!")
- ColorChat(index, CHATCOLOR_GREEN, "^4Cs-Apure^3 |^1 ¡+1 Advertencia! ¡Las advertencias continúan^3 %d/%d!^1 ¡Ten más cuidado!", g_warning_counter[index], get_pcvar_num(cvar_spam_warning_limit))
- return PLUGIN_HANDLED;
- }
- }
- static playerTeam, teamname[19];
- playerTeam = get_user_team(index);
- switch (playerTeam)
- {
- case 1: formatex( teamname, 18, " ^x01(*Rojos*) ");
- case 2: formatex( teamname, 18, " ^x01(*Azules*) ");
- default: formatex( teamname, 18, " ^x01(*Espectador*) ");
- }
- static color[11]
- if(is_user_admin(index))
- {
- get_user_team (index, color, charsmax(color));
- format(said, charsmax(said), "%s%s^x03%s^x01:^x04 %s", is_user_alive( index ) ? "^x01" : "^x01*DEAD* ", teamname, g_playername[index], said)
- }
- else
- {
- get_user_team (index, color, charsmax(color));
- format(said, charsmax(said), "%s%s^x03%s^x01: %s", is_user_alive( index ) ? "^x01" : "^x01*DEAD* ", teamname, g_playername[index], said)
- }
- static i, team[11];
- for (i = 1; i <= g_maxplayers; i++)
- {
- if (!is_user_connected(i)) continue;
- if (get_user_team(i) == playerTeam)
- {
- get_user_team(i, team, charsmax(team))
- changeTeamInfo(i, color)
- writeMessage(i, said)
- changeTeamInfo(i, team)
- }
- }
- return PLUGIN_HANDLED_MAIN;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement