Chat Additions

amxx reapi Chat Additions 1.9.4

Нет прав для скачивания
Установка
Установка очень простая. Скачайте архив и загрузите папку cstrike на сервер.
После чего откройте файл с плагинами по пути configs/plugins-ChatAdditions.ini активируйте нужные вам плагины или дезактивируйте ненужные.
Код:
 ; A core plugin for control different types of chat.
ChatAdditions_Core.amxx     debug

; Storage choose (disable not used storages)
; IMPORTANT: you must leave ONLY ONE plugin to manage the storage.
CA_Storage_SQLite.amxx      debug ; SQLite storage provider
; CA_Storage_CSBans.amxx      debug ; CSBans (MySQL) storage provider
; CA_Storage_GameCMS.amxx     debug ; GameCMS (MySQL) storage provider

; Extensions
CA_AntiFlood.amxx               debug ; Antiflood for chat
CA_Mute.amxx                    debug ; Players can choose who they can hear.
CA_Addon_DeathMute.amxx         debug ; Alive players don't hear dead players after 5 secs
CA_Addon_RankRestrictions.amxx  debug ; Restrict chat until you reach the rank of a statistic.
CA_Addon_VoteGag.amxx           debug ; Ability for players to vote for gag.
CA_Addon_RequestUnGag.amxx      debug ; A player can apologize to the administration.
CA_Gag.amxx                     debug ; Manage player chats for the admin.

; IMPORTANT: Place you chat manager below (Chat RBS plugins, Lite Translit, Colored Translit etc..)
; Most chat managers are not written using the correct chat handling,
;  for this reason player messages may not be blocked.
;  It is necessary to place the chat manager below the chat blocking plugins,
;  to avoid blocking problems.
; chat_rbs.amxx
; crx_chatmanager.amxx
; lite_translit.amxx
; colored_translit.amxx
Последним шагом станет настройка конфигов включённых плагинов и перезагрузка сервера.
Настройки
Настройте выбранные вами плагины по пути configs/plugins/ChatAdditions:
Код:
// Log file type
//  0 = log to common amxx log file (logs/L*.log)
//  1 = log to plugins folder (logs/ChatAdditions/[plugin name]/*.log)
//  2 = silent log to plugins folder (logs/%s/[plugin name]/L*.log)
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "2.000000"
ca_log_type "1"

// Log level
//  0 = disable logs
//  1 = add info messages logs
//  2 = add warinigs info
//  3 = add debug messages
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "3.000000"
ca_log_level "1"

// Enable update check?
//  0 = disable update checks
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
ca_update_notify "1"

// The time in days after which the log files should be deleted.
//  0 - The logs won't be deleted.
//  > 0 - The logs will be deleted at the time inserted.
// -
// Default: "7"
// Minimum: "0.000000"
ca_log_autodelete_time "7"
Код:
// How often players can use menu. (in seconds)
// -
// Default: "3"
// Minimum: "0.000000"
// Maximum: "120.000000"
ca_mute_use_delay "3"
Код:
// Time (in seconds) for killed players, during which they can report information to living players.
// 0 - disabled functionality
// -
// Default: "5.0"
// Minimum: "0.000000"
// Maximum: "240.000000"
ca_deathmute_time "5.0"

// Death mute mode
// 0 - alive hear only alive, dead hear all
// 1 - alive hear only alive, dead hear only dead
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
ca_deathmute_dead_hear_alive "1"

// Notification type for dead players
// 0 - disabled functionality
// 1 - chat message
// 2 - HUD message
// -
// Default: "1"
ca_deathmute_notify_type "1"

// Show progressbar
// 0 - disabled functionality
// -
// Default: "1"
ca_deathmute_notify_show_progressbar "1"

// X position for HUD message
// -1.0 - center
// -
// Default: "-1.0"
// Minimum: "-1.000000"
// Maximum: "1.000000"
ca_deathmute_notify_hud_x "-1.0"

// Y position for HUD message
// -1.0 - center
// -
// Default: "0.15"
// Minimum: "-1.000000"
// Maximum: "1.000000"
ca_deathmute_notify_hud_y "0.15"

