Drop health kit from dead player.
(At least works in Counter-Strike:Source, maybe other mods)
cvars (plugin not generate config file)
Quote:
hfd_mode "0"
// 1 = change model to healthvial
// 2 = dissolve effect
// 4 = work suicide
// 8 = work teamkill
// 16 = Emit sound only to client
// 32 = no block for healthkits
// 64 = Print hint text to player who gain heal
// min. 0
hfd_lifetime "20.0"
//How long healthkit stay. Less than 1.0 second disable
// min. 0.0
hfd_maxheal "100"
// Max heal
// min. 2.0
hfd_heal "20"
// How much healthkit heal player
// Using random values "min , max"
// min. 1
hfd_dissolvetype "0"
//Change dissolvetype (work better in HL2MP)
// 0 Energy
// 1 Heavy electrical
// 2 Light electrical
// 3 Core effect
|
How hfd_mode works ?
Simple, if you want use another model (1), dissolve effect (2) and play sound that only picker can hear it (16).
1 + 2 + 16 = 19
Set hfd_mode "19"
modes
1 = You can change to another healthkit model (looks like flashbang)
2 = Enable dissolve effect
4 = Healthkit will drop when player suicide
8 = Healthkit will drop when teamkill
(HL2MP use this when deathmatch "1", if I remember right)
16 = Picker can hear sound only, not others.
32 = No block to healthkits, players can walk trough them. (Can't kick kits anymore)
64 = Print hint text to player who pick healthkit
128 = Bots can't pick healthkits
256 = Bots don't drop healthkits
How hfd_heal works ?
hfd_heal "20" = healthkit will give +20HP to picker.
hfd_heal "5 , 20" = will give +?HP between min. and max. randomly.
Installation
-
This plugin needs SDKHooks extension to get work !!
- Move
healthkit_from_dead.smx your server
...addons/sourcemod/plugins/ -folder
Compile plugin source code *.sp
- Required
SDKHooks
For CSGO default medkits from HL2, are packed in zip.
Credits to
original plugin by Knagg0
Healthkit On Death
env_entity_dissolver by altex
KnifeFight
PS. Tell if you get any wierd bug
I want another healthkit model, buuhuu! read me!
To change model, edit plugins source code and compile yourself
WARNING
Wrong path to model file what not exist in server files or
bad model will crash server and popup error!
- Test model from on your computer before add in your server (make dedicated server, add mods plugins).
- Look from SourceSDK (from ModelViewer or Hammer) have model
Physics / Collision
- To upload new files to players, use
SM File/Folder Downloader and Precacher
- In sv_pure 1 mode, put pure_server_whitelist.txt in order.
Some models what already exist in certain mod (players not need download)
You found this part in plugin source code.
Change model, remove double slash front of line and //comment previous one
Code:
// Below, you can replace/edit second model path to use different model.
// WARNING!
// Model file need exist in server and have "collision"/"physic", otherwise server crash and hang up.
// HL2MP and all mods
#define healthvial "models/healthvial.mdl" // This is now in use
//#define healthvial "models/healthkit.mdl"
// Dod:s
//#define healthvial "models/props_misc/ration_box01.mdl"
// TF2
//#define healthvial "models/items/medkit_large.mdl"
//#define healthvial "models/items/medkit_medium.mdl"
//#define healthvial "models/items/medkit_small.mdl"
//#define healthvial "models/items/medkit_medium_bday.mdl"
//#define healthvial "models/items/medkit_small_bday.mdl"
// DON'T USE THESE! These not have collision/physic !! Sorry late warning.
//#define healthvial "models/props_halloween/halloween_medkit_large.md"
//#define healthvial "models/props_halloween/halloween_medkit_medium.md"
//#define healthvial "models/props_halloween/halloween_medkit_small.md"
*IMG made by
GrO