bearbear12345 icon

Untitled

bearbear12345 | PRO | 12/07/13 10:55:56 AM UTC | 0 ⭐ | 249 👁️ | Never ⏰ | []
text |

960 B

|

None

|

0 👍

/

0 👎

#include <sourcemod>
#include <tf2_stocks>
#include <morecolors>
#pragma semicolon 1
 public Plugin:myinfo =
{
	name = "Gunslinger Nerf",
	author = "bearbear12345",
	description = "Nerfs the gunslinger",
	version = "1.0",
	url = "
}
 public OnPluginStart()
{
	HookEvent("post_inventory_application", Event_Inventory, EventHookMode_Post);
}
 public Action:Event_Inventory(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(TF2_GetPlayerClass(client) == TFClass_Engineer) {
		new weapon = GetPlayerWeaponSlot(client, TFWeaponSlot_Melee);
		if(IsValidEntity(weapon)){
			new weaponIndex = GetEntProp(weapon, Prop_Send, "m_iItemDefinitionIndex");
			if(weaponIndex == 142) {
				CPrintToChat(client, "{haunted}You cannot use the Gunslinger! Please change weapon to continue");
				SetEntPropFloat(client, Prop_Send, "m_flMaxspeed", 1);
				}
			}
		}
	}
	return Plugin_Continue;
}

Comments