AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [DoDS] Drop Weapon (https://forums.alliedmods.net/showthread.php?t=73434)

strontiumdog 06-28-2008 21:35

[DoDS] Drop Weapon
 
1 Attachment(s)
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.

espectral 06-29-2008 00:13

Re: [DoDS] Drop Weapon
 
Nice man, THANKS!

How to make it work?
Is there any command?

strontiumdog 06-29-2008 00:48

Re: [DoDS] Drop Weapon
 
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!

Greyscale 06-29-2008 01:25

Re: [DoDS] Drop Weapon
 
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 :wink:)

espectral 06-30-2008 16:54

Re: [DoDS] Drop Weapon
 
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

strontiumdog 03-24-2009 21:29

Re: [DoDS] Drop Weapon
 
Updated


All times are GMT -4. The time now is 08:06.

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