AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Healthkit from dead (https://forums.alliedmods.net/showthread.php?t=172523)

Bacardi 11-21-2011 18:48

Healthkit from dead
 
5 Attachment(s)
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

UPDATE healthkit_from_dead.smx





I want another healthkit model, buuhuu! read me!
To change model, edit plugins source code and compile yourself


*IMG made by GrO

KyleS 11-22-2011 00:58

Re: Healthkit from dead
 
Taken from the SDK in regards to your comment.

PHP Code:

enum SolidFlags_t
{
    
FSOLID_CUSTOMRAYTEST        0x0001,    // Ignore solid type + always call into the entity for ray tests
    
FSOLID_CUSTOMBOXTEST        0x0002,    // Ignore solid type + always call into the entity for swept box tests
    
FSOLID_NOT_SOLID            0x0004,    // Are we currently not solid?
    
FSOLID_TRIGGER                0x0008,    // This is something may be collideable but fires touch functions
                                            // even when it's not collideable (when the FSOLID_NOT_SOLID flag is set)
    
FSOLID_NOT_STANDABLE        0x0010,    // You can't stand on this
    
FSOLID_VOLUME_CONTENTS        0x0020,    // Contains volumetric contents (like water)
    
FSOLID_FORCE_WORLD_ALIGNED    0x0040,    // Forces the collision rep to be world-aligned even if it's SOLID_BSP or SOLID_VPHYSICS
    
FSOLID_USE_TRIGGER_BOUNDS    0x0080,    // Uses a special trigger bounds separate from the normal OBB
    
FSOLID_ROOT_PARENT_ALIGNED    0x0100,    // Collisions are defined in root parent's local coordinate space
    
FSOLID_TRIGGER_TOUCH_DEBRIS    0x0200,    // This trigger will touch debris objects

    
FSOLID_MAX_BITS    10
}; 


Bacardi 11-22-2011 02:15

Re: Healthkit from dead
 
thanks Kyles

micazoid 11-22-2011 02:16

Re: Healthkit from dead
 
Nice Work Bacardi. Will test this asap.

One Question:
Quote:

modes
1 = You can change to another healthkit model (looks like flashbang)
Since the other Plugin seems to be abandoned, I am asking here:
Is it possible to set a third model, which will fit more into the WW2 scenario of Day of Defeat:Source, or the western scenario of FoF.

I am aware, that this is a Modspecific thing, but maybe a cvar for a custom model would be my suggestion for this case.
I am using the old Plugin and my clients get used to the HalfLife model, but I think, that a Healthpack that fits more into WW2-Style would be nice ^^

Bacardi 11-22-2011 03:00

Re: Healthkit from dead
 
I'll try add this feature

Snake60 11-22-2011 09:59

Re: Healthkit from dead
 
Good job, man :up: Went test it...

TheLaser 11-22-2011 23:21

Re: Healthkit from dead
 
Bacardi,

Just installed this in my HL2DM win2008 server ...

appears to work great !!! "GOOD WORK !!"

will let you know in a few days if any problems come up ,

and we thank you :up:

Powerlord 11-23-2011 15:05

Re: Healthkit from dead
 
I noticed this is marked as All games. However, it would seem to me that the HL2 medkits would look out of place in TF2.

TF2 has its own models for health kits: models/items/medkit_medium.mdl and models/items/medkit_small.mdl for the two smallest, although you could be fancy and use the TF Birthday models instead: models/items/medkit_medium_bday.mdl and medkit_small_bday.mdl

For that matter, TF2 doesn't cap HP at 100, but deal in percents instead (iirc)... 25% of max HP for the small medkit, 50% of max HP for the medium medkit, and 100% of max HP for the large medkit.

TheLaser 11-23-2011 17:26

Re: Healthkit from dead
 
Powerlord,

I think he had it default to 100 Health for a starting point .. I have it set for 250 and its working fine so its not a cap of 100 .
Also i have it 100 Health per pickup too :mrgreen:

micazoid 11-24-2011 03:33

Re: Healthkit from dead
 
@Powerlord
Your "Problem" with the models is the same as mine here. And I think a cvar to set custommodels would be the best solution. With this cvar the plugin will stay modindependend.


All times are GMT -4. The time now is 23:29.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.