Raised This Month: $32 Target: $400
 8% 

[L4D & L4D2] Feeding Medicines v1.3 [10-December-2022]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Plugin ID:
8004
Plugin Version:
1.3
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
Servers with this Plugin:
2 
Plugin Description:
why you guys dont eat pills
Old 03-14-2022 , 09:27   [L4D & L4D2] Feeding Medicines v1.3 [10-December-2022]
Reply With Quote #1

about
  • i cant tolerate i cannot heal my best friend using pills or adren anymore then this plugin appear
  • hold use key to feeding teammate using pills or adrenaline, and make pills and adrenaline completely like first aid kit
  • progress bar is allow on healer or teammate
  • allow turn overflow health or play reject sound when health reached max
  • thirdparty plugins also compatible
  • allow reward feeder temp health or health
  • play healing animation to feeder


ConVar

PHP Code:
// which action doing when medicine feeded 1=Pills buff 2=Adrenaline and buff 4=pills event 8=adren event -1=All 0=Disabled
feeding_medicines_actions "-1"

// which medicines allow feeding for teammate 1=Pills 2=Adrenaline -1=Both 0=why you install this plugin
feeding_medicines_allows "-1"

// use duration of feeding a medicine (remarks: l4d1 use integer)
feeding_medicines_duration "2.0"

// limit of health max -1=Use first_aid_kit_max_heal
feeding_medicines_max "-1"

// rate of turn the overflow temp health to real health when reached max, 0.5: turn as half 0: disable 1: completely turn
feeding_medicines_overflow "0.5"

// which targets showing feeding progress bar 1=Feeder 2=Be Feeding -1=Both 0=Disable
feeding_medicines_progress "-1"

// health reward of feeder -10=10 buff health 15=15 health 0=disabled
feeding_medicines_reward "-10"

// allow player feeding him self 1=allow feed self 2=also reward health
feeding_medicines_self "2"

// play healing animation on healer
feeding_medicines_anim "1" 

Related Plugin

todo
  • add support to l4d1


changelog
  • v1.0 just releases; 14-March-2022
  • v1.1 new features:
    add sound effects support 'adren start', 'adren injected', 'pills start', 'pills used', 'pills ate',
    optional feeding self,
    optional reward feeder health or buff health,
    fix issue 'feeding to an incapped player'; 16-March-2022
  • v1.2 new features:
    healing anim support
    wont aggresive stops unreleated progress bar
  • v1.2.1 fix issue 'feeding_medicines_allows not work proper', support online compile; 23-March-2022
  • v1.2.2 fix issue 'be feeding target sometime stuck on third person view', change animation work way to solve unknown performance issue; 27-April-2022
  • v1.2.3 add support for l4d1, fix some adrenaline duration incorrect; 6-November-2022
  • v1.2.4 swap the sequence between fire event and health given, to solve compatibility of third-party plugins; 20-November-2022
  • v1.2.5 try to add support for l4d1, but not tested ; 28-November-2022
  • v1.2.6 fixes
    - fix an unknown issue (about animation hooks) cause conflict to '[L4D & L4D2] Incapped Weapons Patch' v1.16 and newer ,
    - turn code style to hungarian notation, make animation work way to more effective, remove deprecated IsValidHandle(),
    - trying support l4d1; 9-December-2022
  • v1.3 now officially support l4d1, fix some progress bar wrong target on l4d1; 10-December-2022


Installation
Attached Images
File Type: jpg heal teammate use adren.jpg (72.9 KB, 602 views)
Attached Files
File Type: sp Get Plugin or Get Source (l4d_feeding_medicines.sp - 385 views - 21.2 KB)
__________________

Last edited by NoroHime; 12-09-2022 at 23:29. Reason: update
NoroHime is offline
Maur0
Senior Member
Join Date: Aug 2020
Old 03-14-2022 , 19:24   Re: [L4D & L4D2] Feeding Medicines v1.0 [14-March-2022]
Reply With Quote #2

