AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [TF2] Unlimited Ammo Plugin (https://forums.alliedmods.net/showthread.php?t=106426)

Dessix 10-15-2009 00:34

[TF2] Unlimited Ammo Plugin
 
1 Attachment(s)
Overview

This plugins allows admins with the Slay flag to give anyone on the server unlimited ammo. This means no reloading with a few exceptions (listed below) and all weapons will have full ammo all the time.

EDIT: comes with full admin menu support, it adds an entry to player commands and server commands

CVARs

sm_unlimitedammo_version - contains the plguin version number

Zee Bugz

fairly simple concept, painful implementation. the plugins is stable and so far there are no bugs that break it (i'm sure something will pop up). However there are a few little glitches:

Sniper rifle and flare gun will always "reload". though in reality this is just the time between shots fired and not a reload.

Sandman does not have unlimited ammo. I can't override the regeneration time on the sandman, so you will still have to wait between hitting the ball. This does not affect the Jarate even though they use similar mechanics.

The heavy will have 6 Sandviches, thats right 6. Killing makes Heavy hungry. anyways for some reason, the method i use to distinguish original weapons from unlockable weapons works on everything except the sandvich. it does not affect game play though since eating the sandvich does not use up the sandvich and you can only throw out 1 sandvich at a time ( i beleive it disables the slot as well ).

Todo

- Serverwide unlimited ammo: fairly easy to do, will do it later
- Anything else you guys come up with/find


This is one of a few plugins i'm going to post including a crits manager and a general utilities plugin. these are the first plugins i posted up here so please be gentle.

also i commented pretty much every major step to help other programmers see what i did and copy/modify it. feel free to use whatever you find. hopefully i have a few good examples of things i wish i knew when i first started learning sourcepawn.

noodleboy347 10-15-2009 00:38

Re: [TF2] Unlimited Ammo Plugin
 
Couldn't you just run a timer and set a client's ammo to like... 10 or something? Looks like a lot of writing for a simple plugin... correct me if I'm wrong.

...but anyways, thanks for this!

Dessix 10-15-2009 00:41

Re: [TF2] Unlimited Ammo Plugin
 
it was alot of extra writing but i wouldn't feel happy with it unless i covered everything =P.

also alot of it is all the admin menus (about half i think)

noodleboy347 10-15-2009 00:53

Re: [TF2] Unlimited Ammo Plugin
 
Quote:

Originally Posted by Dessix (Post 962439)
it was alot of extra writing but i wouldn't feel happy with it unless i covered everything =P.

also alot of it is all the admin menus (about half i think)

Hehe I'm the same way... does the Flamethrower/Minigun/Sniper rifle work with this? I can't test it because I'm going to sleep in a few minutes.

Dessix 10-15-2009 00:59

Re: [TF2] Unlimited Ammo Plugin
 
Quote:

Originally Posted by noodleboy347 (Post 962444)
Hehe I'm the same way... does the Flamethrower/Minigun/Sniper rifle work with this? I can't test it because I'm going to sleep in a few minutes.

yes.

it just sets the ammo for the player (at the right spot) to do this

noodleboy347 10-15-2009 22:52

Re: [TF2] Unlimited Ammo Plugin
 
Could you put the command in the main post... wait... is there even a command?

EDIT: Bug. Scattergun ammo shows up as 2... when it should probably be 6. I think the plugin thinks it's the FaN.

DarthNinja 10-16-2009 13:59

Re: [TF2] Unlimited Ammo Plugin
 
For the the Sandman ball, if you want to give it infinite ammo, you might want to play around with the hidden cvar " tf_scout_stunball_ball_regen_rate".
I don't recommend setting it to 0 as it effectively gives scouts a stunball minigun. Also, large numbers of balls rolling around will make clients and the server lag.
Here's the list of scout cvars I got the stunball one from: Linky

Just FYI there is another infinite ammo plugin by twistedeuphoria (linky), however a lot of times it bugs and has to be manually reloaded.
Also it doesnt quite work for the pyro as (s)he runs out of ammo after a while.

noodleboy347 10-16-2009 19:17

Re: [TF2] Unlimited Ammo Plugin
 
Quote:

Originally Posted by DarthNinja (Post 963933)
For the the Sandman ball, if you want to give it infinite ammo, you might want to play around with the hidden cvar " tf_scout_stunball_ball_regen_rate".
I don't recommend setting it to 0 as it effectively gives scouts a stunball minigun. Also, large numbers of balls rolling around will make clients and the server lag.
Here's the list of scout cvars I got the stunball one from: Linky

Just FYI there is another infinite ammo plugin by twistedeuphoria (linky), however a lot of times it bugs and has to be manually reloaded.
Also it doesnt quite work for the pyro as (s)he runs out of ammo after a while.

That's global, not per client.

DarthNinja 10-16-2009 20:34

Re: [TF2] Unlimited Ammo Plugin
 
Quote:

Originally Posted by noodleboy347 (Post 964331)
That's global, not per client.


Re-read it, you'll find that it is per client:

Quote:

Command:
REQUIRES Admin Kick -
sm_iammo <user id | name | @<team> | @all> <0 | 1> - Gives or removes infinite ammo from a player.
I had that plugin on my old achievement server so I know what I'm talking about. :wink:

noodleboy347 10-16-2009 21:00

Re: [TF2] Unlimited Ammo Plugin
 
Quote:

Originally Posted by DarthNinja (Post 964389)
Re-read it, you'll find that it is per client:



I had that plugin on my old achievement server so I know what I'm talking about. :wink:

Re-read what? How can you set cvars per client? I tried doing that and the server forced it's convar value onto me... so it didn't work.


All times are GMT -4. The time now is 05:03.

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