[L4D] L4DNoSmoking (v1.0.5, 2019-07-23)
2 Attachment(s)
Description:
This plugin prevents the smoker from smoking the last survivor. It checks for the following status: 1 survivor running around the other survivors dead, incapped, pounced, smoked, smoked from ledge, hanging from ledge or falling from ledge. Tested on L4D1. Included conditions for L4D2 but untested. Feature: Use cfg to set the server to automatically slap the smoker to break his tongue or kill the smoker, when he tries to smoke the last survivor. CVAR/Command list: killorslap (default=1) 1 = kill smoker / 2 = slap smoker displaykillmessage (default=3) 0 - Disabled; 1 - small HUD Hint; 2 - big HUD Hint ; 3 - Chat Notification Changelog: 2019-07-20 (v1.0.0) * Initial release. 2019-07-21 (v1.0.1) * Code cleanup and added language support by Aya Supay 2019-07-23 (v1.0.5) * Code cleanup and added language support by Aya Supay * new code for handling survivors and cleanup by Lux Installation instructions: Click 'Get Plugin' button, place SMX in the sourcemod plugins folder. Or compile it yourself. Download 'l4d_nosmoking.phrases.txt' and place it in translations folder. Dependencies: none Plans: none atm Credits: Based on code snippets from: * [L4D, L4D2] No Death Check Until Dead * https://forums.alliedmods.net/showthread.php?t=142432 * [L4D & L4D2] Survivor Bot Takeover v0.8 * https://forums.alliedmods.net/showthread.php?p=1192594 * xZk TeleportEntity suggestion to break tongue * Aya Supay code cleanup and added language support * Lux for different approach on tongue_grab and code cleanup |
Re: [L4D] L4DNoSmoking (v1.0.0, 2019-07-20)
This plugin sounds beautiful. I've always been personally annoyed how smokers tend to unfairly deny clutch wins with their insane range, especially when you have a survivor fighting hordes / groups of the other specials.
|
Re: [L4D] L4DNoSmoking (v1.0.0, 2019-07-20)
Quote:
nice job :up: :bacon!: the code update a bit and add language support enjoy :oops: |
Re: [L4D] L4DNoSmoking (v1.0.1, 2019-07-21)
Wow man, that looks more like a complete rewrite. hahaha
I uploaded your version to the first post. :up: |
Re: [L4D] L4DNoSmoking (v1.0.1, 2019-07-21)
Works great and has overall improved the health of the game. I use the slap version since it seems pretty unfair to just outright kill the smoker. If you plan on doing more plugins I have a request in mind finishlast. How about damage immunity for 1 pound on the charger? That way he can actually finish his already slolw enough attack at least once before dieing since even with 600 health chargers seem to die as fast as boomers.
|
Re: [L4D] L4DNoSmoking (v1.0.1, 2019-07-21)
Unfortunatelly I'm not playing L4D2 and and have no server to do that.
I think it would be possible to use this plugin maybe, turn everything off in the cfg except: // Enables Survivor Aegis ability: While charging, the Charger will use the Survivor as an Aegis to absorb damage it would receive. (Def 1) l4d_ucm_survivoraegis "1" // Percent of damage the Charger avoids using a Survivor as an Aegis. (Def 0.2) l4d_ucm_survivoraegisamount "100.0" // How much damage is inflicted to the Survivor being used as an Aegis. (Def 5) l4d_ucm_survivoraegisdamage "0" So it would protect the charger 100%? MB that works. https://forums.alliedmods.net/showthread.php?p=2092125 newest version on the last page. Or you could go to the ideas forum and ask someone to turn this script here into your wanted behavior: It needs to be tweaked from tank to charger and needs a changed damage type, then maybe a hook on chargingstart to make him bullet- and fireproof and chargingend to make him normal again. But mb you just test the script mentioned above. https://forums.alliedmods.net/showpo...1&postcount=11 ************************** I just witnessed an issue with L4DNoSmoking in Aya Supay version. The server had 4 surviors running around and 4 infected and 2 spectators. The plugin slapped the smoker for smoking last but obviously there were still 4 up, or maybe 1 attacked by hunter (didnt see that though) OK what I found out so far, the variable survivors is 0 sometimes and incappedcount stays 0 too so 0-0=0 = slapkill I have a feeling it happens when there are 8 players and a spectator but that is just a feeling, not proved. The error must be here: if (IsClientInGame(i) && IsFakeClient(i) && GetClientTeam(i) == 2 && IsPlayerAlive(i) && GetClientHealth(i) > 0 ) and here if (IsClientInGame(i) && IsFakeClient(i) && GetClientTeam(i) == 2) the only reason why the variables could stay 0. Any ideas? Why do you check for IsFakeClient? Think we can get rid of the && GetClientHealth(i) > 0 as well. Went back to 1.0.0 for download atm, have to understand what is wrong. |
Re: [L4D] L4DNoSmoking (v1.0.1, 2019-07-21)
Quote:
|
Re: [L4D] L4DNoSmoking (v1.0.1, 2019-07-21)
It is a good idea to use new syntax, if you wish to use new add this directive
PHP Code:
Below i thought i would show you a better way of writing it removing what you don't need from how i understand your code, this could just break your whole thing. PHP Code:
PHP Code:
PHP Code:
e.g "Event event" PHP Code:
Spoiler
|
Re: [L4D] L4DNoSmoking (v1.0.0, 2019-07-22)
That looks very good and gets rid of a lot of useless variables.
You did: Code:
cvar_killorslap = CreateConVar("killorslap", "1", "1 kill smoker or 2 slap smoker", CVAR_FLAGS, true, 1.0, true, 2.0); When using it on the displaykillmessage with 0-3 would it be: Code:
CreateConVar("displaykillmessage", "3", " 0 - Disabled; 1 - small HUD Hint; 2 - big HUD Hint; 3 - Chat Notification ", CVAR_FLAGS, true, 0.0, true, 3.0); I think when you have a plugin that allows multiple smoker or when you zspawn them, the plugin would fail to detect that, right? I could just let out the victim check then? Code:
if (IS_VALID_SURVIVOR(i) && i != victim)// ignore the survivor getting smoked Code:
L 07/23/2019 - 11:42:25: [SM] Blaming: L4DNoSmoking1.0.4.smx |
Re: [L4D] L4DNoSmoking (v1.0.0, 2019-07-22)
2 Attachment(s)
here the code :wink:
|
All times are GMT -4. The time now is 03:34. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.