Raised This Month: $ Target: $400
 0% 

How can I reduce the dmg?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Finalheaven
Member
Join Date: Jun 2004
Location: Cambridge, MA
Old 01-19-2005 , 12:32   How can I reduce the dmg?
Reply With Quote #1

Of a weapon, let's say the awp? on my server. Any way is fine. Doesn't have to be through amxx. Of which I'm still using .16 HAPPILY! I have the awp and autosnipe limited already, but reducing the damage done would make the awp perfect.
Finalheaven is offline
Send a message via AIM to Finalheaven
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 01-19-2005 , 20:12  
Reply With Quote #2

I think the only way is to make a plugin that will change the damage. Ofcourse to do that you have to know how to script.
Peli is offline
Send a message via MSN to Peli
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-20-2005 , 00:28  
Reply With Quote #3

No, there is no way to change the damage.
Even if you catch the damage event and stop it from reaching the client, the damage is still dealt. We've been through all this before.

You COULD catch the damage event and give health back to the player, but that won't help in the case of AWPs, because the damage is dealt before the plugin can do anything...so if it would have normally been a one-hit kill, it still will.

Although...since the HUD looks the same at 100 and 356...you COULD give the player 356 health, and then if they go under 256 (AFTER giving the health back), you'd slay them...

Sometimes, I amaze me with my ingeniousness.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 01-20-2005 , 18:17  
Reply With Quote #4

Damn thats a good idea
__________________
Github archive for plugins, the repos for the other c++ projects are there to.
EKS is offline
Finalheaven
Member
Join Date: Jun 2004
Location: Cambridge, MA
Old 01-20-2005 , 19:10  
Reply With Quote #5

but wait a second. don't all the weapons have attributes on the server? And we can't control that through server.cfg? We can control crazy stuff like gravity, but not wep dmg?
Finalheaven is offline
Send a message via AIM to Finalheaven
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-20-2005 , 23:18  
Reply With Quote #6

Yes, everything like that is stored in a variable on the server.
Some of them are cvars that are easily accessable and changable, such as gravity.
Others, however, such as weapon damage and the max/min limits (say, for bomb timer and money) are stored as constants in memory, and would take some serious memory hacking to edit.

Fortunately for us, DS wrote a module that allows to "hack" some of those hidden constants on the server. Variables such as the max/min limits for bomb timer and money are accessable; however, the damage of guns is not.

If you need to change the damage of a gun, use the amazing and incredibly ingenious method I came up with last night while I was half-wasted.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
TaRgEt*TuRkEy
Member
Join Date: Oct 2004
Old 01-21-2005 , 01:11  
Reply With Quote #7

Well after editing one of Blue Raja's plugins, I realized that when trying to get guns to do more damage, I was actually getting the damage, but not stopping the initial damage, so it was doing double damage plus whatever extra damage I had set for that gun. So what I did was get the damage, apply it to the multiplier, then minus the inital damage value, so it increased with the extra damage, but just that, and no double damage.

Then I started using multiples under 1 (-999 to 0.9) to get a lowered damage value, but the problem still exists, so I started adding health back for lowered damage, just like Blue Raja mentioned. This still doesn't fix the problem, but what I am thinking of doing is actually respawning the player, milliseconds after he has died, and adding that health back to him.

I am wondering if this is possible, to respawn the player in the same place, remove the dead body, the kill/death, and give him back the same weapons.

I know a couple of those would work.
__________________
TaRgEt*TuRkEy is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 01-21-2005 , 02:30  
Reply With Quote #8

???
Did you not just read my ingenious post!?
It's so ingenious it hurts!
[edit] ...Not to mention that the fact that 'the damage added was a multiple of the damage ADDED ONTO the original damage, which cannot be stopped' was not only written in my original post, but was at the header comments in the source file...
[edit2] Looking back, that seems out of context, and I kept changing my tense [sic]. ^_^
..damn, I'm tired O_o
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
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:29.


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