Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #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;
- }
Advertisement
Add Comment
Please, Sign In to add comment