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

Remove Reload / Change Max Ammo (TF2)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 03-17-2008 , 18:53   Remove Reload / Change Max Ammo (TF2)
Reply With Quote #1

I am looking to change the max ammo and get rid of the reload for soldier. Like I want them just to have 10 rockets max or something, that they can fire repeatedly until they run out of ammo.

Where exactly would I look at doing this?
CrimsonGT is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-17-2008 , 20:08   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #2

Search for the Infinite Ammo plugin, someone posted in that topic that it works fine for TF2. So apparently changing m_iClip is possible in TF2. For changing the max ammo, use this:
Code:
SetEntData(client, FindDataMapOffs(client, "m_iAmmo") + 4, 1000);
That gives your primary weapon a 1000 bullets. For your secondary weapon use + 8, for the third + 12 etc.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 03-18-2008 , 08:02   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #3

That worked perfectly for setting the max ammo, ty!

I am more trying to change the actual clip though so they dont have to reload. I am thinking it is m_iClip1 but I am not sure.
CrimsonGT is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-18-2008 , 10:09   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #4

Alright, what I posted above was actually for the reserve ammo, so for what you want to do with it you would have to set that to 0 instead of 1000. For changing the clip size of the active weapon, use:

Code:
new iWeapon = GetEntDataEnt2(client, FindSendPropInfo("CTFPlayer", "m_hActiveWeapon"));
SetEntData(iWeapon, FindSendPropInfo("CBaseCombatWeapon", "m_iClip1"), 16);
Where 16 is ofcourse the amount of bullets they'll have.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
ThatGuy
Senior Member
Join Date: Nov 2007
Old 03-18-2008 , 18:20   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #5

Just an fyi - it's possible without a plugin, I have ammo increased on my server. You can also make it 10 shots without reloading, etc.
__________________
ThatGuy is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-18-2008 , 18:36   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #6

pRED said it was possible by changing the weapon's ctx file, but we weren't sure if by changing the file on the server it would change for everyone. Is that what you did? If not, care to elaborate?
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
ThatGuy
Senior Member
Join Date: Nov 2007
Old 03-18-2008 , 19:21   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #7

yep, it changes for everyone
__________________
ThatGuy is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 03-23-2008 , 06:31   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #8

Alright so I have messed around with this a lot. You say you can get it to be a clip of 10 with no reload. How exactly do you do this? I know the Sniper Rifle is like this so I went and checked it out. The Sniper.ctx had primary ammo set to 25, got that. Then I checked tf_weapon_sniperrifle and clip_ammo or w.e was set to -1 and default_clip to 75. I am not sure how this works.

I tried it with the soldiers shotgun, I set secondary ammo to 12 in Soldier.ctx then set -1 as clip_ammo and like 36 as default_clip. When I loaded it up it just clicked and didnt fire. Then I hit reload and the second ammo listing came back. If you can give me some idea of how to fix that so I can get both the Rocket Launcher/Shotgun to function say like the Sniper Rifle (just shows one ammo listing, and when ammo is picked up, it adds to that) I would greatly appreciate it.
CrimsonGT is offline
HoboJim
New Member
Join Date: Mar 2008
Old 03-26-2008 , 00:21   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #9

Slightly unrelated, but what do you use to decrypt the .ctx files in TF2?
HoboJim is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 03-26-2008 , 15:57   Re: Remove Reload / Change Max Ammo (TF2)
Reply With Quote #10

CTX Explorer, there should be a link on Google although I doesn't come up anymore for me. Just extract the files to a directory without any spaces and you should be good. The CTX files are in the GCF files in case anyone didn't know yet. You can use GCFScape to open those.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami 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 06:51.


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