Raised This Month: $32 Target: $400
 8% 

[TF2] Buff Banner Resupplier 1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Dragonshadow
BANNED
Join Date: Jun 2008
Old 12-25-2009 , 19:38   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #11

Quote:
Originally Posted by h00x View Post
Anyone know how to create a plugin that would regenerate the buff banner automaticlly without having to kill to build up the rate? I was thinking about something like the hpregenerator or the engineer metal generator plugins.
Yea thats really simple
Dragonshadow is offline
h00x
Senior Member
Join Date: Jun 2009
Old 12-25-2009 , 19:48   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #12

Quote:
Originally Posted by Dragonshadow View Post
Yea thats really simple

I was messing with this code to try and convert it to work for the rage meter but I'm not sure what the code is for the ragemeter. Is it like flRageMeter or something close to that?

PHP Code:
#include <sourcemod>
#include <tf2_stocks>
new Handle:m_Rate INVALID_HANDLE;
new 
Handle:m_Size INVALID_HANDLE;
//new Handle:m_Enabled = INVALID_HANDLE;
public Plugin:myinfo =
{
name "[TF2] Engineer Metal Regen",
author "DarthNinja",
description "Regenerates engineers build metal at a configurable rate.",
version "1.5.2",
url "http://www.sourcemod.net/",
}
public 
OnPluginStart()
{
CreateConVar("sm_rmetal_version""1.5.2""Metal Regen Version"FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY);
 
m_Rate CreateConVar("sm_rmetal_rate""5.0""How fast in seconds to regen metal");
m_Size CreateConVar("sm_rmetal_size""5""How much metal to regen per tick");
HookEvent("player_spawn"Event_PlayerSpawn);
}
public 
Action:Event_PlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)

new 
client GetClientOfUserId(GetEventInt(event"userid"));
new 
TFClassType:class = TF2_GetPlayerClass(client);
if(class == 
TFClass_Engineer)
{
CreateRegen(client)
}
else
{
//Not Engi
}
return 
Plugin_Continue;
}
&
#12288;
CreateRegen(client)
{
new 
Rate GetConVarFloat(m_Rate);
CreateTimer(RateTimer_RegenclientTIMER_REPEAT); 
}
public 
Action:Timer_Regen(Handle:timerany:value)
{
new 
client value 0x7f;
 
if (!
IsClientInGame(client)
|| !
IsPlayerAlive(client))
{
//KillTimer(timer);
return Plugin_Stop;
}
else
{
//Add admin check here
new metal GetEntData(clientFindDataMapOffs(client"m_iAmmo") + (4));
if (
metal 200)
{
new 
Size GetConVarInt(m_Size);
new 
newmetal metal Size
SetEntData
(clientFindDataMapOffs(client"m_iAmmo") + (4), newmetal4true);
}
else if (
metal 200)
{
SetEntData(clientFindDataMapOffs(client"m_iAmmo") + (4), 2004true);
}
return 
Plugin_Continue;
}


Last edited by h00x; 12-25-2009 at 19:50.
h00x is offline
Dragonshadow
BANNED
Join Date: Jun 2008
Old 12-25-2009 , 21:15   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #13

the ragemeter is a netprop

m_flRageMeter (float)
Dragonshadow is offline
h00x
Senior Member
Join Date: Jun 2009
Old 12-25-2009 , 21:16   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #14

Quote:
Originally Posted by Dragonshadow View Post
the ragemeter is a netprop

m_flRageMeter (float)

Ahh, ok. thanks for the help.
h00x is offline
drwhooo
Member
Join Date: Dec 2009
Old 12-31-2009 , 04:07   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #15

I think valves intention was for the rage meter to clear on death and equipment swap (which thier patch fixed but also makes it so you lose existing rage when you hit resupply). They did this for the exploits that someone posted about before.

So overall does this plugin allow those exploits still or no, and if it does not, great job as i think that would be how valve intended it to work (like uber or krits charge when you hit resupply)
drwhooo is offline
G@ngst@r
Member
Join Date: Dec 2009
Old 12-31-2009 , 07:24   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #16

Ah... Valve nulls the buff banner on resuply locker, because this would cause rocket spam on Arena\DM servers. So this plugin is useful on common public servers. But use-less on dm\arena servers or on small maps.
G@ngst@r is offline
Ghost Killer
Member
Join Date: Aug 2009
Old 01-01-2010 , 07:34   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #17

Quote:
Originally Posted by drwhooo View Post
So overall does this plugin allow those exploits still or no, and if it does not, great job as i think that would be how valve intended it to work (like uber or krits charge when you hit resupply)
qft, this is what I'm waiting to be answered for a while before installing the plugin.
Ghost Killer is offline
crazydog
AlliedModders Donor
Join Date: Jan 2006
Old 01-06-2010 , 16:58   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #18

Well, this is no longer necessary:
Quote:
Soldier Rage bar no longer resets when touching a resupply cabinet
http://store.steampowered.com/news/3308/
crazydog is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 01-06-2010 , 21:16   Re: [TF2] Buff Banner Resupplier 1.0
Reply With Quote #19

I'd like to see something like this where the solider spawns with some rage, like the medipacks/ammopacks plugins.
"Dropping" rage for a single-player 5 sec crit boost would be cool also... hmm..
__________________
DarthNinja 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 14:51.


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