Every time you are creating such cool plugins that serve me a lot, especially to combine with the adrenaline powerup plugin. Thank you very much!

One little thing I wanted to ask you. Since I saw that you can even apply yourself as a first aid kit. It is possible to add an option to apply or not to your companions and to yourself. Since the objective of this I only want to apply it to my partners, since there is that option to apply to yourself and avoid not hitting me because I failed to grab my partner. More than that, thank you
Maur0 is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-14-2022 , 20:34   Re: [L4D & L4D2] Feeding Medicines v1.0 [14-March-2022]
Reply With Quote #3

Quote:
Originally Posted by Maur0 View Post
Every time you are creating such cool plugins that serve me a lot, especially to combine with the adrenaline powerup plugin. Thank you very much!

One little thing I wanted to ask you. Since I saw that you can even apply yourself as a first aid kit. It is possible to add an option to apply or not to your companions and to yourself. Since the objective of this I only want to apply it to my partners, since there is that option to apply to yourself and avoid not hitting me because I failed to grab my partner. More than that, thank you
option already has there, you can set feeding_medicines_progress to let which target showing progress bar
plugin not seriously tested, report problem if encounted
__________________

Last edited by NoroHime; 03-14-2022 at 20:35.
NoroHime is offline
Wizards
Junior Member
Join Date: Oct 2021
Old 03-14-2022 , 23:12   Re: [L4D & L4D2] Feeding Medicines v1.0 [14-March-2022]
Reply With Quote #4

Quote:
Originally Posted by NoroHime View Post
about
  • i cant tolerate i cannot heal my best friend using pills or adren anymore then this plugin appear
  • make pills and adrenaline completely like first aid kit
  • progress bar is allow on healer or teammate
  • allow turn overflow health or play reject sound when health reached max
  • thirdparty plugins also compatible


ConVar

PHP Code:
// which action doing when medicine feeded 1=Pills buff 2=Adrenaline and buff 4=pills event 8=adren event -1=All 0=Disabled
feeding_medicines_actions "-1"

// which medicines allow feeding for teammate 1=Pills 2=Adrenaline -1=Both 0=why you install this plugin
feeding_medicines_allows "-1"

// use duration of feeding a medicine
feeding_medicines_duration "2.0"

// limit of health max -1=Use first_aid_kit_max_heal
feeding_medicines_max "-1"

// rate of turn the overflow temp health to real health when reached max, 0.5: turn as half 0: disable 1: completely turn
feeding_medicines_overflow "0.5"

// which targets showing feeding progress bar 1=Feeder 2=Be Feeding -1=Both 0=Disable
feeding_medicines_progress "-1" 

Related Plugin

changelog
  • v1.0 just releases; 14-March-2022

todo
  • try play healing animation when feeding


Installation
  • Dont Click Get Plugin since [L4D & L4D2] Left 4 DHooks Direct is Required, or you download .sp compile yourself
  • Download l4d_feeding_medicines.smx and put on /plugins/
Awesome!!! It's really fun, there is some idea in my brain. Could you add more function for that?
Plugin will have 2 function
- Func 1: Survivor can use pill/adrenaline as normal, that's get 50 Temporary Health point as default setting game.
- Func 2: Using pill/adrenaline like medkit and get 25 Base Health (maybe use combine key like E+LM...).
btw, thank for ur plugin, it's pretty fun
p/s: my english is bad
Wizards is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-15-2022 , 01:00   Re: [L4D & L4D2] Feeding Medicines v1.0 [14-March-2022]
Reply With Quote #5

