AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Change damage of a weapon (https://forums.alliedmods.net/showthread.php?t=11271)

XunTric 03-14-2005 11:36

Change damage of a weapon
 
I posted the same question 2 weeks ago, but didnt get a understand able answer. :P

How do I change the damage of a weapon?
Lets say I want to change the damage of a knife to 50 damage per hit.
Give me a example.

Thanks! :D

Freecode 03-14-2005 15:25

there is no way of changing weapons damage. theres a cheat for it. After the damage is done you see how much damage was done and add/subtract to be equivalent to 50

TotalNoobScripter 03-14-2005 17:51

but when u do that, what if a user, say has 30 hp. He gets shot with a bullet that causes 35 hp, but u want that bullet to do 25 damage. Wouldnt the user die before you can add 10 hp to the client?

xeroblood 03-14-2005 18:40

Yep, same goes for HSs.. even if you have 100hp and get shot in the head, you could die still...

Freecode 03-14-2005 20:19

yes thats why i was writing my own damage system for CS where u are able to modify the damage done to a person depending on weapon. Its still is in my CVS and mostly done only thing why its taking a long time is because im traying to find the initial amount of damage done to all hitzones from all weapons. So thats 7 * 20 weapons thats 140 different damages and it takes a loooooooooong time. Plus damage is also decreased/increased depending on the distance

So as u can see it is a very long process

TotalNoobScripter 03-14-2005 21:04

well, i got an idea. Why not set it so bullets do absoultley no damage to any player(cant u do that with set_user_hitzones?) Then do the fakemta traceline thing when bullets are clled, and find out what hitzone it hit (that is if set_user_hitzones does not cause a conflict) With whatever hitzone it hit, and what ever weapon fired it, you can make the funcion call an array(s) to get the damage you want to simulate, then minus that damage from the health.

Freecode 03-14-2005 21:47

Quote:

Originally Posted by TotalNoobScripter
well, i got an idea. Why not set it so bullets do absoultley no damage to any player(cant u do that with set_user_hitzones?) Then do the fakemta traceline thing when bullets are clled, and find out what hitzone it hit (that is if set_user_hitzones does not cause a conflict) With whatever hitzone it hit, and what ever weapon fired it, you can make the funcion call an array(s) to get the damage you want to simulate, then minus that damage from the health.

dats a short summary of what im doing already
here is a preview. i need to build the distance checker :\ which is a pain in da arse

http://tcwonline.org/cgi-bin/viewcvs...viewcvs-markup

XunTric 03-15-2005 09:28

Quote:

Originally Posted by Freecode
there is no way of changing weapons damage. theres a cheat for it. After the damage is done you see how much damage was done and add/subtract to be equivalent to 50

So can you give me a example with that "cheat"?
I know this is possible in some way..
Like in the uwc3 plugin, you can buy a one round upgrade to do more damage...

Freecode 03-15-2005 12:07

there is no need for examples its that simple. Register damage event and get all the info u need from there.

XunTric 03-15-2005 14:02

Get all the info i need?
Give me a example plz man. :roll:


All times are GMT -4. The time now is 14:16.

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