// Red color value (in RGB) [0...255]
// -
// Default: "200"
// Minimum: "0.000000"
// Maximum: "255.000000"
ca_deathmute_notify_hud_r "200"

// Green color value (in RGB) [0...255]
// -
// Default: "50"
// Minimum: "0.000000"
// Maximum: "255.000000"
ca_deathmute_notify_hud_g "50"

// Blue color value (in RGB) [0...255]
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "255.000000"
ca_deathmute_notify_hud_b "0"

// User immunity flag
// -
// Default: "a"
ca_deathmute_immunity_flags "a"
Код:
// Restrictions Types
// 0 - Disable restrictions
// 1 - Level restrictions
// 2 - Kills count restrictions
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "2.000000"
ca_rankrestrictions_type "1"

// Min kills count to access voice & text chat
// -
// Default: "10"
// Minimum: "0.000000"
ca_rankrestrictions_min_kills "10"

// Level System Types
// 0 - Advanced Experience System
// 1 - Army Ranks Ultimate
// 2 - OciXCrom's Rank System
// 3 - CMSStats Ranks
// 4 - CMSStats MySQL
// 5 - CSstatsX SQL
// 6 - CSX Module
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "6.000000"
ca_rankrestrictions_type_level "1"

// Min Level to access voice & text chat
// -
// Default: "2"
// Minimum: "0.000000"
ca_rankrestrictions_min_level "2"

// User immunity flag
// -
// Default: "a"
ca_rankrestrictions_immunity_flag "a"


// Kill System Types
// 0 - CSStats MySQL
// 1 - CSX Module
// -
// Default: "0"
// Minimum: "0.000000"
// Maximum: "1.000000"
ca_rankrestrictions_type_kills "0"
Код:
// Request ungag command
// -
// Default: "/sorry"
ca_requestungag_cmd "/sorry"

// delay time request ungag
// -
// Default: "40.0"
// Minimum: "1.000000"
ca_requestungag_delay "40.0"
Код:
// Time between messages
// 0.0 - no limit
// -
// Default: "0.75"
// Minimum: "0.000000"
ca_anti_flood_time "0.75"

// How many identical messages can be written in a row
// 0 - no limit
// -
// Default: "2"
// Minimum: "0.000000"
ca_equal_messages "2"

Настройка CA GAG:
Код:
// Gag time values for choose
//  format: 1 = 1 second, 1i = 1 minute, 1h = 1 hour, 1d = 1 day, 1w = 1 week, 1m = 1 month, 1y = 1 year
//  NOTE: Changes will be applied only after reloading the map (or command `ca_gag_reload_config`)
// -
// Default: "1i, 5i, 10i, 30i, 1h, 1d, 1w, 1m"
ca_gag_times "1i, 5i, 10i, 30i, 1h, 1d, 1w, 1m"

// User immunity flag
//  users with this flag can't be gagged
//  NOTE: `ca_gag_access_flags_high` can gag this users
// -
// Default: "a"
ca_gag_immunity_flags "a"

// Admin flag
//  users with this flag can gag users with flag `z`, but can't with flag `ca_gag_immunity_flags`
//  users with this flag can't be gagged by same flags users (immunity)
//  NOTE: `ca_gag_access_flags_high` can gag this users
// -
// Default: "c"
ca_gag_access_flags "c"

// Admin flag
//  users with this flag can enter their own gag reason
// -
// Default: "d"
ca_gag_access_flags_own_reason "d"

// Admin flag
//  users with this flag can enter their own gag time
// -
// Default: "e"
ca_gag_access_flags_own_time "e"

// High admin flag
//  users with this flag can everyone
//  users with this flag can't be gagged
//  NOTE: `ca_gag_access_flags_high` can gag this users
// -
// Default: "l"
ca_gag_access_flags_high "l"

// Remove gag access control
//  1 = remove only own gags
//  0 = no restrictions
//  NOTE: `ca_gag_access_flags_high` can remove every gag
// -
// Default: "1"
ca_gag_remove_only_own_gag "1"

