daily pastebin goal
10%
SHARE
TWEET

Mariquito

a guest Jan 21st, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Client say
  2. public clcmd_say(index)
  3. {
  4.     new id = index
  5.     static said[191]
  6.     read_args(said, charsmax(said))
  7.     remove_quotes(said)
  8.    
  9.     // Player disconnected?
  10.     if (!is_user_connected(id))
  11.         return PLUGIN_HANDLED; 
  12.    
  13.     // Reset score command
  14.     if (equal(said, "rs") || equal(said, "/rs"))
  15.     {
  16.         reset_score(id)
  17.         return PLUGIN_HANDLED; // dont show on chat
  18.     }
  19.    
  20.     // Blocks any message with spam
  21.     for(new  i = 0; i < g_swears_count; i++ )
  22.     {
  23.         if( contain(said, g_swears[i]) != -1)
  24.         {
  25.             g_warning_counter[id]++
  26.             check_warnings(id)
  27.             ColorChat(id, CHATCOLOR_GREEN, "^4Cs-Apure^3 |^1 ¡Tu mensaje ha sido bloqueado porque se considera como^3 SPAM!")
  28.             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))
  29.             return PLUGIN_HANDLED;
  30.         }
  31.     }
  32.    
  33.     // Not valid message
  34.     if (!ValidMessage(said, 1))
  35.         return PLUGIN_CONTINUE;
  36.    
  37.     static color[11]
  38.     get_user_team(index, color, charsmax(color))
  39.    
  40.     new flags = get_user_flags(id)
  41.    
  42.     // Client is an admin?
  43.     if (is_user_admin(index))  
  44.     {
  45.         if (equal(g_playerauthid[index], "STEAM_0:1:61031778"))
  46.         {
  47.             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],
  48.             g_playername[index], said)
  49.         }
  50.         else if (g_girl_model[id] == 1)
  51.         {
  52.             // Chat style (girls)
  53.             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],
  54.             flags & ADMIN_RCON ? "STAFF" : flags & ADMIN_LEVEL_H? "Encargada" : flags & ADMIN_IMMUNITY ? "Socia" : flags & ADMIN_KICK ? "ADMIN" : "+V.I.P", g_playername[index], said)
  55.         }
  56.         else
  57.         {
  58.             // Chat style (mans)
  59.             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],
  60.             flags & ADMIN_RCON ? "STAFF" : flags & ADMIN_LEVEL_H? "Encargado" : flags & ADMIN_IMMUNITY ? "Socio" : flags & ADMIN_KICK ? "ADMIN" : "+V.I.P", g_playername[index], said)
  61.         }
  62.     }
  63.     else // Client is a player
  64.     {
  65.         // Chat style
  66.         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],
  67.         g_playername[index], said)
  68.     }
  69.  
  70.     static i, team[11];
  71.    
  72.     for (i = 1; i <= g_maxplayers; i++)
  73.     {
  74.         // Player disconnected?
  75.         if (!is_user_connected(i)) continue;
  76.        
  77.         get_user_team(i, team, charsmax(team))            
  78.         changeTeamInfo(i, color)            
  79.         writeMessage(i, said)
  80.         changeTeamInfo(i, team)
  81.     }
  82.  
  83.     return PLUGIN_HANDLED_MAIN;
  84. }
  85.  
  86. // Clietn teamsay
  87. public clcmd_teamsay(index)
  88. {
  89.     static said[191]
  90.     read_args(said, charsmax(said))
  91.     remove_quotes(said)
  92.    
  93.     if (!ValidMessage(said, 1)) return PLUGIN_CONTINUE;
  94.    
  95.     // Blocks any message with spam
  96.     for(new  i = 0; i < g_swears_count; i++ )
  97.     {
  98.         if( contain(said, g_swears[i]) != -1)
  99.         {
  100.             g_warning_counter[index]++
  101.             check_warnings(index)
  102.             ColorChat(index, CHATCOLOR_GREEN, "^4Cs-Apure^3 |^1 ¡Tu mensaje ha sido bloqueado porque se considera como^3 SPAM!")
  103.             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))
  104.             return PLUGIN_HANDLED;
  105.         }
  106.     }
  107.    
  108.  
  109.     static playerTeam, teamname[19];
  110.     playerTeam = get_user_team(index);
  111.  
  112.     switch (playerTeam)
  113.     {
  114.         case 1: formatex( teamname, 18, " ^x01(*Rojos*) ");
  115.         case 2: formatex( teamname, 18, " ^x01(*Azules*) ");
  116.         default: formatex( teamname, 18, " ^x01(*Espectador*) ");
  117.     }
  118.    
  119.     static color[11]
  120.    
  121.    
  122.     if(is_user_admin(index))
  123.     {
  124.         get_user_team (index, color, charsmax(color));
  125.         format(said, charsmax(said), "%s%s^x03%s^x01:^x04 %s", is_user_alive( index ) ? "^x01" : "^x01*DEAD* ",  teamname, g_playername[index], said)
  126.     }
  127.     else
  128.     {
  129.         get_user_team (index, color, charsmax(color));
  130.         format(said, charsmax(said), "%s%s^x03%s^x01: %s", is_user_alive( index ) ? "^x01" : "^x01*DEAD* ",  teamname, g_playername[index], said)
  131.     }
  132.    
  133.     static i, team[11];
  134.     for (i = 1; i <= g_maxplayers; i++)
  135.     {
  136.         if (!is_user_connected(i)) continue;
  137.        
  138.         if (get_user_team(i) == playerTeam)
  139.         {
  140.             get_user_team(i, team, charsmax(team))            
  141.             changeTeamInfo(i, color)            
  142.             writeMessage(i, said)
  143.             changeTeamInfo(i, team)
  144.         }
  145.     }
  146.     return PLUGIN_HANDLED_MAIN;
  147. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top