AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D/L4D2] Self-Help (Reloaded) | 0.3 : October 11, 2019 | (https://forums.alliedmods.net/showthread.php?t=281620)

cravenge 04-15-2016 21:56

[L4D/L4D2] Self-Help (Reloaded) | 0.3 : October 11, 2019 |
 
4 Attachment(s)
Description:

Tired of not being able to do anything while capped by special infected or incapacitated? Want to be useful other than just shoot until you die or someone helps you? Look no further.

This plugin allows downed players to help themselves using their health items or other downed teammates if they don't have any. Mostly recommended for situations where the team still has a hope of continuing or when survivors want to get free from their attacker.

ConVars:
PHP Code:

// Version of this plugin.
self_help_version "0.3"

// Enable/Disable plugin?
self_help_enable "1"

// Items in a helpless survivor's inventory to be consumed later for achieving self-helping:
// 
// 1 = Pills/Adrenalines
// 2 = First aid kits
// 3 = Both (has a smart feature included)
// 
self_help_use "3"

// Let incapacitated survivors be able to pickup nearby items needed for self-helping?
self_help_incap_pickup "1"

// How long before troubled survivors are able to start self-helping?
self_help_delay "1.0"

// Does the plugin kill a self-helping survivor's attacker after they're done? (If there are any.)
// Note: Setting this cvar to "0" will result in the attacker stumbling instead.
// 
self_help_kill_attacker "1"

// Enable/Disable plugin functionality for bots?
self_help_bot "1"

// Chance given for bots to self-help themselves:
// 
// 1 = Sometimes
// 2 = Often
// 3 = Seldom
// 
self_help_bot_chance "1"

// Amount of permanent health rewarded upon completion of self-help.
// Note: This cvar is ignored on purpose when medkits are used.
// 
self_help_hard_hp "50"

// Amount of permanent health rewarded upon completion of self-help.
// Note: This cvar is ignored on purpose when medkits are used.
// 
self_help_temp_hp "50.0"

// Maximum number of times a survivor can self-help before going into black and white state.
// Note: This is created for L4D1 only and will serve as a substitute for the "survivor_max_incapacitated_count" cvar.
// 
self_help_max_count "3" 

Commands:
None.

To Do:
> Provide an indication (i.e animation) for survivors who are currently helping themselves.
> Nullify all attempts to revive a survivor everytime they crawl or try to help themselves to go well
with the one above.

Credits:
Changelog:
Code:

10-11-2019 (Version 0.3):
+ Changed the pass flag of OnStaggered's SDKType_Vector parameter from SDKPass_ByRef to SDKPass_Pointer as Dragokas suggested.
+ Reposted gamedata file due to a little oversight.

10-10-2019 (Version 0.29):
+ *L4D2 only* Plugin now listens to defibrillator related events as well.
+ *L4D2 only* Adrenaline effects will take place immediately right after helping self.
+ (Hopefully) Blocked incapacitated and hanging ambient sounds after helping self.
+ New colored chat and better worded hint box notifications. :3
+ Most of the bugs introduced in its predecessor have been fixed.

02-23-2019 (Version 0.15):
X First release.
+ Infected will no longer hear ambient sounds coming from incapacitated and/or hanging survivors.
+ Time before self-helping is complete now follows whatever value the "survivor_revive_duration" cvar is set to with a 0.1 second delay.


SELL 04-16-2016 16:15

Re: [L4D2] Modified Self-Help
 
//// self-help.sp
//
// C:*******\Desktop\self-help.sp(64) : error 001: expected token: ",", bu
t found "-identifier-"
// C:********\Desktop\self-help.sp(64) : error 017: undefined symbol "Self"

// C:********\Desktop\self-help.sp(64) : error 017: undefined symbol "Help"

// C:********\Desktop\self-help.sp(64) : fatal error 189: too many error me
ssages on one line
//
// Compilation aborted.
// 4 Errors.

MasterMind420 04-17-2016 04:23

Re: [L4D2] Modified Self-Help
 
2 Attachment(s)
Hey, sorry hope you don't mind, i'm ocd when it comes to coding...I corrected the two loose indentation warnings on compile. Your a busy enough guy with all your coding, why bother with it, I got you...lol.

SELL 04-17-2016 12:50

Re: [L4D2] Modified Self-Help
 
Can I add bots to add yourself to get up and help themselves boxes of ammunition and defib ))))

Alexmy 04-24-2016 07:36

Re: [L4D2] Modified Self-Help
 
Hi, I have a question.
If you upgrade the plugins that are outdated, why you do not put them but the new syntax?

Alexmy 04-24-2016 11:10

Re: [L4D2] Modified Self-Help
 
Quote:

Originally Posted by cravenge (Post 2413811)
I got used to the old syntax but it still works and compiles with no errors. Hmm, I think I'll starting typing the new syntax. Oh, and BTW, your plugin still has the same bug with or without this plugin.

I can go to your L4D server and watch for error? ip plz

Alexmy 04-24-2016 11:43

Re: [L4D2] Modified Self-Help
 
I could not find my server, but you can try to go to my server, if you find there is an error please let me know.
ip 46.174.52.26:27201

MasterMind420 05-08-2016 17:52

Re: [L4D2] Modified Self-Help
 
1 Attachment(s)
Hey cravenge figured i'd help you out with the loose indentation warnings on compile, i've discovered something that causes the loose indentations. If using Notepad++, or possibly others...if the code is perfectly tabbed, and not spaced at all, you will get no loose indentation warnings, even if the code looks like its been tabbed on the line of the warning, backspace it to see if there were spaces instead of a tab, these are what causes the loose indentations...

SELL 05-10-2016 13:37

Re: [L4D2] Modified Self-Help
 
L 05/10/2016 - 20:17:03: [SM] Displaying call stack trace for plugin "self-help.smx":
L 05/10/2016 - 20:17:03: [SM] [0] Line 917, C:Desktop\self-help.sp::SelfHelp()
L 05/10/2016 - 20:17:03: [SM] [1] Line 323, C:Desktop\self-help.sp::ReviveBotSelf()
L 05/10/2016 - 20:17:43: [SM] Native "RemovePlayerItem" reported: NULL not allowed

MasterMind420 05-15-2016 19:39

Re: [L4D2] Modified Self-Help
 
Hey cravenge, I have a thought on this, if you don't get to it when I have time I may do it, 2 things... 1 would be to make a 4th option for not requiring anything to self revive, ledge revive and so forth... 2 would be to setup convars to disable each and every aspect based on peoples needs, enable/disable self incap revive, self ledge revive, other player revive, and so on, just a thought on making it highly configurable to the people using it...I could see with those features alone this plugin replacing all others...


All times are GMT -4. The time now is 05:40.

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