Raised This Month: $ Target: $400
 0% 

[L4D2] Drop Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author
NscMike
New Member
Join Date: Dec 2009
Plugin ID:
1306
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    [L4D2] Drop Weapon
    Unapprover:
    Reason for Unapproving:
    Multiple reported issues. No posts from author in months.
    Old 12-02-2009 , 11:33   [L4D2] Drop Weapon
    Reply With Quote #1

    Script by Frustian revised for L4D2 support by NscMike

    Bind a key to sm_drop, or type in chat !drop (public trigger) or /drop (private trigger) to
    drop the weapon you are holding on the ground for another survivor to use.

    If you allowed dropping arbitrary weapons, put the weapon name after the command to drop it.

    E.g. !drop shotgun

    l4d2_drop_version "1.0" - Version CVAR
    l4d2_drop_specify "1" - Whether or not to allow a player to drop a weapon they are not holding.
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d2drop.sp - 5278 views - 7.0 KB)

    Last edited by NscMike; 12-02-2009 at 11:55.
    NscMike is offline
    cigs
    Senior Member
    Join Date: Jul 2006
    Old 12-02-2009 , 12:11   Re: [L4D2] Drop Weapon
    Reply With Quote #2

    What'd be even nicer is being able to drop anything you want. (as long as you're holding the item)

    Some examples:

    - when holding a medkit, type !drop and the medkit drops.
    - when holding 2 pistols, type !drop and 1 pistol drops.
    - when holding a melee weapon, type !drop, the melee weapon drops and you're left with 1 pistol.

    good idea?
    cigs is offline
    rek075
    Member
    Join Date: Oct 2009
    Old 12-02-2009 , 12:35   Re: [L4D2] Drop Weapon
    Reply With Quote #3

    I haven't tried this mod out yet, but I can already tell by looking at the code that there are a few things you haven't upgraded/ported properly:

    1. You can't drop the new pistols. Only "weapon_pistol", which is the L4D1 class name, looks like it is supported.
    2. You aren't properly setting the ammo for the L4D2 weapons being dropped. I have a hunch that when you go and pick the weapon up again there will be a 0 ammo reserve.

    I haven't modded for L4D2 yet, nor know of the proper class names and ammo offsets to fix this, otherwise I'd help you out.
    rek075 is offline
    NscMike
    New Member
    Join Date: Dec 2009
    Old 12-02-2009 , 12:41   Re: [L4D2] Drop Weapon
    Reply With Quote #4

    @cigs
    you can drop your items and weapons with a bind key
    just type this in your console
    bind "t" "sm_drop"
    then if you press t you will drop your weapon you are holding

    @rek075
    1. hm ok i'll check this
    2. hm i got full ammo when i picked up a dropped weapon

    Last edited by NscMike; 12-02-2009 at 12:48.
    NscMike is offline
    rek075
    Member
    Join Date: Oct 2009
    Old 12-02-2009 , 13:09   Re: [L4D2] Drop Weapon
    Reply With Quote #5

    Quote:
    Originally Posted by NscMike View Post
    2. hm i got full ammo when i picked up a dropped weapon
    Do you get partial ammo if the dropped weapon isn't completely full? The original L4D mod has the weapon dropped to have the ammo count of the player transferred to the weapon, so that when the weapon gets picked up again it retains the ammo count it original had when being held.
    rek075 is offline
    NscMike
    New Member
    Join Date: Dec 2009
    Old 12-03-2009 , 14:50   Re: [L4D2] Drop Weapon
    Reply With Quote #6

    right
    if a other player picks up the weapon he gets only one magazine of ammo
    and i try to solve the problem with the dual pistols
    NscMike is offline
    Daewa
    Member
    Join Date: Oct 2009
    Old 12-04-2009 , 11:40   Re: [L4D2] Drop Weapon
    Reply With Quote #7

    Thanks for the plugin.
    Is it possible to make it throw instead of droping?
    Daewa is offline
    LTR.2
    Veteran Member
    Join Date: Aug 2009
    Old 12-04-2009 , 12:04   Re: [L4D2] Drop Weapon
    Reply With Quote #8

    Quote:
    Originally Posted by Daewa View Post
    Thanks for the plugin.
    Is it possible to make it throw instead of droping?
    that would be terrible.
    think,
    where the item it's launched would be really unpredictible, the item may be launched on places where it's unreachable, or dangerous.

    hey, can you make players drop their weapons when they ammo account reachs 0?
    LTR.2 is offline
    Daewa
    Member
    Join Date: Oct 2009
    Old 12-04-2009 , 12:12   Re: [L4D2] Drop Weapon
    Reply With Quote #9

    Quote:
    Originally Posted by LTR.2 View Post
    that would be terrible.
    think,
    where the item it's launched would be really unpredictible, the item may be launched on places where it's unreachable, or dangerous.

    hey, can you make players drop their weapons when they ammo account reachs 0?
    I don't think so, in CSS you can throw weapons, I would like the same things. We can throw gas can to gather them in one place, it would be useful to gather med pack, weapons, pipe bomb, etc.
    Daewa is offline
    LTR.2
    Veteran Member
    Join Date: Aug 2009
    Old 12-04-2009 , 16:42   Re: [L4D2] Drop Weapon
    Reply With Quote #10

    Quote:
    Originally Posted by Daewa View Post
    I don't think so, in CSS you can throw weapons, I would like the same things. We can throw gas can to gather them in one place, it would be useful to gather med pack, weapons, pipe bomb, etc.
    depends of the force of the throw and the terrain.
    LTR.2 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 19:32.


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