Raised This Month: $95 Target: $400
 23% 

Weapon Health


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Hawk552 (427)
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-11-2009 , 00:17   Weapon Health
Reply With Quote #1

Weapon Health Plugin

Description:
Weapons have health.
Players can damage weapons when they are dropped. Shooting them to become unusable.

If someone picks a damaged weapon, it will be have a malfunction problem like bad aim, jamming and posibility to explode!. He could drop the gun and pickup another one.

Cvars:
Quote:
wh_enable < 0 / 1 > // Enable/Disable plugin (default: 1)
Changes:
* v1.5
- Changed attack management
- Improved attack blocking
- Added per-weapon health/damage
- Added levels for damage (Normal, Malfunction, Bad aim, Unstable/Explosive, Broken)
- Added sparks!
- Added on/off cvar

* v1.1
- Method change to check damaged weapons (Thanks Exolent)
- Method change to catch linking weaponbox
- Improved damage amount storage
- Fixed array size (Thanks fezh)

* v1.0
- First release


TODO:
  • per-weapon type health (done)
  • per-bullet type damage (per-weapon done)
  • damage modes (jammed, explode, bad aim, broken) (done)
  • alternative models for broken weapons
  • bad aim for damaged weapons (done)
  • change clip for jammed weapons
  • random behavior for unstable weapons (done for bad aim & jammed & explode)
  • take damage when hits player weapons
  • cvar to select affected weapons
  • multilang
  • plugin control (on / off) (done)

Thanks to:
- Tutorials
- VEN Drop/Touch tutorial
- ot_207 Fakemeta/Ham tutorial
- L// member
- IneedHelp member
Attached Files
File Type: sma Get Plugin or Get Source (weaponhealth.sma - 1872 views - 2.8 KB)
File Type: sma Get Plugin or Get Source (weaponhealth-v1.5.sma - 2236 views - 9.2 KB)
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.

Last edited by joropito; 09-22-2009 at 01:05.
joropito is offline
Send a message via MSN to joropito
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 09-11-2009 , 07:28   Re: Weapon Health
Reply With Quote #2

Yeah, u released the plugin, good job, good idea.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-11-2009 , 08:05   Re: Weapon Health
Reply With Quote #3

Quote:
TODO:
[1]per-weapon type health
[2]alternative models for broken weapons
[3]bad aim for damaged weapons
[4]change clip for jammed weapons
[5]take damage when hits player weapons
[1] that you need to do with this property.
EV_FL_health and EV_FL_takedamage
[2] That is hard, you need modelers for that, I think that it would be better to make some sounds.
[3] http://forums.alliedmods.net/showthread.php?p=787225
[4] Cstrike Module
[5] That is hard to do but not impossible.
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 09-11-2009 , 13:17   Re: Weapon Health
Reply With Quote #4

For hooking keys you should use cmdstart.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-11-2009 , 14:47   Re: Weapon Health
Reply With Quote #5

Quote:
Originally Posted by Sn!ff3r View Post
For hooking keys you should use cmdstart.
This is based on this tutorial.

http://forums.alliedmods.net/showthread.php?t=41265

As I know it's not possible to correctly catch +attack with CmdStart.
Please let me know if I'm wrong with that.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-11-2009 , 14:49   Re: Weapon Health
Reply With Quote #6

I suggest Ham_Weapon_PrimaryAttack.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 09-11-2009 , 15:22   Re: Weapon Health
Reply With Quote #7

Code:
new g_Jammed[MAX_PLAYERS];
Shouldn't be ?
Code:
new g_Jammed[MAX_PLAYERS+1];
__________________
"There is no knowledge, that is not power"
fezh is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-11-2009 , 15:28   Re: Weapon Health
Reply With Quote #8

Quote:
Originally Posted by Exolent[jNr] View Post
I suggest Ham_Weapon_PrimaryAttack.
I will check how to make jam works with that.

Quote:
Originally Posted by fezh View Post
Code:
new g_Jammed[MAX_PLAYERS];
Shouldn't be ?
Code:
new g_Jammed[MAX_PLAYERS+1];
Yes! I will fix that. But may it will become unnecesary with Exolent suggestion.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-12-2009 , 01:13   Re: Weapon Health
Reply With Quote #9

Quote:
Originally Posted by Exolent[jNr] View Post
I suggest Ham_Weapon_PrimaryAttack.
Done.

Quote:
Originally Posted by fezh View Post
Shouldn't be ?
Code:
new g_Jammed[MAX_PLAYERS+1];
Done.

Updated to v1.1
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 09-12-2009 , 08:45   Re: Weapon Health
Reply With Quote #10

what about this jorop?

http://www.fpsbanana.com/skins/30421
KadiR 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 01:58.


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