Monthly Target: $400 Donations: $344
 86% 

[TF2] Unlimited Ammo Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Dessix
Junior Member
Join Date: Oct 2009
Plugin ID:
1220
Plugin Version:
1.0.3
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Unapprover:
    Plugin Description:
    unlimited ammo for all weapons* no reload
    Servers with this Plugin:
     
    Reason for Unapproving:
    Bugs reported. Author inactive for 1.5 months.
    Old 10-15-2009 , 00:34   [TF2] Unlimited Ammo Plugin
    Reply With Quote #1

    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.
    Attached Files
    File Type: sp Get Plugin or Get Source (UnlimitedAmmo.sp - 2785 views - 17.8 KB)

    Last edited by Dessix; 10-15-2009 at 01:03. Reason: forgetfulness
    Dessix is offline
    noodleboy347
    SourceMod Donor
    Join Date: Mar 2009
    Old 10-15-2009 , 00:38   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #2

    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!
    noodleboy347 is offline
    Dessix
    Junior Member
    Join Date: Oct 2009
    Old 10-15-2009 , 00:41   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #3

    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)
    Dessix is offline
    noodleboy347
    SourceMod Donor
    Join Date: Mar 2009
    Old 10-15-2009 , 00:53   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #4

    Quote:
    Originally Posted by Dessix View Post
    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.
    noodleboy347 is offline
    Dessix
    Junior Member
    Join Date: Oct 2009
    Old 10-15-2009 , 00:59   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #5

    Quote:
    Originally Posted by noodleboy347 View Post
    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
    Dessix is offline
    noodleboy347
    SourceMod Donor
    Join Date: Mar 2009
    Old 10-15-2009 , 22:52   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #6

    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.

    Last edited by noodleboy347; 10-15-2009 at 22:57.
    noodleboy347 is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-16-2009 , 13:59   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #7

    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.
    __________________
    DarthNinja is offline
    noodleboy347
    SourceMod Donor
    Join Date: Mar 2009
    Old 10-16-2009 , 19:17   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #8

    Quote:
    Originally Posted by DarthNinja View Post
    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.
    noodleboy347 is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 10-16-2009 , 20:34   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #9

    Quote:
    Originally Posted by noodleboy347 View Post
    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.
    __________________
    DarthNinja is offline
    noodleboy347
    SourceMod Donor
    Join Date: Mar 2009
    Old 10-16-2009 , 21:00   Re: [TF2] Unlimited Ammo Plugin
    Reply With Quote #10

    Quote:
    Originally Posted by DarthNinja View Post
    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.
    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.
    noodleboy347 is offline
    Reply


    Thread Tools
    Display Modes

    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 19:48.


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