Участник
Пользователь
- Сообщения
- 59
- Реакции
- 21
- Предупреждения
- 10
- Помог
- 1 раз(а)
Неверный раздел форума
- Ошибка
-
нет
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.9.0.5234 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Nov 3 2018 14:55:29
Built from: https://github.com/alliedmodders/amxmodx/commit/9eb1f42
Build ID: 5234:9eb1f42
Core mode: JIT+ASM32
- Билд
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.4.0.669-dev
Build date: 18:21:09 Mar 29 2019 (1812)
Build from: https://github.com/dreamstalker/rehlds/commit/f6822e3
- ReGamedll
-
ReGameDLL version: 5.7.0.327-dev
Build date: 14:56:22 Apr 9 2019
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d674924
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
[ 1] Reunion RUN - reunion.so v0.1.0.133 ini Start Never
[ 2] ReAuthCheck RUN - reauthcheck.so v0.1.6 ini Start Never
[ 3] Rechecker RUN - rechecker.so v2.5 ini Chlvl ANY
[ 4] ReSemiclip RUN - resemiclip.so v2.3.9 ini Chlvl ANY
[ 5] ReSRDetector RUN - resrdetector.so v0.1.0 ini Chlvl ANY
[ 6] WHBlocker RUN - whblocker.so v1.5.695 ini Chlvl ANY
[ 7] VoiceTranscoder RUN - vtc.so v2017RC3 ini ANY ANY
[ 8] AMX Mod X RUN - amxmodx_mm_i386.so v1.9.0.5234 ini Start ANY
[ 9] MySQL RUN - mysql_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[10] MySQL Threads RUN - mysqlt_amxx_i386.so v1.2 pl8 ANY ANY
[11] Fun RUN - fun_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[12] Engine RUN - engine_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[13] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[14] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[15] CSX RUN - csx_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[16] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5234 pl8 ANY ANY
[17] ReAPI RUN - reapi_amxx_i386.so v5.8.0.166-dev pl8 ANY Never
[18] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl8 ANY Never
[19] ReDM API RUN - redm_api_amxx_i386.so v1.3.3.7 pl8 ANY Never
- Список плагинов
-
[ 1] Anticheat 3.1.6 ctr52 anticheat.amxx running
[ 2] Advanced Gag 1.9.0 neygomon amx_gag.amxx running
[ 3] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 4] Admin Loader 3.5 neygomon admin_loader_3. running
[ 5] FreshBans 1.4.0b kanagava fresh_bans_140_ running
[ 6] Knife DeathMatch: VIP 1.0.3 Salvatore vipmenu.amxx running
[ 7] Bhop Menu 1.2a gyxoBka BhopMenu.amxx running
[ 8] Admin VGK 1.0 Stimul give_equipment. running
[ 9] Rock to Ban 1.02 Safety1st rock2ban.amxx running
[ 10] [183] Demo Recorder RB 18.02.08 SKAJIbnEJIb demorecorder_rb running
[ 11] [183] High Ping Kicker 18.05.15 SKAJIbnEJIb hpk_rbs.amxx running
[ 12] Parachute for ALL [ReA 3.0 Leo_[BH] parachute_for_a running
[ 13] ReDeathMatch 2.6.7.2 ReDM Dev Team ReDeathMatch.am running
[ 14] Micro Army Rank System 1.29Hz_p1 Ge3eR MARS_1.29Hz.amx running
[ 15] [183] CsStats MySQL 18.08.09 SKAJIbnEJIb csstats_mysql.a running
- Автор плагина
- Salvatore
- Версия плагина
- 1.0.3
- Исходный код
-
#include <amxmodx>
#include <reapi>
#pragma ctrlchar '\'
#pragma semicolon 1
#if !defined MAX_PLAYERS
#define MAX_PLAYERS 32
#endif
new const PLUGIN_NAME[] = "Knife DeathMatch: VIP Menu";
new const PLUGIN_VERSION[] = "1.0.3";
new const PLUGIN_AUTHOR[] = "Salvatore";
new const MESSAGE_PREFIX[] = "VIPMENU";
enum any: Items
{
ItemGravity,
ItemSpeed,
ItemExplosiveGrenade,
ItemMultijump,
ItemInvisiblity,
ItemMoney,
ItemHealthPoints
} new bool: gbPlayerAttachedItems[MAX_PLAYERS + 1][Items], giPlayerUsedItems[MAX_PLAYERS + 1][Items];
enum MethodType
{
MethodSteam,
MethodName,
MethodIP
};
enum Config
{
//main section
BitsAccess,
MethodType: SaveMethod,
//items_limit section
ItemsLimit[Items],
ItemsAmount[Items]
} new gConfig[Config];
new giMenuCallback;
new Trie: gpMapVector;
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
RegisterHookChain(RG_CBasePlayer_Spawn, "HC_CBasePlayer_Spawn_Post", 1);
RegisterHookChain(RG_CBasePlayer_ResetMaxSpeed, "HC_CBasePlayer_ResetMaxSpeed");
RegisterHookChain(RG_CBasePlayer_Jump, "HC_CBasePlayer_Jump_Post", 1);
giMenuCallback = menu_makecallback("VM_Callback");
register_dictionary("vipmenu.txt");
}
public client_putinserver(player)
{
arrayset(giPlayerUsedItems[player], 0, Items);
arrayset(gbPlayerAttachedItems[player], false, Items);
if (~get_user_flags(player) & gConfig[BitsAccess])
return PLUGIN_CONTINUE;
new szMethodInfo[32];
switch (gConfig[SaveMethod])
{
case MethodSteam: get_user_authid(player, szMethodInfo, charsmax(szMethodInfo));
case MethodName: get_user_name(player, szMethodInfo, charsmax(szMethodInfo));
case MethodIP: get_user_ip(player, szMethodInfo, charsmax(szMethodInfo), true);
}
TrieGetArray(gpMapVector, szMethodInfo, giPlayerUsedItems[player], Items) && TrieDeleteKey(gpMapVector, szMethodInfo);
return PLUGIN_CONTINUE;
}
public client_disconnected(player)
{
if (~get_user_flags(player) & gConfig[BitsAccess])
return PLUGIN_CONTINUE;
new szMethodInfo[32];
switch (gConfig[SaveMethod])
{
case MethodSteam: get_user_authid(player, szMethodInfo, charsmax(szMethodInfo));
case MethodName: get_user_name(player, szMethodInfo, charsmax(szMethodInfo));
case MethodIP: get_user_ip(player, szMethodInfo, charsmax(szMethodInfo), true);
}
TrieSetArray(gpMapVector, szMethodInfo, giPlayerUsedItems[player], Items);
return PLUGIN_CONTINUE;
}
public HC_CBasePlayer_Spawn_Post(const this)
{
if (is_user_alive(this))
{
new /*bool:*/ bOldMultiJumpState = gbPlayerAttachedItems[this][ItemMultijump];
arrayset(gbPlayerAttachedItems[this], 0, Items);
rg_reset_maxspeed(this);
rg_set_rendering(this);
if (bOldMultiJumpState && !gConfig[ItemsLimit][ItemMultijump])
gbPlayerAttachedItems[this][ItemMultijump] = true;
}
}
public HC_CBasePlayer_ResetMaxSpeed(const this)
{
if (gbPlayerAttachedItems[this][ItemSpeed])
{
SetHookChainReturn(ATYPE_INTEGER, 0);
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}
public HC_CBasePlayer_Jump_Post(const this)
{
if (!gbPlayerAttachedItems[this][ItemMultijump])
return;
static iJumps;
if (get_entvar(this, var_flags) & FL_ONGROUND)
{
iJumps = 0;
return;
}
if (~get_entvar(this, var_flags) & FL_ONGROUND && ~get_entvar(this, var_oldbuttons) & IN_JUMP && ++iJumps < gConfig[ItemsAmount][ItemMultijump])
{
new Float: flVelocity[3];
get_entvar(this, var_velocity, flVelocity);
flVelocity[2] = random_float(250.0, 300.0);
set_entvar(this, var_velocity, flVelocity);
return;
}
}
public ClientCommand_VM(const this)
{
new iMenu = menu_create(fmt("\\w%L", this, get_user_flags(this) & gConfig[BitsAccess] ? "MENU_TITLE_ACCESS" : "MENU_TITLE_NOACCESS"), "VM_Handler");
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_GRAVITY"), "1", .callback = giMenuCallback);
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_SPEED"), "2", .callback = giMenuCallback);
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_EXPLOSIVE"), "3", .callback = giMenuCallback);
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_MULTIJUMP", gConfig[ItemsAmount][ItemMultijump]), "4", .callback = giMenuCallback);
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_INVISIBLITY"), "5", .callback = giMenuCallback);
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_MONEY", gConfig[ItemsAmount][ItemMoney]), "6", .callback = giMenuCallback);
menu_additem(iMenu, fmt("\\w%L", this, "MENU_ITEM_HP", gConfig[ItemsAmount][ItemHealthPoints]), "7", .callback = giMenuCallback);
menu_setprop(iMenu, MPROP_NEXTNAME, fmt("\\w%L", this, "MENU_NEXTNAME"));
menu_setprop(iMenu, MPROP_BACKNAME, fmt("\\w%L", this, "MENU_BACKNAME"));
menu_setprop(iMenu, MPROP_EXITNAME, fmt("\\w%L", this, "MENU_EXITNAME"));
menu_display(this, iMenu, 0);
return PLUGIN_HANDLED;
}
public VM_Handler(const this, const menu, const item)
{
if (item == MENU_EXIT)
return menu_destroy(menu);
giPlayerUsedItems[this][item]++;
switch (item)
{
case ItemGravity:
{
set_entvar(this, var_gravity, gConfig[ItemsAmount][ItemGravity]);
gbPlayerAttachedItems[this][item] = true;
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_GRAVITY", gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
}
case ItemSpeed:
{
set_entvar(this, var_maxspeed, gConfig[ItemsAmount][ItemSpeed]);
gbPlayerAttachedItems[this][item] = true;
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_SPEED", gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
}
case ItemExplosiveGrenade:
{
rg_has_item_by_name(this, "weapon_hegrenade") ? rg_set_user_bpammo(this, WEAPON_HEGRENADE, rg_get_user_bpammo(this, WEAPON_HEGRENADE) + 1) : rg_give_item(this, "weapon_hegrenade");
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_EXPLOSIVE", gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
}
case ItemMultijump:
{
gbPlayerAttachedItems[this][item] = gConfig[ItemsLimit][ItemMultijump] ? true : !gbPlayerAttachedItems[this][item];
if (gConfig[ItemsLimit][ItemMultijump])
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_MULTIJUMP", gConfig[ItemsAmount][item], gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
else
{
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, gbPlayerAttachedItems[this][item] ? "USE_ITEM_MULTIJUMP_ENABLED" : "USE_ITEM_MULTIJUMP_DISABLED");
ClientCommand_VM(this);
}
}
case ItemInvisiblity:
{
rg_set_rendering(this, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, gConfig[ItemsAmount][ItemInvisiblity]);
gbPlayerAttachedItems[this][item] = true;
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_INVISIBLITY", gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
}
case ItemMoney:
{
rg_add_account(this, gConfig[ItemsAmount][ItemMoney]);
gbPlayerAttachedItems[this][item] = true;
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_MONEY", gConfig[ItemsAmount][ItemMoney], gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
}
case ItemHealthPoints:
{
set_entvar(this, var_health, float(gConfig[ItemsAmount][ItemHealthPoints]));
gbPlayerAttachedItems[this][item] = true;
client_print_color(this, print_team_default, "\4[%s]\1 %L", MESSAGE_PREFIX, this, "USE_ITEM_HP", gConfig[ItemsAmount][ItemHealthPoints], gConfig[ItemsLimit][item] - giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]);
}
}
return menu_destroy(menu);
}
public VM_Callback(const this, const menu, const item)
{
new szItemName[64], iDummyInt;
menu_item_getinfo(menu, item, iDummyInt, szItemName, charsmax(szItemName), szItemName, charsmax(szItemName), iDummyInt);
if (~get_user_flags(this) & gConfig[BitsAccess])
{
remove_all_colors(szItemName, charsmax(szItemName));
menu_item_setname(menu, item, fmt("\\d%s %L", szItemName, this, "MENU_ITEM_NOACCESS"));
return ITEM_DISABLED;
}
if (!gConfig[ItemsLimit][item] && item == ItemMultijump)
{
menu_item_setname(menu, item, fmt("%s %L", szItemName, this, gbPlayerAttachedItems[this][ItemMultijump] ? "MENU_ITEM_STATE_DISABLE" : "MENU_ITEM_STATE_ENABLE"));
return ITEM_IGNORE;
}
if (gConfig[ItemsLimit][item] && giPlayerUsedItems[this][item])
{
new iItemState = giPlayerUsedItems[this][item] >= gConfig[ItemsLimit][item] ? ITEM_DISABLED : ITEM_IGNORE;
iItemState && remove_all_colors(szItemName, charsmax(szItemName));
menu_item_setname(menu, item, fmt("%s %L", szItemName, this, iItemState ? "MENU_ITEMS_LEFT_DISABLED" : "MENU_ITEMS_LEFT", giPlayerUsedItems[this][item], gConfig[ItemsLimit][item]));
return iItemState;
}
return ITEM_IGNORE;
}
public plugin_cfg()
{
new szFile[PLATFORM_MAX_PATH];
get_localinfo("amxx_configsdir", szFile, charsmax(szFile));
add(szFile, charsmax(szFile), "/vm_settings.ini");
new INIParser: pHandle = INI_CreateParser();
INI_SetReaders(pHandle, "ParserRead_KeyValue");
!INI_ParseFile(pHandle, szFile) && set_fail_state("Config %s not found", szFile);
gpMapVector = TrieCreate();
}
const TOKEN_NOTFOUND = -1;
public ParserRead_KeyValue(INIParser:handle, const key[], const value[], bool:invalid_tokens, bool:equal_token, bool:quotes, curtok, any:data)
{
if (equal(key, "access"))
gConfig[BitsAccess] = read_flags(value);
else if (equal(key, "save_method"))
gConfig[SaveMethod] = MethodType: str_to_num(value);
else if (equal(key, "cmd_open"))
{
new szBuffer[256], szCmd[32];
copy(szBuffer, charsmax(szBuffer), value);
while (strtok2(szBuffer, szCmd, charsmax(szCmd), szBuffer, charsmax(szBuffer), ',', true) != TOKEN_NOTFOUND)
{
register_clcmd(szCmd, "ClientCommand_VM");
szBuffer[0] != EOS && register_clcmd(szBuffer, "ClientCommand_VM");
}
}
else if (contain(key, "maxcount") != TOKEN_NOTFOUND)
{
switch (key[0])
{
case 'g': gConfig[ItemsLimit][ItemGravity] = str_to_num(value);
case 's': gConfig[ItemsLimit][ItemSpeed] = str_to_num(value);
case 'e': gConfig[ItemsLimit][ItemExplosiveGrenade] = str_to_num(value);
case 'j': gConfig[ItemsLimit][ItemMultijump] = str_to_num(value);
case 'i': gConfig[ItemsLimit][ItemInvisiblity] = str_to_num(value);
case 'm': gConfig[ItemsLimit][ItemMoney] = str_to_num(value);
case 'h': gConfig[ItemsLimit][ItemHealthPoints] = str_to_num(value);
}
}
else if (contain(key, "amount") != TOKEN_NOTFOUND)
{
switch (key[0])
{
case 'g': gConfig[ItemsAmount][ItemGravity] = any: str_to_float(value);
case 's': gConfig[ItemsAmount][ItemSpeed] = any: str_to_float(value);
case 'j': gConfig[ItemsAmount][ItemMultijump] = str_to_num(value);
case 'i': gConfig[ItemsAmount][ItemInvisiblity] = str_to_num(value);
case 'm': gConfig[ItemsAmount][ItemMoney] = str_to_num(value);
case 'h': gConfig[ItemsAmount][ItemHealthPoints] = str_to_num(value);
}
}
return true;
}
stock remove_all_colors(buffer[], const len)
{
replace_all(buffer, len, "\\r", NULL_STRING);
replace_all(buffer, len, "\\y", NULL_STRING);
replace_all(buffer, len, "\\d", NULL_STRING);
replace_all(buffer, len, "\\w", NULL_STRING);
}
stock rg_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
new Float:renderColor[3];
renderColor[0] = float(r);
renderColor[1] = float(g);
renderColor[2] = float(b);
set_entvar(entity, var_renderfx, fx);
set_entvar(entity, var_rendercolor, renderColor);
set_entvar(entity, var_rendermode, render);
set_entvar(entity, var_renderamt, float(amount));
}
Всем привет нужна небольшая помощь сам не могу разобраться как добавить команду /knife из другого плагина в меню этого плагина .
Добавить в данное меню строчку под номером 8 Меню ножей.
Помогите если у кого то будет время.
Добавить в данное меню строчку под номером 8 Меню ножей.
Помогите если у кого то будет время.
В этой теме было размещено решение! Перейти к решению.