Raised This Month: $12 Target: $400
 3% 

[L4D2] Weapon Drop


Post New Thread Reply   
 
Thread Tools Display Modes
MarshalZCC
Senior Member
Join Date: Feb 2010
Location: Alberta, Canada
Old 09-01-2010 , 23:07   Re: [L4D2] Weapon Drop
Reply With Quote #21

You may want a cvar that selects between "hunting_knife" and "knife" if you plan on adding this in.
MarshalZCC is offline
nagypocak
Member
Join Date: Jul 2010
Old 09-05-2010 , 19:17   Re: [L4D2] Weapon Drop
Reply With Quote #22

Quote:
Originally Posted by MarshalZCC View Post
Knife support:

Code:
#define MODEL_V_KNIFE "models/v_models/v_knife_t.mdl"
Code:
else if (StrEqual(item, MODEL_V_KNIFE))
{
    DispatchKeyValue(index, "model", MODEL_V_KNIFE);
    DispatchKeyValue(index, "melee_script_name", "hunting_knife");
}
NOTE: This assumes using a modified VPK that adds knife support using "hunting_knife.txt". The original german version is "knife.txt"
Cool

and as for Riotshield I guess it would be:
Code:
#define MODEL_V_RIOTSHIELD "models/weapons/melee/v_riotshield.mdl"
Code:
else if (StrEqual(item, MODEL_V_RIOTSHIELD))
{
    DispatchKeyValue(index, "model", MODEL_V_RIOTSHIELD);
    DispatchKeyValue(index, "melee_script_name", "riotshield");
}
with the same assumption, a VPK adding support to riotshield.txt script
nagypocak is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-29-2010 , 19:53   Re: [L4D2] Weapon Drop
Reply With Quote #23

I would suggest replacing this
PHP Code:
        RemovePlayerItem(clientGetPlayerWeaponSlot(clientslot)); 
with

PHP Code:
        new item GetPlayerWeaponSlot(clientslot);
        
AcceptEntityInput(item"kill"); 
]Because RemovePlayerItem() simply does not delete the entity, but removes/drops it from the player.

__________________

Last edited by Silvers; 04-23-2012 at 15:05. Reason: replaced RemoveEdict with AcceptEntityInput (its safer)
Silvers is offline
MarshalZCC
Senior Member
Join Date: Feb 2010
Location: Alberta, Canada
Old 11-29-2010 , 21:17   Re: [L4D2] Weapon Drop
Reply With Quote #24

Isn't that the point?
MarshalZCC is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 11-29-2010 , 21:33   Re: [L4D2] Weapon Drop
Reply With Quote #25

Not if the plugins creating a new entity and applying the previous settings (ammo, upgrades etc).
__________________
Silvers is offline
MarshalZCC
Senior Member
Join Date: Feb 2010
Location: Alberta, Canada
Old 11-29-2010 , 21:55   Re: [L4D2] Weapon Drop
Reply With Quote #26

Ah, I understand now. Good catch.
MarshalZCC is offline
Machine
Senior Member
Join Date: Apr 2010
Old 03-21-2011 , 04:13   Re: [L4D2] Weapon Drop
Reply With Quote #27

Updated to 1.3

EDIT: The gamedata currently only has the signature for windows as I don't have access to a linux server. Anyone be so kind as to find the linux signature for weapon_drop?

Last edited by Machine; 03-21-2011 at 04:32.
Machine is offline
TheSuggestioner
Member
Join Date: Aug 2011
Location: USA, Connecticut
Old 08-25-2011 , 16:38   Re: [L4D2] Weapon Drop
Reply With Quote #28

You should add an option for forcing some players to drop weapons.
(sm_drop (name, @me, @alive, etc)
Yes, of course, that feature should be root admin only.
__________________
Roses are Red
Violets are blue,
Not a big surprise
If a Tank kills you!
TheSuggestioner is offline
Akhenamon
Junior Member
Join Date: Apr 2006
Old 12-19-2011 , 11:43   Re: [L4D2] Weapon Drop
Reply With Quote #29

Since there aren't any version for linux, I need to get back my working version 1.2.
Could someone make a post with this plugin v1.2 (the source file) , please? I really need it.
Akhenamon is offline
Machine
Senior Member
Join Date: Apr 2010
Old 12-20-2011 , 00:46   Re: [L4D2] Weapon Drop
Reply With Quote #30

I uploaded the older version for linux users. I still haven't got the linux signature for weapon drop. :/
Machine is offline
Reply


Thread Tools
Display Modes

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 14:13.


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