Raised This Month: $51 Target: $400
 12% 

Modifying damage of specific guns in Day of Defeat 1.3


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alexia1
New Member
Join Date: Mar 2021
Old 03-06-2021 , 13:47   Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #1

Good afternoon. I've been recently learning, very slowly how to write scripts. I am trying to do a very simple script that would increase the damage made by the garand rifle, independently of which player is using it, whether be an allied player or an axis player who picked it up from the ground, for example.

http://www.amxmodx.org/doc/index.htm...weapon_dmg.htm

I am trying to use this function, and included dodx in my script but it doesn't seem to work.

Code:
#include <amxmodx>
#include <dodx>

public plugin_init()
{
	register_plugin("super garand","1.0","Misty")
	misty_on = register_cvar("m", "1")
	custom_weapon_dmg ( weapon_garand, 0, 0, 120, hitplace=0 )
	}
What am I doing wrong?

I'm super new to scripting and I'd love to learn more, bare with me i'm old. haha. But there's not much information about what I'm trying to do on the internet. It's for my DOD 1.3 server

Last edited by alexia1; 03-06-2021 at 13:48.
alexia1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-06-2021 , 14:59   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #2

IIRC, there are a couple versions of this out there already: "Uber Garand" and "DOD Stronger Rifles" (some of my most hated plugins for DOD). Since dodplugins.net is down, I'm not sure of a place to get the former but you can get the latter here.

Also, the custom_weapon_dmg() function is for custom weapons, not built-in weapons. So, what you have to do is to hook Ham_TakeDamage, check the weapon, if it's a garand, change the damage.
__________________
fysiks is offline
alexia1
New Member
Join Date: Mar 2021
Old 03-06-2021 , 15:53   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
IIRC, there are a couple versions of this out there already: "Uber Garand" and "DOD Stronger Rifles" (some of my most hated plugins for DOD). Since dodplugins.net is down, I'm not sure of a place to get the former but you can get the latter here.

Also, the custom_weapon_dmg() function is for custom weapons, not built-in weapons. So, what you have to do is to hook Ham_TakeDamage, check the weapon, if it's a garand, change the damage.
Thank you! I downloaded the 2nd one and I'm building my own based off it.

Question: Would you know where can I get a full list of the weapon codes?

like DODW_GARAND or DODW_K43 ?

I'm looking for the rest of them so I can also buff up the bazooka, the panzer shrek and the piat
alexia1 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-06-2021 , 16:08   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #4

https://amxmodx.org/api/dodconst#DoD%20weapons

Not sure where you found the AMXX 1.6 documentation API. That's outdated. Use the above link.
__________________

Last edited by OciXCrom; 03-06-2021 at 16:09.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
alexia1
New Member
Join Date: Mar 2021
Old 03-07-2021 , 16:30   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #5

Quote:
Originally Posted by OciXCrom View Post
https://amxmodx.org/api/dodconst#DoD%20weapons

Not sure where you found the AMXX 1.6 documentation API. That's outdated. Use the above link.
Wonderful. Thank you!
alexia1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-07-2021 , 17:42   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #6

Quote:
Originally Posted by alexia1 View Post
I'm looking for the rest of them so I can also buff up the bazooka, the panzer shrek and the piat
Bazookas and nades might not work the same. That plugin will only work for guns.
__________________
fysiks is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 10-03-2021 , 14:25   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #7

Quote:
Originally Posted by fysiks View Post
... "Uber Garand" and "DOD Stronger Rifles" (some of my most hated plugins for DOD) ...
What kind of reason ?
Bad code and crush HLDS ?
TheVaskov is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-03-2021 , 19:36   Re: Modifying damage of specific guns in Day of Defeat 1.3
Reply With Quote #8

Quote:
Originally Posted by TheVaskov View Post
What kind of reason ?
Bad code and crush HLDS ?
Because the ruin the balance of power between the teams, IMO. Nothing related to the code.
__________________
fysiks is offline
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 21:36.


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