// Sound for success action
//  NOTE: Changes will be applied only after reloading the map
// -
// Default: "buttons/blip2.wav"
ca_gag_sound_ok "buttons/blip2.wav"

// Sound for error action
//  NOTE: Changes will be applied only after reloading the map
// -
// Default: "buttons/button2.wav"
ca_gag_sound_error "buttons/button2.wav"

// Block nickname change for gagged player
//  0 = no restrictions
// -
// Default: "1"
ca_gag_block_nickname_change "1"

// Also block adminchat if admin gagged
//  0 = no restrictions
// -
// Default: "1"
ca_gag_block_admin_chat "1"

// Don't separate `say` & `say_team` chats
//  0 = disabled
// -
// Default: "1"
ca_gag_common_chat_block "1"

// Enable own gag reason
//  0 = disabled (excluding when there are no reasons)
//  1 = enabled, at first position in reasons list
//  2 = enabled, at last position in reasons list
// -
// Default: "1"
ca_gag_own_reason_enabled "1"

Настройка шаблонов для кляпа:
Код:
// Usage: ca_gag_add_reason <reason> [flags] [time]
//  <reason> - reason text message
//  [flags] - gag flags. (optional)
//    a = text chat, b = text team chat, c = voice chat
//  [time] - time in minutes (optional)
//    format: 1 = 1 second, 1i = 1 minute, 1h = 1 hour, 1d = 1 day, 1w = 1 week, 1m = 1 month, 1y = 1 year
//  Examples:
//   ca_gag_add_reason "Flood" "abc" "3h" - will add reason template with "Flood" reason, block all chat type, on 3 hours
//   ca_gag_add_reason "Flood" - will add reason template with "Flood" reason only
//
// NOTE: Set `time` or `flags` argument empty for allow to make your own choices.
//
// https://github.com/ChatAdditions/ChatAdditions_AMXX/wiki

ca_gag_add_reason "Foul language / insults" "abc" ""
ca_gag_add_reason "Flooding" "" "10i"
ca_gag_add_reason "Monitoring" "abc" "10i"
ca_gag_add_reason "Bad microphone" "c" "1h"
ca_gag_add_reason "Chat ads" "ab" "1h"
ca_gag_add_reason "Inappropriate behavior" "abc" "1d"
ca_gag_add_reason "Microphone from 18+ age" "c" "1w"

Подключение CA GAG к базе данных:
  1. Определитесь со способом подключения.
    Если у вас нет базы данных MySQL, используйте SQLite. Система изначально настроена под использование SQLite, так что в этом случае вы можете пропустить настройку подключения.
    В ином случае доступны CSBans, GameCMS и PGBans.
  2. Впишите данные для подключения к БД в конфиге CA_Storage_CSBans.cfg, CA_Storage_GameCMS.cfg или CA_Storage_PGBans.cfg в зависимости от вашего выбора.
API
API ядра:
Код:
/**
* Log a message for every ChatAdditions module.
*
* @param level     Log level, see logLevel_* destination constants in ChatAdditions.inc
* @param message   Formatting rules.
* @param ...       Variable number of formatting parameters
*
* @return          True if a message logged, false otherwise.
*/
native bool: CA_Log(logLevel_s: level, const message[], any:...);

/**
* Called to determine if the Receiver has muted (blocked) the Sender.
* NOTE: Setting from client menu (Players list -> Mute)
*
* @param receiver  Receiver client id.
* @param sender    Sender client id.
*
* @return          Returns true if the receiver has blocked the sender
*/
native bool: CA_PlayerHasBlockedPlayer(const receiver, const sender);

/**
* Called when player say to chat.
*
* @param index     Client index.
* @param message   Client message.
*
* @return      CA_CONTINUE to allow send message
*              CA_SUPERCEDE or higher to prevent message
*/
forward CA_Client_Say(index, const message[]);

/**
* Called when player say to team chat.
*
* @param index     Client index.
* @param message   Client message.
*
* @return      CA_CONTINUE to allow send message
*              CA_SUPERCEDE or higher to prevent message
*/
forward CA_Client_SayTeam(index, const message[]);


