[L4D2] Drop weapon when punched (v1.1)
1 Attachment(s)
[L4D2] Drop weapon when punched (v1.1)
About: This is my first plugin that I'm posting here. I didn't notice anything like this when I got the idea... It makes you drop your weapon (Primary and Secondary only) when you get hit by a tank. To be fair your pistols/magnum will not be removed and you will be given a pistol if your melee weapon is dropped (as if you were incapacitated). This pistol will automatically be removed when you pick up another secondary weapon (other than a pistol) Cvars: l4d2_dwp_version - Self explanatory l4d2_dwp_enabled (Default: 1) - Is plugin enabled? 1=Yes, 0=No l4d2_dwp_drop_chainsaw (Default: 1) - Will you drop chainsaw if you get hit? 1=Yes, 0=No l4d2_dwp_drop_melee (Default: 1) - Will you drop melee weapon if you get hit? 1=Yes, 0=No l4d2_dwp_drop_when_incapped (Default: 0) - Will you drop weapon if you get incapped? 1=Yes, 0=No l4d2_dwp_give_pistol (Default: 1) - Will you get a pistol if you drop your melee weapon? 1=Yes, 0=No Note:
Changelog v1.1 Did as Silvers suggested v1.0 Release Credits: Machine (for [L4D2] Weapon Drop) McFlurry (for [L4D2] Melee Mode v1.6.3 *Update*) mi123645 (for a bit of code i used) CrazzyMonkey (for testing it out) and the rest is mentioned in the source. |
Re: [L4D2] Drop weapon when punched (v1.0)
The plugin works now! :wink:
|
Re: [L4D2] Drop weapon when punched (v1.0)
Code:
L 10/09/2010 - 16:03:37: SourceMod error session started |
Re: [L4D2] Drop weapon when punched (v1.0)
I'll look into it when i get home tomorrow. Were you taking damage from the world at the time?
|
Re: [L4D2] Drop weapon when punched (v1.0)
Hey, I can't replicate that error.. can you tell me what was going on at the time?
|
Re: [L4D2] Drop weapon when punched (v1.0)
You should check that client is not invalid on line 111. Invalid being 0. Clients start from an index of 1. The IsValidClient() function does this, but you put GetClientTeam before the function checks.
PHP Code:
Quote:
Hope it helps |
Re: [L4D2] Drop weapon when punched (v1.1)
Gonna give it a try...maybe it will make coop a bit more hardcore ;)
|
Re: [L4D2] Drop weapon when punched (v1.1)
Nice plugin!
Manually adding to your ammo offset is a bit sketch :P You should probably also add an else check in your DropSlot function to see if a weapon is actually 'dropped', otherwise I can see an error happening when the client has no weapons and is hit. Regardless, cool concept :) |
Re: [L4D2] Drop weapon when punched (v1.1)
I have a request - is it possible to create a new mod so that when you are holding a pipebomb/molotov/bile and get punched - those objects go flying as well?
Example) Tank punches you while you are holding the molotov in hand..... molotov goes flying and bursts on the ground somewhere. |
Re: [L4D2] Drop weapon when punched (v1.1)
Doesn't seem to be working anymore after the update.
|
All times are GMT -4. The time now is 09:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.