View Full Version : SMG1 and AR2 not firing at all...
01-23-2008, 12:02 PM
Hi there guys,
I modding Half-Life 2 since yesterday using the HL2 DM SDK Part.
I found this link Adding Firing Modes to your weapons (http://developer.valvesoftware.com/wiki/Adding_Firing_Modes_to_your_weapons) but my SMG1 and AR2 wont really shoot at all. Sounds play, animations play, sprites there etc..but no bullets flying, no damage causing. Can anyone help me and tell me what I did wrong?
01-23-2008, 05:10 PM
20 views, noone who can help me? I don't expect people to reply directly with a uber leet hax solution but maybe gimme a hint, what i did wrong or what to do different compared to the tut to remove the bugs i have so far :P
01-24-2008, 12:19 AM
If both SMG and AR2 are affected, your problem's probably in weapon_hl2mpbase_machinegun.cpp or weapon_hl2mpbase_machinegun.h
whack the code for them up :)
01-24-2008, 08:27 AM
whack the code for them up? I mean, it is in the tutorial :P When i put in the original weapon_hl2mpbase_machinegun.h and weapon_hl2mpbase_machinegun.cpp then all works again...but i will upload both codes for you :)
btw, are you german? pastebin.ca = german site, your nickname = contains german word :P (Deutsch/German: Falls ja, hast du MSN oder ICQ?)
Codes from pastebin:
Those 3 pastebin codes are the original code parts, nothing modded. Maybe you can help me what I have to re-code correctly and send me the pastebins here in the topic or via pm.
01-24-2008, 01:18 PM
First problems solved, now I want to modify the code from the AR2, so that my new AR2 weapon acts like the airboat gun. I found a tutorial, but following it causes many problems. Here's a link to it:
3 state rechargeable ammo (http://hl2coding.planethalflife.gamespy.com/wordpress/?p=41)
And here the code from my modified AR2(just changed the name from the weapon to Pulse Rifle and uses a different model)
Code from my Pulse Rifle (http://www.pastebin.ca/871200)
Maybe someone can point me into the right direction :)
01-24-2008, 03:41 PM
it causes many problems
Such as? .
01-24-2008, 03:46 PM
such as, unknown classes like the private: thing and i cant compile the code
but a mate of mine helped me a bit...i need to learn more about classes first...
01-24-2008, 11:55 PM
all fixed...got some help from a mate of mine :)
vBulletin® v3.8.7, Copyright ©2000-2017, vBulletin Solutions, Inc.