Quote:
Originally Posted by Wizards View Post
Awesome!!! It's really fun, there is some idea in my brain. Could you add more function for that?
Plugin will have 2 function
- Func 1: Survivor can use pill/adrenaline as normal, that's get 50 Temporary Health point as default setting game.
- Func 2: Using pill/adrenaline like medkit and get 25 Base Health (maybe use combine key like E+LM...).
btw, thank for ur plugin, it's pretty fun
p/s: my english is bad
I don't know what your mean, extra reward for healer?
or just extra health for teammate just using [L4D & L4D2] Bonus Healing , third-party plugin should compatible
for function 1, you mean healing himself? well why not eat directly, plugin work way is "using a teammate", you may not using on yourself lol
__________________

Last edited by NoroHime; 03-15-2022 at 01:01.
NoroHime is offline
Maur0
Senior Member
Join Date: Aug 2020
Old 03-15-2022 , 01:06   Re: [L4D & L4D2] Feeding Medicines v1.0 [14-March-2022]
Reply With Quote #6

Quote:
Originally Posted by NoroHime View Post
option already has there, you can set feeding_medicines_progress to let which target showing progress bar
plugin not seriously tested, report problem if encounted
Oh it's true. Now I understand that command well. Great, it works perfectly. Thank you very much! ;)
Maur0 is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-16-2022 , 04:21   Re: [L4D & L4D2] Feeding Medicines v1.1 [16-March-2022]
Reply With Quote #7

update
Quote:
ConVar
PHP Code:
// health reward of feeder -10=10 buff health 15=15 health 0=disabled
feeding_medicines_reward "-10"

// allow player feeding him self 1=allow feed self 2=also reward health
feeding_medicines_self "2" 
changelog
  • v1.1 new features:
    add sound effects support 'adren start', 'adren injected', 'pills start', 'pills used', 'pills ate',
    optional feeding self,
    optional reward feeder health or buff health,
    fix issue 'feeding to an incapped player'; 16-March-2022
animation handle is so hard, i can hook but cant i dont known how play specify animation using left 4 dhooks direct
__________________
NoroHime is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-16-2022 , 04:43   Re: [L4D & L4D2] Feeding Medicines v1.1 [16-March-2022]
Reply With Quote #8

Quote:
Originally Posted by NoroHime View Post
animation handle is so hard, i can hook but cant i dont known how play specify animation using left 4 dhooks direct
The test plugin shows how to hook and change animation using "return Plugin_Changed;" to override the "anim" value. Using the pre-hook is better since you only need 1 value per animation (the ACT_* defines). Now that may or may not work to change the animation since the animation system is complex with many layers.
__________________

Last edited by Silvers; 03-16-2022 at 04:45.
Silvers is offline
NoroHime
Veteran Member
Join Date: Aug 2016
Location: bed
Old 03-16-2022 , 07:32   Re: [L4D & L4D2] Feeding Medicines v1.1 [16-March-2022]
Reply With Quote #9

Quote:
Originally Posted by Silvers View Post
The test plugin shows how to hook and change animation using "return Plugin_Changed;" to override the "anim" value. Using the pre-hook is better since you only need 1 value per animation (the ACT_* defines). Now that may or may not work to change the animation since the animation system is complex with many layers.
oh yea it work great like
PHP Code:
public Action OnAnimation(int clientint &sequence) {

    if (
IsValidHandle(feeding_timer[client]) && isAliveHumanSurvivor(client)) {

        
sequence AnimGetFromActivity("ACT_TERROR_HEAL_FRIEND");

        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

should i use IsValidHandle to check timer? i noticed it mark deprecated on SM1.10
__________________
NoroHime is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 03-16-2022 , 14:26   Re: [L4D & L4D2] Feeding Medicines v1.1 [16-March-2022]
Reply With Quote #10

I would recommend using the Pre animation if possible, that way you only need to use the L4D1_ACT_TERROR_HEAL_FRIEND and L4D2_ACT_TERROR_HEAL_FRIEND enums instead of using AnimGetFromActivity which would add some more overhead (very little though).

IsValidHandle shouldn't be required, if a client disconnects all hooks for them are removed.
__________________
Silvers is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:30.


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