- Ошибка
-
CA_Storage_Remove and ca_set_user_gag
- ОС
- Linux
- Amx Mod X
-
1.9.0
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.13.0.788-dev
Build date: 07:36:33 Jul 12 2023 (3378)
Build from: https://github.com/dreamstalker/rehlds/commit/f955b07
- ReGamedll
-
ReGameDLL version: 5.26.0.668-dev
Build date: 19:02:48 Dec 31 2023
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d3c0ec8
- Версия Metamod
-
Metamod-r v1.3.0.149, API (5:13)
Metamod-r build: 11:31:17 Apr 23 2024
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/603a257
- Список метамодулей
-
Currently loaded plugins:
description stat pend file vers src load unload
[ 1] SafeNameAndChat RUN - SafeNameAndChat.so v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm_i386.so v0.2.0.13 ini Start Never
[ 3] Revoice RUN - VoiceTranscoder.so v0.1.0.33 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5271-OY ini Start ANY
[ 5] Placeholders disabler RUN - plfix_mm_i386.so v0.0.3 ini Start Never
[ 6] ReAuthCheck RUN - reauthcheck_mm_i386.so v0.1.6 ini Start Never
[ 7] Accuracy Fix RUN - accuracyfix_mm.so v1.1.7 ini ANY ANY
[ 8] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[10] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[12] ReAPI RUN - reapi_amxx_i386.so v5.24.0.300-dev pl4 ANY Never
[13] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[14] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
[16] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl4 ANY ANY
16 plugins, 16 running
- Список плагинов
-
name version author file status
[ 1] Komut Block 1.0 kApo` editted XL KomutBlock.amxx running
[ 2] Admin Base 1.9.0.5271 AMXX Dev Team admin.amxx running
[ 3] Admin Commands v12 23022024 OyunYoneticisi admincmd.amxx running
[ 4] Menus Front-End 1.9.0.5271 AMXX Dev Team menufront.amxx running
[ 5] Commands Menu 1.9.0.5271 29.10.2024fix cmdmenu.amxx running
[ 6] Players Menu 1.9.0.5271 AMXX Dev Teamf2 plmenu.amxx running
[ 7] Admin Votes 1.9.0.5271 AMXX Dev Team adminvote.amxx running
- Автор плагина
- Chat Additions
- Версия плагина
- 1.9.4
- Исходный код
-
/*
* The plugin is based on an existing plugin from UCC by neygomon.
*/
#include <amxmodx>
#include <CA_GAG_API>
/* ======== SETTINGS ======== */
#define PREFIX "CA: VoteGAG" // ĞŸÑ€ĞµÑ„Ğ¸ĞºÑ Ñообщений в чате
#define REPEAT_VOTE_MIN 2 // ЧаÑтота повторных голоÑований
#define PERCENT_VOTE_OK 60 // Процент голоÑов Ğ´Ğ»Ñ ÑƒÑпешного голоÑованиÑ
#define BLOCK_TIME_MIN 3 // Ğ’Ñ€ĞµĞ¼Ñ GAG'a игрока
#define CHECK_VOTE_TIME 15.0 // ПродолжительноÑÑ‚ÑŒ голоÑованиÑ
const IMMUNITY_FLAGS = ADMIN_IMMUNITY; // Иммунитет к функциÑм VoteGAG'Ğ°
/* ======== LANG ======== */
#define MSG_PLMENU_TITLE "\d[\rVoteGag\d] \yВыберите игрока"
#define MSG_VMENU_TITLE "\d[\rVoteGag\d] \yЗаткнуть игрока \r%s\y?"
#define MSG_MENU_YES "\rДа"
#define MSG_MENU_NO "\yĞет"
#define MSG_MENU_NEXT "\yДалее"
#define MSG_MENU_BACK "\rĞĞ°Ğ·Ğ°Ğ´"
#define MSG_MENU_EXIT "\rВыход"
#define MSG_VOTE_START "^1[^4%s^1] ^3%n^4 ЗапуÑтил голоÑование Ğ·Ğ° ^1gag ^4игрока ^3%n^1!"
#define MSG_VOTE_EXISTS "^1[^4%s^1] ^4ГолоÑование Ğ·Ğ° ^1gag ^4игрока ^3уже запужено!"
#define MSG_VOTE_BLOCK "^1[^4%s^1] ^4ГолоÑование будет доÑтупно через ^3%d Ñек."
#define MSG_VOTING_FAIL "^1[^4%s^1] ^4ГолоÑование завершилоÑÑŒ ^3неудачно^4. ĞедоÑтаточно голоÑов ^1[^3%d^1/^3%d^1]"
#define MSG_VOTING_OK_ALL "^1[^4%s^1] ^4ГолоÑование завершилоÑÑŒ ^3удачно^4. Игрок ^3%s ^4GAG'нут на ^3%d ^4мин."
#define MSG_VOTING_OK_PL "^1[^4%s^1] ^4ГолоÑование Ğ·Ğ° Ваш GAG завершилоÑÑŒ ^3удачно^4. Вам отклÑчены чаты на ^3%d ^4мин."
#define MSG_VOTING_DISC "^1[^4%s^1] ^4Игрок, Ğ·Ğ° которого Ğ’Ñ‹ запуÑкали GAG голоÑование, покинул Ñервер"
/* ======== EndLANG ======== */
#if !defined MAX_PLAYERS
const MAX_PLAYERS = 32;
#endif
new g_VotingMenu;
new g_iVotingIndex, g_iVotingLasttime;
new g_arrPlayers[MAX_PLAYERS], g_iPnum;
new bool:g_bPlayerVoted[MAX_PLAYERS + 1], g_iPlayersVotedCount;
public plugin_init()
{
register_plugin("CA: VoteGAG", "1.0.1-alpha", "Sergey Shorokhov");
register_clcmd("say /votegag", "clcmd_VoteGag");
register_clcmd("say_team /votegag", "clcmd_VoteGag");
register_clcmd("votegag", "clcmd_VoteGag")
}
public plugin_cfg()
{
g_VotingMenu = menu_create("Title", "voting_handler");
menu_setprop(g_VotingMenu, MPROP_EXIT, MEXIT_NEVER);
menu_additem(g_VotingMenu, MSG_MENU_YES, "1");
menu_additem(g_VotingMenu, MSG_MENU_NO, "0");
}
public client_disconnected(id)
{
if(g_bPlayerVoted[id])
{
g_bPlayerVoted[id] = false;
g_iPlayersVotedCount--;
}
}
public clcmd_VoteGag(id)
{
if(g_iVotingIndex)
{
ChatColor(id, 0, MSG_VOTE_EXISTS, PREFIX);
return PLUGIN_HANDLED;
}
new time = g_iVotingLasttime + REPEAT_VOTE_MIN * 60 - get_systime();
if(time > 0)
{
ChatColor(id, 0, MSG_VOTE_BLOCK, PREFIX, time % 60);
return PLUGIN_HANDLED;
}
new szName[32], num[3], menu, callback;
menu = menu_create(MSG_PLMENU_TITLE, "players_handler");
callback = menu_makecallback("players_callback");
menu_setprop(menu, MPROP_NEXTNAME, MSG_MENU_NEXT);
menu_setprop(menu, MPROP_BACKNAME, MSG_MENU_BACK);
menu_setprop(menu, MPROP_EXITNAME, MSG_MENU_EXIT);
get_players(g_arrPlayers, g_iPnum, "h");
for(new i; i < g_iPnum; i++)
{
if(g_arrPlayers[i] == id)
continue;
get_user_name(g_arrPlayers[i], szName, charsmax(szName));
num_to_str(g_arrPlayers[i], num, charsmax(num));
menu_additem(menu, szName, num, .callback = callback);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public players_callback(id, menu, item)
{
new _access, item_data[3], callback;
menu_item_getinfo(menu, item, _access, item_data, charsmax(item_data), .callback = callback);
new index = str_to_num(item_data);
if(!is_user_connected(index))
return ITEM_DISABLED;
if(ca_has_user_gag(index))
return ITEM_DISABLED;
if(get_user_flags(index) & IMMUNITY_FLAGS)
return ITEM_DISABLED;
return ITEM_ENABLED;
}
public players_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new _access, item_data[3], callback;
menu_item_getinfo(menu, item, _access, item_data, charsmax(item_data), .callback = callback);
g_iVotingIndex = str_to_num(item_data);
menu_destroy(menu);
new szTitle[128], szName[32];
get_user_name(g_iVotingIndex, szName, charsmax(szName));
formatex(szTitle, charsmax(szTitle), MSG_VMENU_TITLE, szName);
menu_setprop(g_VotingMenu, MPROP_TITLE, szTitle);
ChatColor(0, g_iVotingIndex, MSG_VOTE_START, PREFIX, id, g_iVotingIndex);
for(new i; i < g_iPnum; i++)
{
if(g_arrPlayers[i] == g_iVotingIndex)
continue;
if(is_user_connected(g_arrPlayers[i]))
menu_display(g_arrPlayers[i], g_VotingMenu);
}
set_task(CHECK_VOTE_TIME, "task__CheckVotes", id);
return PLUGIN_HANDLED;
}
public voting_handler(id, menu, item)
{
if(item == MENU_EXIT)
return PLUGIN_HANDLED;
new _access, item_data[3], callback;
menu_item_getinfo(menu, item, _access, item_data, charsmax(item_data), .callback = callback);
if(str_to_num(item_data))
{
g_iPlayersVotedCount++;
g_bPlayerVoted[id] = true;
}
return PLUGIN_HANDLED;
}
public task__CheckVotes(id)
{
for(new i; i < g_iPnum; i++)
{
if(is_user_connected(g_arrPlayers[i]))
show_menu(g_arrPlayers[i], 0, "^n");
}
new iVoteCount = floatround(g_iPnum * PERCENT_VOTE_OK / 100.0);
if(g_iPlayersVotedCount >= iVoteCount)
{
if(is_user_connected(g_iVotingIndex))
{
ca_set_user_gag(g_iVotingIndex, PREFIX, BLOCK_TIME_MIN, (gagFlag_Say | gagFlag_SayTeam | gagFlag_Voice));
new szName[32];
get_user_name(g_iVotingIndex, szName, charsmax(szName));
ChatColor(0, g_iVotingIndex, MSG_VOTING_OK_ALL, PREFIX, szName, BLOCK_TIME_MIN);
ChatColor(g_iVotingIndex, 0, MSG_VOTING_OK_PL, PREFIX, BLOCK_TIME_MIN);
}
else ChatColor(id, 0, MSG_VOTING_DISC, PREFIX);
}
else ChatColor(0, g_iVotingIndex, MSG_VOTING_FAIL, PREFIX, g_iPlayersVotedCount, iVoteCount);
arrayset(g_bPlayerVoted, false, sizeof g_bPlayerVoted);
g_iPlayersVotedCount = 0;
g_iVotingIndex = 0;
g_iVotingLasttime = get_systime();
}
stock ChatColor(id, id2, const szMessage[], any:...)
{
new szMsg[190];
vformat(szMsg, charsmax(szMsg), szMessage, 4);
if(id)
{
client_print_color(id, print_team_default, szMsg);
}
else
{
new players[32], pnum;
get_players(players, pnum, "c");
for(new i; i < pnum; ++i)
{
if(players[i] != id2)
{
client_print_color(players[i], print_team_default, szMsg);
}
}
}
}
Merhaba ChatAdditions_Core eklentisi yüklendi ancak CA_Gag eklentisinde şu hatayı alıyorum Yükleme başarısız oldu: Eklenti bilinmeyen bir işlev kullanıyor (adı "CA_Storage_Remove") - modules.ini dosyanızı kontrol edin. CA_Addon_VoteGag eklentisinde şu hatayı alıyorum Yükleme başarısız oldu: Eklenti bilinmeyen bir işlev kullanıyor (adı "ca_set_user_gag") - modules.ini dosyanızı kontrol edin. sorun nedir teşekkürler
Вложения
-
50.7 KB Просмотры: 8