Неверный раздел форума
- Ошибка
-
Нужна помощь с флагом доступа.
- Список плагинов
-
[ 1] Admin Base 1.9.0.5294 AMXX Dev Team admin.amxx running
[ 2] Admin Commands 1.9.0.5294 AMXX Dev Team admincmd.amxx running
[ 3] Slots Reservation 1.9.0.5294 AMXX Dev Team adminslots.amxx running
[ 4] Multi-Lingual System 1.9.0.5294 AMXX Dev Team multilingual.am running
[ 5] Commands Menu 1.9.0.5294 AMXX Dev Team cmdmenu.amxx running
[ 6] Players Menu 1.9.0.5294 AMXX Dev Team plmenu.amxx running
[ 7] Maps Menu 1.9.0.5294 AMXX Dev Team mapsmenu.amxx running
[ 8] Admin Chat 1.9.0.5294 AMXX Dev Team adminchat.amxx running
[ 9] Anti Flood 1.9.0.5294 AMXX Dev Team antiflood.amxx running
[ 10] Scrolling Message 1.9.0.5294 AMXX Dev Team scrollmsg.amxx running
[ 11] Info. Messages 1.9.0.5294 AMXX Dev Team imessage.amxx running
[ 12] Admin Votes 1.9.0.5294 AMXX Dev Team adminvote.amxx running
[ 13] NextMap 1.9.0.5294 AMXX Dev Team nextmap.amxx running
[ 14] Nextmap Chooser 1.9.0.5294 AMXX Dev Team mapchooser.amxx running
[ 15] TimeLeft 1.9.0.5294 AMXX Dev Team timeleft.amxx running
[ 16] Pause Plugins 1.9.0.5294 AMXX Dev Team pausecfg.amxx running
[ 17] Stats Configuration 1.9.0.5294 AMXX Dev Team statscfg.amxx running
[ 18] CS Stats Logging 1.9.0.5294 AMXX Dev Team stats_logging.a running
[ 19] Register System 5.0 m0skVi4a ;] RegisterSystem. running
[ 20] Battlefield 2: Rank Mo 1.5.5 SnakeEyes* bf2rank.amxx running
[ 21] StatsX (MastaMan Editi 1.8.1.3746 AMXX Dev Team & statsx_shell.am running
[ 22] Server AMXMODMENU [INI 1.0 Leo_[BH] amxmodmenu.amxx running
[ 23] Weapon Icon 1.2 hoboman313/Zenix weapon_icon.amx running
[ 24] AFK Kicker 1.0b Cheesy Peteza afkkicker.amxx running
[ 25] Ping Control 1.31 neygomon ping_control.am running
[ 26] Hostname Timeleft 1.0 xPaw HostnameTimelef running
[ 27] Back Weapons 1.1 Cheap_Suit backweapons.amx running
[ 28] Ultimate Sound 1.5 Dizzy ultimate_sounds running
[ 29] HATS 0.2 SgtBane Hats02.amxx running
[ 30] Game Menu 1.1 DJ_WEST & Lukman gamemenu.amxx running
[ 31] Kills Counter 1.0 Safety1st killscounter.am running
[ 32] Simple Redirection 1.1 MyHost simple_redirect running
[ 33] Best Player 1.0 MyHost best_player_not running
[ 34] RockTheVote 1.8 DA rockthevote_cus running
[ 35] Custom Models 1.3.2 neugomon custom_models.a running
[ 36] Killa HP 1.0 jas0n killa_hp.amxx running
[ 37] Swear Replacement 1.5 kaboomkazoom swear_replaceme running
[ 38] Vampire 1.0c Shalfey vampire.amxx running
[ 39] lite screen fade 1.0 vk.com/kazcs16_k lite_screen_fad running
[ 40] Welcome Music 1.0 Jack Daniel's welcome_music.a running
[ 41] Server Menu 1.0 mx?! server_menu.amx running
[ 42] Reset Score 0.2 Silenttt / CepeH RESET_SCORE_V0. running
[ 43] Admin Check 1.51 OneEyed admin_check.amx running
[ 44] Reklama 20.05.2020 mx?! reklama.amxx running
[ 45] Block grande info 1.0 Insane block_fire.amxx running
[ 46] No Slash 0.1 Insane Block_slash.amx running
[ 47] Admin Prefixes 4.1 m0skVi4a ;] admin_prefixes. running
[ 48] Weapons Skins Manager 0.0.1 Vaqtincha weapons_skins_m running
[ 49] Player Model 2.13c commonbullet playermodel.amx running
[ 50] Damager 1.0 DUKKHAZ0R dmg.amxx running
[ 51] ReCSDM Main 3.6 ReCSDM Team csdm_main.amxx running
[ 52] ReCSDM Equip 3.6 ReCSDM Team csdm_equip.amxx running
[ 53] ReCSDM Spawns 3.6 ReCSDM Team csdm_spawn_pres running
[ 54] ReCSDM Misc 3.6 ReCSDM Team csdm_misc.amxx running
[ 55] ReCSDM Stripper 3.6 KWo csdm_stripper.a running
[ 56] ReCSDM Protection 3.6 BAILOPAN csdm_protection running
56 plugins, 56 running
- Версия SourceMod
-
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.13.0.788-dev
Build date: 07:37:36 Jul 12 2023 (3378)
Build from: https://github.com/dreamstalker/rehlds/commit/f955b07
- ОС
- Windows
- Версия Metamod
-
Metamod-r v1.3.0.138, API (5:13)
Metamod-r build: 11:50:30 Nov 28 2023
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/5179c25
- Исходный код
-
#include <amxmodx>
#include <fun>
#define PLUGIN_VERSION "1.0c"
new health_add
new health_hs_add
new health_max
new nKiller
new nKiller_hp
new nHp_add
new nHp_max
public plugin_init()
{
register_plugin("Vampire", PLUGIN_VERSION, "Shalfey")
health_add = register_cvar("amx_vampire_hp", "15")
health_hs_add = register_cvar("amx_vampire_hp_hs", "40")
health_max = register_cvar("amx_vampire_max_hp", "100")
register_event("DeathMsg", "hook_death", "a", "1>0")
}
public hook_death(id)
{
if(get_user_flags(id) & ADMIN_KICK)
{
// Killer id
nKiller = read_data(1)
if ( (read_data(3) == 1) && (read_data(5) == 0) )
{
nHp_add = get_pcvar_num (health_hs_add)
}
else
nHp_add = get_pcvar_num (health_add)
nHp_max = get_pcvar_num (health_max)
// Updating Killer HP
nKiller_hp = get_user_health(nKiller)
nKiller_hp += nHp_add
// Maximum HP check
if (nKiller_hp > nHp_max) nKiller_hp = nHp_max
set_user_health(nKiller, nKiller_hp)
// Hud message "Бонус +15/+40 хп"
set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
show_hudmessage(nKiller, "Бонус +%d хп", nHp_add)
// Screen fading
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, nKiller)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
write_byte(0)
write_byte(0)
write_byte(200)
write_byte(75)
message_end()
}
else
{
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
Плагин работает, но выдаёт всем hp при убийстве, нужна помощь в исходном коде, что бы выдавал hp по флагу доступа, попробовал аналоги плагина от других авторов, в список плагинах Running, а в игре не работают, думаю конфликтуют с другими плагинами типо screen fade.