Участник
Пользователь
- Сообщения
- 391
- Реакции
- 106
- Помог
- 2 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
- Ошибка
-
Не работает выдача флага в bonus.ini AES
- ОС
- Linux
- Amx Mod X
-
1.9.0.5249
- Билд
-
3.6.0.672
- ReGamedll
-
5.9.0.363
- Версия Metamod
-
Metamod-r v1.3.0.128
- Список метамодулей
-
[ 1] Reunion RUN - reunion_mm_i386.so v0.1.0.92 ini Start Never
[ 2] WHBlocker RUN - whblocker_mm_i386.so v1.5.696 ini ANY
[ 3] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC3 ini ANY
[ 4] ReSemiclip RUN - resemiclip.so v2.3.9 ini ANY
[ 5] Rechecker RUN - rechecker_mm_i386.so v2.5 ini ANY
[ 6] ReAuthCheck RUN - reauthcheck.so v0.1.6 ini Start Never
[ 7] ReSRDetector RUN - resrdetector_mm_i386.so v0.1.0 ini ANY
[ 8] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5249 ini ANY
[ 9] YaPB RUN - yapb.so v2.10 ini ANY
[10] MySQL RUN - mysql_amxx_i386.so v1.9.0.5249 pl8 ANY
[11] ReAPI RUN - reapi_amxx_i386.so v5.9.0.177-dev pl8 ANY Never
[12] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl8 ANY Never
[13] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5249 pl8 ANY
[14] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5249 pl8 ANY
[15] Engine RUN - engine_amxx_i386.so v1.9.0.5249 pl8 ANY
[16] CSX RUN - csx_amxx_i386.so v1.9.0.5249 pl8 ANY
[17] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5249 pl8 ANY
[18] Fun RUN - fun_amxx_i386.so v1.9.0.5249 pl8 ANY
18 plugins, 18 running
- Список плагинов
-
[ 1] CSStatsX SQL 0.7.4+2 serfreeman1337 csstatsx_sql.am debug
[ 2] DevMsCore 1.2 gyxoBka devms_core.amxx running
[ 3] DevMs CSSTATS 0.1.1 AlexandrFiner devcsru.amxx running
[ 4] Admin Loader 3.5 neygomon admin_loader.am running
[ 5] DevMs PlayerMenu 1.0 gyxoBka DevMs_PlayerMen running
[ 6] DevMs BlackList 1.5.1 gyxoBka DevMs_BlackList debug
[ 7] [183] Ultimate Weapons 18.08.08BE SKAJIbnEJIb ultimate_weapon running
[ 8] DevMs Flag 1.0 gyxoBka DevMs_Flag.amxx running
[ 9] AES: StatsX 0.5+1 serfreeman1337 aes_statsx_cstr running
[ 10] [183] Ultimate Gag 19.02.05BE SKAJIbnEJIb ultimate_gag.am running
[ 11] [ReAPI][183] Ultimate 17.08.28 SKAJIbnEJIb ultimate_gag_re running
[ 12] Time for info 1.0 neugomon time_for_info.a running
[ 13] Knife WarnUP 2.0 Alik & Inline & knife_warnupAli stopped
[ 14] Advanced Client Checke 0.3.7 Mistrick cmdchecker.amxx debug
[ 15] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a debug
[ 16] FreshBans 1.4.0b kanagava fresh_bans_140_ running
[ 17] [183] Screen Player 19.02.22 SKAJIbnEJIb screen_player.a running
[ 18] [CS] Dead Alltalk 0.1 Allied dead_alltalk.am running
[ 19] Check Players Online 1.0 breakt cpo2.amxx running
[ 20] [183] VIP RBS 18.08.08BE SKAJIbnEJIb vip_rbs.amxx running
[ 21] Maps Menu 1.4.1 neugomon mapsmenu.amxx running
[ 22] Map Manager 2.5.61 Mistrick mapmanager.amxx running
[ 23] [183] Blind RBS 18.12.29 SKAJIbnEJIb blind_rbs.amxx running
[ 24] TimeProjector 0.1 ST4life timeprojector.a running
[ 25] KnifeDuel Improved 15.07.15 NIXON knifeduel_impro debug
[ 26] LBZ 1.0 ill lbz2.amxx debug
[ 27] Admin Chat 1.8.3-dev+ AMXX Dev Team adminchat.amxx running
[ 28] Admin Commands 1.8.3-Re AMXX Dev Team admincmd.amxx running
[ 29] CS Misc. Stats 1.9.0.5221 AMXX Dev Team miscstats.amxx running
[ 30] CSXSQL: Onlinetime Awa 0.2 serfreeman1337 csstatsx_playti running
[ 31] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 32] Say me and Say hp 1.4 neygomon sayme_reapi.amx running
[ 33] Commands Menu 1.8.3-Re AMXX Dev Team cmdmenu.amxx running
[ 34] Menus Front-End 1.5 untest neugomon menufront_end.a running
[ 35] Players Menu 1.7 neugomon players_menu.am running
[ 36] Restrict Weapons 1.8.3-Re AMXX Dev Team restmenu.amxx running
[ 37] Admin Votes 1.9.0.5234 AMXX Dev Team adminvote.amxx running
[ 38] Lite Admin ESP 1.0 neygomon admin_esp.amxx running
[ 39] DemoRecoder 1.1 neygomon amx_demorec.amx running
[ 40] Advert Messages 1.2.2 neygomon adverts_dead.am running
[ 41] GameName Changer 1.0 neugomon gamename_change running
[ 42] LogsRemove 1.0 melo4 logsremove.amxx running
[ 43] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 44] Show Admins Online 1.1 vato loco [GE-S] show_admin_onli running
[ 45] [183] AfkKicker RBS 17.10.30 SKAJIbnEJIb afkkicker_rbs.a running
[ 46] DHUD_Adverts_Deads 1.3.1 pUzzlik dhud_message_de running
[ 47] [183] Damager RBS 17.12.22 SKAJIbnEJIb damager_rbs.amx running
[ 48] Slots Reservation 1.2 pUzzlik admin_slots.amx running
[ 49] [ReAPI] Lite TeamBalan 2.3 neugomon lite_balancer_s running
[ 50] Proxy Detetor HackForums.Ru proxy_detector. running
[ 51] Block grande info 1.0 neygomon BlockGrenadeInf running
[ 52] Ping Control 1.31 neygomon ping_control.am running
[ 53] [ReAPI] Custom Models 1.6 neugomon custom_models.a running
[ 54] Kick Spamers 1.0.3 gyxoBka KickSpamer30.am debug
[ 55] Chat Manager 1.1.2-16 Mistrick chatmanager.amx running
[ 56] Chat Manager: Addon 0.0.4-70 Mistrick chatmanager_add running
[ 57] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 58] FM ResetScore 0.1 neygomon fm_rs.amxx running
[ 59] Kill Knife ADMIN 1.0 Seroff killadmin.amxx running
[ 60] Parachute 1.3 Fixed KRoT@L/JTP10181 parachute.amxx running
[ 61] Block Spawn For Reconn 0.3 Bos93, Subb98 block_spawn_for running
[ 62] Block Change Name 1.0 DJ_WEST block_change_na running
[ 63] precashe 1.0 stalin precashe.amxx running
[ 64] End Round Music 2.0 Sho0ter endroundmusic.a running
[ 65] Stats Configuration 1.8.3-dev+ AMXX Dev Team statscfg.amxx running
[ 66] Mode 2x2 2.5re s1lent mode.amxx running
[ 67] Spectator Banner Ads 0.1.16 iG_os spec_banner_ads running
[ 68] In-Game Ads(MastaMan E 1.83 (Edit stupok in_game_ads_Mas running
[ 69] [ReAPI] AWPoff 1.4.3 PAffAEJIkA :3 awp_off.amxx running
[ 70] GameRules Info 1.2 shadow GameRulesInfo.a running
[ 71] SlayNoobs 1.0 neygomon slay_noobs.amxx running
[ 72] Bomb Taker 0.0.1b Vaqtincha bomb_taker.amxx running
[ 73] sky by mapname 0.2 mx?! sky_by_mapname. running
[ 74] MENU 1.5 AmFeTaM1n menu.amxx running
[ 75] Kills Counter 1.0 No KillsCounter.am running
[ 76] SF Bets 0.1.5 serfreeman1337 sf_bets.amxx running
[ 77] ReTalisman 1.3.1 gyxoBka ReTalisman.amxx running
[ 78] Nice Killer 1.7 Got Milk? / HoHo nice_killer.amx running
[ 79] warning_dhud_gs 0.1 stalin_alex warning_dhud_gs running
[ 80] Advanced Experience Sy 0.5.9 [REA serfreeman1337/s aes_main.amxx running
[ 81] AES: CStrike Addon 0.5.9 [REA serfreeman1337/s aes_exp_cstrike running
[ 82] AES: Informer 0.5.9 [REA serfreeman1337/s aes_informer.am running
[ 83] AES: Admin Tools 0.5.9 [REA serfreeman1337/s aes_exp_editor. running
[ 84] AES: Bonus System 0.5.9 Vega serfreeman1337/s aes_bonus_syste running
[ 85] AES: Bonus CSTRIKE 0.5.9.1 [R serfreeman1337/s aes_bonus_cstri debug
[ 86] AES Bonus: Flags 0.1 Sonyx aes_bonus_flags running
- Автор плагина
- Sonyx
- Версия плагина
- AES Bonus: Flags 0.1
- Исходный код
-
#include <amxmodx>
#include <sqlx>
#if AMXX_VERSION_NUM < 183
#include <colorchat>
#endif
forward amxbans_sql_initialized(Handle:sqlTuple, const dbPrefix[]);
forward fbans_sql_connected(Handle:sqlTuple);
forward lite_bans_sql_init(Handle:sqlTuple);
enum (+=1) {
NONE = 0,
AMX,
FB,
LB
}
enum _:qState { AddOne, AddTwo }
new g_System = NONE;
new Handle:g_DBTuple;
new g_TableAdmins[100], g_TableSAdmins[100], g_TableSInfo[100], g_ServerIp[25];
new g_szQuery[1024], g_Data[2];
public plugin_init()
{
#define PNAME "AES Bonus: Flags"
#define PVERSION "0.2"
#define PAUTHOR "Sonyx"
register_plugin(PNAME, PVERSION, PAUTHOR);
}
public amxbans_sql_initialized(Handle:sqlTuple, const dbPrefix[])
{
if (g_System != NONE) {
return PLUGIN_CONTINUE;
}
g_DBTuple = sqlTuple;
g_System = AMX;
formatex(g_TableAdmins, charsmax(g_TableAdmins), "%s_amxadmins", dbPrefix);
formatex(g_TableSInfo, charsmax(g_TableSInfo), "%s_serverinfo", dbPrefix);
formatex(g_TableSAdmins, charsmax(g_TableSAdmins), "%s_admins_servers", dbPrefix);
get_cvar_string("amxbans_server_address", g_ServerIp, charsmax(g_ServerIp));
if (!g_ServerIp[0]) {
get_user_ip(0, g_ServerIp, charsmax(g_ServerIp), 0);
}
return PLUGIN_CONTINUE;
}
public lite_bans_sql_init(Handle:sqlTuple)
{
new dbPrefix[64];
if (g_System != NONE) {
return PLUGIN_CONTINUE;
}
g_DBTuple = sqlTuple;
g_System = LB;
get_cvar_string("lb_sql_pref", dbPrefix, charsmax(dbPrefix));
formatex(g_TableAdmins, charsmax(g_TableAdmins), "%s_amxadmins", dbPrefix);
formatex(g_TableSInfo, charsmax(g_TableSInfo), "%s_serverinfo", dbPrefix);
formatex(g_TableSAdmins, charsmax(g_TableSAdmins), "%s_admins_servers", dbPrefix);
get_cvar_string("lb_server_ip", g_ServerIp, charsmax(g_ServerIp));
if (!g_ServerIp[0]) {
get_user_ip(0, g_ServerIp, charsmax(g_ServerIp), 0);
}
return PLUGIN_CONTINUE;
}
public fbans_sql_connected(Handle:sqlTuple)
{
new i_Ip[16], i_Port[8];
if (g_System != NONE) {
return PLUGIN_CONTINUE;
}
g_DBTuple = sqlTuple;
g_System = FB;
if (!get_cvar_string("amx_amxadmins_table", g_TableAdmins, charsmax(g_TableAdmins)))
g_TableAdmins = "amx_amxadmins";
if (!get_cvar_string("amx_admins_table", g_TableSAdmins, charsmax(g_TableSAdmins)))
g_TableSAdmins = "amx_admins_servers";
get_cvar_string("fb_servers_table", g_TableSInfo, charsmax(g_TableSInfo));
get_cvar_string("fb_server_ip", i_Ip, charsmax(i_Ip));
get_cvar_string("fb_server_port", i_Port, charsmax(i_Port));
formatex(g_ServerIp, charsmax(g_ServerIp), "%s:%s", i_Ip, i_Port);
return PLUGIN_CONTINUE;
}
public SQL_Handler(failstate, Handle:query, err[], errcode, dt[], datasize)
{
switch(failstate)
{
case TQUERY_CONNECT_FAILED, TQUERY_QUERY_FAILED:
{
log_amx("[SQL ERROR #%d][Query State %d] %s", errcode, dt[0], err);
SQL_FreeHandle(query);
return;
}
}
switch(dt[0])
{
case AddOne:
{
g_Data[0] = AddTwo;
new szAuth[25], iID = SQL_GetInsertId(query);
get_user_authid(dt[1], szAuth, charsmax(szAuth));
formatex(g_szQuery, charsmax(g_szQuery), "INSERT INTO %s (admin_id, server_id, custom_flags, use_static_bantime) VALUES ('%d', (SELECT id FROM %s WHERE address = '%s'), '', 'no')", g_TableSAdmins, iID, g_TableSInfo, g_ServerIp);
SQL_ThreadQuery(g_DBTuple, "SQL_Handler", g_szQuery, g_Data, sizeof(g_Data));
}
case AddTwo:
{
SQL_FreeHandle(query);
server_cmd("amx_reloadadmins");
}
}
}
public pointBonus_GiveFlags(id, flags[], days)
{
if(!flags[0] || !days)
return 0;
if (g_System == NONE)
{
client_print_color(id, id, "^4[AES] ^3Отсутствует подключение к Базе!");
return 0;
}
if (get_user_flags(id) & read_flags(flags))
{
client_print_color(id, id, "^4[AES] ^3У вас уже есть данная привилегия!");
return 0;
}
new szAuth[25], szName[32], szPlayerEnd;
get_user_authid(id, szAuth, charsmax(szAuth));
get_user_name(id, szName, charsmax(szName));
szPlayerEnd = get_systime() + days * 86400;
g_Data[0] = AddOne;
g_Data[1] = id;
formatex(g_szQuery, charsmax(g_szQuery), "INSERT INTO %s (username, access, flags, steamid, nickname, ashow, created, expired, days) VALUES ('%s', '%s', 'ce', '%s', '%s', '0', UNIX_TIMESTAMP(NOW()), '%d', '%d')", g_TableAdmins, szAuth, flags, szAuth, szName, szPlayerEnd, days);
SQL_ThreadQuery(g_DBTuple, "SQL_Handler", g_szQuery, g_Data, sizeof(g_Data));
return 1;
}
Необходимо получить определённый набор флагов (для теста пробую получить хотя бы один флаг) при достижении максимального армейского звания AES
[spawn]
<call>
plugin = aes_bonus_flags.amxx
name = Вип ветерану
function = pointBonus_GiveFlags
flags = t
;flag = ~t
levels = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1
days = 3
Ничего не выдаётся Что интересно, что в чате при этом пишется:
[AES] Ваши бонусы: HE, Flash, Deagle, Найтвижен, Броня, Вип ветерану, но при этом остаётся флаг "z"
Если зайти с флагом t, тогда в чате пишется [AES] У вас уже есть данная привилегия!
Какие мысли ребят?
[spawn]
<call>
plugin = aes_bonus_flags.amxx
name = Вип ветерану
function = pointBonus_GiveFlags
flags = t
;flag = ~t
levels = -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 1
days = 3
Ничего не выдаётся
1 Окт 2019
[AES] Ваши бонусы: HE, Flash, Deagle, Найтвижен, Броня, Вип ветерану, но при этом остаётся флаг "z"
Если зайти с флагом t, тогда в чате пишется [AES] У вас уже есть данная привилегия!
Какие мысли ребят?