/**
* Called when player begins to speak.
*
* @note
*
* @param listener   Receiver index.
* @param sender   Sender index.
*
* @return      CA_CONTINUE to allow send voice
*              CA_SUPERCEDE or higher to prevent the voice
*/
forward CA_Client_Voice(const listener, const sender);


/**
* Called when player change nickname.
*
* @note
*
* @param id        Client index.
* @param newName   New name.
*
* @return      CA_CONTINUE to allow change nickname
*              CA_SUPERCEDE or higher to prevent
*/
forward CA_Client_ChangeName(const id, const newName[]);
API CA GAG:
Код:
/**
* Sets client's gag data.
*
* @param index         Client index
* @param reason        Reason
* @param Minutes       Minutes
* @param Flags         Flags
*
* @noreturn
* @error               If the client index is not within the range of 1 to
*                      MaxClients, or the client is not connected, an error
*                      will be thrown.
*/
native bool: ca_set_user_gag(const index, const reason[], const minutes, const gag_flags_s: flags);

/**
* Get client's gag data.
*
* @param index       Client index
* @param reason          Gag reason
* @param minutes            minutes
* @param flags              flags
*
* @return                      True if has Gag.
* @error               If the client index is not within the range of 1 to
*                      MaxClients, or the client is not connected, an error
*                      will be thrown.
*/
native bool: ca_get_user_gag(const index, reason[], &minutes, &gag_flags_s: flags);

/**
* Has client gag?
*
* @param index         Client index
*
* @return                      True if has Gag.
* @error               If the client index is not within the range of 1 to
*                      MaxClients, or the client is not connected, an error
*                      will be thrown.
*/
native bool: ca_has_user_gag(const index);

/**
* Remove client's gag data..
*
* @param target        Target Index
* @param admin         Admin Index (0 - server)
*
* @return                      True if gag has been removed.
* @error               If the client index is not within the range of 1 to
*                      MaxClients, or the client is not connected, an error
*                      will be thrown.
*/
native bool: ca_remove_user_gag(const target, admin = 0);

/**
* Called on Gag save.
*
* @param target        Targed index
* @param name          Targed name
* @param authID        Targed AuthID
* @param IP            Targed IP
* @param adminName     Admin name
* @param adminAuthID   Admin authID
* @param adminIP       Admin IP
* @param reason        Reason
* @param time          Time (in seconds)
* @param flags         Flags (chat, teamChat, voice)
* @param expireAt      Time when gag expire
*
* @return              Return CA_SUPERCEDE for prevent Gag.
*/
forward CA_gag_setted(
  const target, name[], authID[], IP[],
  adminName[], adminAuthID[], adminIP[],
  reason[], time, gag_flags_s: flags,
  expireAt);

/**
* Called on gag remove action.
*
* @param target    Target index
* @param target    Reason
* @param minutes   Time (in seconds)
* @param flags     Flags (chat, teamChat, voice)
*
* @return              Return CA_SUPERCEDE for prevent Gag remove.
*/
forward CA_gag_removed(const target, reason[], minutes, gag_flags_s: flags);
API хранилища кляпов (в разработке):
Код:
/*
*
*/
native CA_Storage_Save(const name[], const authID[], const IP[], const reason[], const adminName[], const adminAuthID[], const adminIP[], const expireAt, const flags);

/*
*
*/
native CA_Storage_Load(const authID[]);

/*
*
*/
native CA_Storage_Remove(const authID[]);


/*
*
*/
forward CA_Storage_Initialized();

/*
*
*/
forward CA_Storage_Saved(const name[], const authID[], const IP[], const reason[],
  const adminName[], const adminAuthID[], const adminIP[],
  const createdAt, const expireAt, const flags);

/*
*
*/
forward CA_Storage_Loaded(const name[], const authID[], const IP[], const reason[],
  const adminName[], const adminAuthID[], const adminIP[],
  const createdAt, const expireAt, const flags);

/*
*
*/
forward CA_Storage_Removed();
Сверху Снизу