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

Custom Minigun Property


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dacisco
Junior Member
Join Date: Aug 2018
Old 08-15-2018 , 16:17   Custom Minigun Property
Reply With Quote #1

Hi, I want to create a simple script that applies the "TFCond_SpeedBuffAlly" (Disciplinary Action) buff to Miniguns immediately when they begin to wind down. The code below passes the compiler but nothing happens in-game, despite it being properly loaded and reloaded. Any advice would be greatly appreciated, thank you.


Code:
#include <sourcemod>
#include <tf2>

public Plugin myinfo =
{
	name = "Custom Property",
	author = "dacisco",
	description = "Adds Speed Boost",
	version = "1.0",
	url = "NA"
};

public void OnPluginStart()
{
	HookEvent("localplayer_winddown", Event_LocalPlayerWindDown);
}

public void Event_LocalPlayerWindDown(Event event, const char[] name, bool dontBroadcast)
{
	 int target_id = event.GetInt("userid");
	 int target = GetClientOfUserId(target_id);
	 TF2_AddCondition(target, TFCond_SpeedBuffAlly, 2.0, 0);
}
dacisco is offline
 



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 22:08.


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