Raised This Month: $89 Target: $400
 22% 

[DoDS] Drop Weapon


Post New Thread Reply   
 
Thread Tools Display Modes
Author
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Plugin ID:
441
Plugin Version:
1.0.101
Plugin Category:
Gameplay
Plugin Game:
Day of Defeat: Source
Plugin Dependencies:
    Servers with this Plugin:
    7 
    Plugin Description:
    Drops the player's weapon when they are shot in the arm
    Old 06-28-2008 , 21:35   [DoDS] Drop Weapon
    Reply With Quote #1

    Is taken from the Realism Mod in response to this:
    http://forums.alliedmods.net/showthr...173#post645173

    CVARS
    • sm_dod_dropweapon <0|1>
    turns the plugin on or off

    • sm_dod_dropweapon_message "You got shot in the arm - pick up your weapon"
    message to display to clients if they drop their weapon
    • sm_dod_dropweapon_headshot_message "made a headshot"
    message to send to client if headshot has been made

    • sm_dod_dropweapon_showmessages <0|1|2>
    if 0, all messages are disabled
    if 1, message sent to all players (headshot only)
    if 2, message sent to attacker (headshot only)


    Installation
    • Copy sm_dod_dropweapon.smx to addons/sourcemod/plugins
    Changelog
    Version 1.0.100
    SourceMod release.

    Version 1.0.101
    Added cvar to remove messages


    Notes
    Has been tested in DoDS.
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_dod_dropweapon.sp - 1924 views - 3.4 KB)
    __________________
    Plugins | TheVille
    Zombie Mod for DoD:S - Left4DoD

    Last edited by strontiumdog; 03-24-2009 at 21:29.
    strontiumdog is offline
    espectral
    Junior Member
    Join Date: Jun 2008
    Old 06-29-2008 , 00:13   Re: [DoDS] Drop Weapon
    Reply With Quote #2

    Nice man, THANKS!

    How to make it work?
    Is there any command?
    espectral is offline
    strontiumdog
    Veteran Member
    Join Date: Jan 2007
    Location: BC, Canada
    Old 06-29-2008 , 00:48   Re: [DoDS] Drop Weapon
    Reply With Quote #3

    Nope. It just runs itself.

    It checks to see which part of the hitbox has been damaged. If it's the arms, and the damage is over 40hp, the client is made to drop their weapon.

    Just pop the plugin into the plugins directory and load the next map.
    I think it might also work with CSS!
    __________________
    Plugins | TheVille
    Zombie Mod for DoD:S - Left4DoD
    strontiumdog is offline
    Greyscale
    SourceMod Plugin Approver
    Join Date: Dec 2007
    Location: strYoMommasHouse[you];
    Old 06-29-2008 , 01:25   Re: [DoDS] Drop Weapon
    Reply With Quote #4

    Just looking at your code I'd say you could totally remove this line

    Code:
    if (!(StrEqual(weapon, "bazooka") || StrEqual(weapon, "pschreck") || StrEqual(weapon, "frag_us") || StrEqual(weapon, "frag_ger") || StrEqual(weapon, "riflegren_us") || StrEqual(weapon, "riflegren_ger")))
    because damage done via explosions in source just uses a hitgroup of 0, so it wouldn't get passed your hitgroup check.

    Besides that it should work with any mod
    (It'd still work fine with that line but hey why not save a few nano seconds )
    Greyscale is offline
    espectral
    Junior Member
    Join Date: Jun 2008
    Old 06-30-2008 , 16:54   Re: [DoDS] Drop Weapon
    Reply With Quote #5

    Man, just PERFECT.
    Works FINE.
    But I have some suggestion to improve your plugin.
    Check it out:

    [IMG]http://img528.**************/img528/7480/armtl9.jpg[/IMG]
    Is there a way to make it on/off and editable ?
    Like:
    sm_drop_enable 1/0 (1 = on, 0 = off)
    enables or disables to plugin
    sm_drop_messageon 1/0
    sm_drop_message "Your weapons is down, man, take it up!"

    And the headshot message:
    [IMG]http://img403.**************/img403/7232/headhc6.jpg[/IMG]
    is there a way to remove it and make another plugin, like DODS Stats, with things like this:
    sm_stats_enable 1/0

    sm_stats_headshot_enable 1/2/0
    1 = shows message to everybody
    2 = shows message only to the killer and killed
    0 = disabled
    sm_stats_headshot "&nick got a headshot from &killer with &weapon" (with &tags)


    what do you think about it?

    THANK YOU, anyway

    Last edited by espectral; 06-30-2008 at 22:44.
    espectral is offline
    strontiumdog
    Veteran Member
    Join Date: Jan 2007
    Location: BC, Canada
    Old 03-24-2009 , 21:29   Re: [DoDS] Drop Weapon
    Reply With Quote #6

    Updated
    __________________
    Plugins | TheVille
    Zombie Mod for DoD:S - Left4DoD
    strontiumdog 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 15:39.


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