is it possible to limit the amount of ammo in a weapon?

kingloser

2009-05-30 15:30:42

I was wondering if it was possible to limit the ammount of ammo in a weapon u pick up. I ask because i am making a map that i want to have a player pick up a crossbow ans 357 put i only want them to be able to fire one round with each. Ive looked and searched and cant find nething. Is this possible?

{EE}chEmicalbuRn

2009-05-30 18:17:46

im not sure you can change that without altering the code of the game itself. i know on the server side you can limit what weapons are available, but the ammo that comes with a weapon is coded into the game's structure. im sure it would be not too hard to look thru the hard code of the game and find that, but that would only work for your client. forcing it on others is prolly in the "hack" rhelm.

Sacrifist

2009-05-31 06:47:52

You certainly can, but it isnt map related. You have to decrypt the weapon ctx files in the script folder. The thing about this is that it's a full server change. Which means, whatever you alter in your weapons/clips files will be adjusted for every map. Im sure someone around here has the decrypted ctx files. I cant seem to find my set atm.

keefy

2009-06-01 17:18:18

There is a tool for decompiling and compiling had it on my rapid share account for ages.
http://rapidshare.com/files/128868899/h ... ompile.zip


extract anywhere and add all the .ctx files for all weapons then click "decompile.bat" it is setup for HL2DM only but you can easily change it by editing the bat files accordingly. The key for HL2DM is x9Ke0BY7 I think it is case sensitive.