PDA

View Full Version : [TF2] Make Medi Guns not speed boost if healing a scout


Nursik
07-15-2016, 09:27
I need to do that, but i don't know how to properly make that plugin, i don't know what "public Action" should i use.
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <tf2_stocks>
#include entity

if(class==TFClass_Medic)
{
int wepindex = GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex"); //for weapon index
if(wepindex == 29) //medi gun index
{
new healtarget=GetHealingTarget(client, true);
if(IsValidClient(healtarget) && TF2_GetPlayerClass(healtarget)==TFClass_Scout )
{
SetEntPropFloat(client, Prop_Send, "m_flMaxspeed", 320);
}

}
}
It gives me a lot of errors and warnings. ;-;

Arkarr
07-15-2016, 14:26
https://wiki.alliedmods.net/Introduction_to_sourcemod_plugins
As I stated in my previous post, also this thread belongs to the "Script" part of the sourcemod's forum. I believe.