Weapon Ammo Created 16 years ago2007-07-08 20:12:30 UTC by Carpocolypse300 Carpocolypse300

Created 16 years ago2007-07-08 20:12:30 UTC by Carpocolypse300 Carpocolypse300

Posted 16 years ago2007-07-08 20:12:30 UTC Post #227986
I noticed in MuzzleFlash's mod he has the Mp5 (M4) ammo clip set to somthing differnt, I was woundering how to change the amount of ammo in a weapon, if anyone knows please tell me.

Also, is it possible to change how fast a weapon shoots?
Posted 16 years ago2007-07-09 08:47:21 UTC Post #228073
Both require coding. I'm assuming you wanna do this for the MP5, so:

Open up the server workspace, go to weapons.h and find:
#define MP5_MAX_CLIP 50
Change 50 to any positive integer. Then go to mp5.cpp and find:
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;

if ( m_flNextPrimaryAttack < UTIL_WeaponTimeBase() )
m_flNextPrimaryAttack = UTIL_WeaponTimeBase() + 0.1;
0.1 is how many seconds are inbetween each shot, change it to whatever you want.
Posted 16 years ago2007-07-09 12:31:17 UTC Post #228106
Im still confused cause I didnt see a file called Server Workspace, do you have to have a program that changes a C++ file to somthing like wordpad?
Posted 16 years ago2007-07-09 13:02:18 UTC Post #228113
Server Workspace = dlls folder, contains all the source to create the hl.dll file.
Client Workspace = cl_dlls folder, contains all the source to create the client.dll file.

Find the file hl.dsw or something like that in the dlls folder and open that.
Posted 16 years ago2007-07-09 13:09:18 UTC Post #228114
K, that made alot more scence, but what would I use to make it so I can read it rather then look at C++ fourm?
Posted 16 years ago2007-07-09 13:12:55 UTC Post #228115
You need Microsoft Visual C++ 6.0, this is what Valve used to develop their code, and it the recommended tool for HL coding. Its up to you to snag a copy from somewhere.
Posted 16 years ago2007-07-09 13:26:45 UTC Post #228117
K, thanks for the help
Posted 16 years ago2007-07-09 13:26:50 UTC Post #228118
I recommend popping down to your local software retailer and purchasing a copy..................................... yeah right! :P
Posted 16 years ago2007-07-09 13:38:51 UTC Post #228119
Looks up Purchase in the dictionary.

Hah, what do you know. It is a real word :nuts:
monster_urby monster_urbyGoldsourcerer
Posted 16 years ago2007-07-09 15:48:00 UTC Post #228135
You must be logged in to post a response.