AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [TF2] Disabling Ammo Lockers (https://forums.alliedmods.net/showthread.php?t=105110)

Ralphi 10-01-2009 09:10

[TF2] Disabling Ammo Lockers
 
Hi there,
I'm fairly new to sourcemod and I'm looking for someone to put me in the right direction as to how to disable ammo lockers in spawn. I've used search and found nothing that seemed to do what I need.

Basically I need the doors on the ammo lockers not to open when players try to use them. Either that or just disable the function of giving additional health and ammo.

I've seen it done on a server so it must be possible but I don't know that it was done in sourcemod. I would like to keep my server simple and only use sourcemod.

Hope you can all help out.
Ralphi

Kilandor 10-01-2009 10:05

Re: [TF2] Disabling Ammo Lockers
 
You should be able to FindEntityByClassname and search for func_regenerate and set "disabled" to true

Just do this OnMapStart

I'm not 100% but this should work
SetVariantInt(0);
AcceptEntityInput(ent, "Disabled", -1, -1, 0);

But you still have to setup the loop to handle searching for the ents

Ralphi 10-01-2009 10:09

Re: [TF2] Disabling Ammo Lockers
 
As I said, I'm new to this and didn't understand what you said to do. Could you be a bit more specific please.

Kilandor 10-01-2009 11:08

Re: [TF2] Disabling Ammo Lockers
 
Edit: Well I found the problem, When the Round Restarts the entity's are being reset, so I hooked into that to disable them on round start. It also hooks it for arena just in case there are any arena maps with lockers

This contains 1 Cvar that is checked on each round start to disable/enable
Disabled Ammo Lockers on round start (this is default)
ammo_locker_disable - [1/0] Enable/Disable this plugin(doesnt reset lockers unitll normal round/map rest)

TheSpyHunter 10-01-2009 13:09

Re: [TF2] Disabling Ammo Lockers
 
Is it possible you could make a on/off for this?

Would be great to use with melee mode mod.

Kilandor 10-01-2009 13:47

Re: [TF2] Disabling Ammo Lockers
 
Quote:

This contains 1 Cvar that is checked on each round start to disable/enable
Disabled Ammo Lockers on round start (this is default)
ammo_locker_disable - [1/0] Enable/Disable this plugin(doesnt reset lockers unitll normal round/map rest)
It already has a Cvar to disable/enable, or are you referring to doing this like in the middle of a game?

TheSpyHunter 10-01-2009 19:26

Re: [TF2] Disabling Ammo Lockers
 
yes, a toggle for when in game

Ralphi 10-02-2009 02:09

Re: [TF2] Disabling Ammo Lockers
 
Thanks for that, exactly what I needed

Kilandor 10-02-2009 05:24

Re: [TF2] Disabling Ammo Lockers
 
New version posted in New Plugins.
http://forums.alliedmods.net/showthr...876#post949876

Please note the cvars changed, added a new one to disable round start disabling, and also added a command to enable/disable


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

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