Raised This Month: $65 Target: $400
 16% 

[req] Taunts Bind


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ApoziX
Member
Join Date: Sep 2018
Old 10-21-2018 , 11:34   [req] Taunts Bind
Reply With Quote #1

There is a way that i can bind the taunt in console like bind l "sm_taunt 15"
and when i press l it will do the taunt

here is the code
thanks for helpers +rep

PHP Code:
#pragma semicolon 1

#include <sdktools>
#include <tf2items>
#include <tf2_stocks>

#define PLUGIN_VERSION "1.0"

public Plugin:myinfo =
{
    
name "[TF2] Taunt Menu",
    
author "FlaminSarge, Nighty, xCoderx",
    
description "Displays a nifty taunt menu.",
    
version PLUGIN_VERSION,
    
url "http://forums.alliedmods.net/showthread.php?t=242866"
};

new 
Handle:hPlayTaunt;

public 
OnPluginStart()
{
    new 
Handle:conf LoadGameConfigFile("tf2.tauntem");
    
    if (
conf == INVALID_HANDLE)
    {
        
SetFailState("Unable to load gamedata/tf2.tauntem.txt. Good luck figuring that out.");
        return;
    }
    
    
StartPrepSDKCall(SDKCall_Player);
    
PrepSDKCall_SetFromConf(confSDKConf_Signature"CTFPlayer::PlayTauntSceneFromItem");
    
PrepSDKCall_AddParameter(SDKType_PlainOldDataSDKPass_Plain);
    
PrepSDKCall_SetReturnInfo(SDKType_BoolSDKPass_Plain);
    
hPlayTaunt EndPrepSDKCall();
    
    if (
hPlayTaunt == INVALID_HANDLE)
    {
        
SetFailState("Unable to initialize call to CTFPlayer::PlayTauntSceneFromItem. Wait patiently for a fix.");
        
CloseHandle(conf);
        return;
    }
    
    
RegAdminCmd("sm_taunt"Cmd_TauntMenuADMFLAG_CUSTOM6"Taunt Menu");
    
RegAdminCmd("sm_taunts"Cmd_TauntMenuADMFLAG_CUSTOM6"Taunt Menu");
    
CloseHandle(conf);
    
LoadTranslations("common.phrases");
    
CreateConVar("tf_tauntem_version"PLUGIN_VERSION"[TF2] Taunt 'em Version"FCVAR_NOTIFY|FCVAR_PLUGIN);
}

public 
Action:Cmd_TauntMenu(clientargs)
{
    if (
CheckCommandAccess(client"sm_taunt"ADMFLAG_CUSTOM6false))
    {
        
ShowMenu(client);
        return 
Plugin_Handled;
    }
    return 
Plugin_Handled;
}

public 
Action:ShowMenu(client)
{
    new 
TFClassType:class = TF2_GetPlayerClass(client);
    new 
Handle:menu CreateMenu(Tauntme_MenuSelected);
    
SetMenuTitle(menu"[FZG] Taunts:");
    
    switch(class)
    {
        case 
TFClass_Scout:
        {
            
AddMenuItem(menu"1197""The Scooty Scoot [Scout]");
            
AddMenuItem(menu"1117""Battin' a Thousand [Scout]");
            
AddMenuItem(menu"1119""Deep Fried Desire [Scout]");
            
AddMenuItem(menu"1168""Carlton [Scout]");
            
AddMenuItem(menu"30572""The Boston Breakdance [Scout]");
            
AddMenuItem(menu"30917""The Trackman's Touchdown [Scout]");
            
AddMenuItem(menu"30920""The Bunnyhopper [Scout]");
            
AddMenuItem(menu"30921""Runner's Rhythm [Scout]");
        }
        case 
TFClass_Soldier:
        {
            
AddMenuItem(menu"1196""Panzer Pants [Soldier]");
            
AddMenuItem(menu"1113""Fresh Brewed Victory [Soldier]");
            
AddMenuItem(menu"30673""Soldier's Requiem [Soldier]");
            
AddMenuItem(menu"30761""The Fubar Fanfare [Soldier]");
        }
        case 
TFClass_Pyro:
        {
            
AddMenuItem(menu"30876""Headcase [Pyro]");
            
AddMenuItem(menu"1112""Party Trick [Pyro]");
            
AddMenuItem(menu"30570""Pool Party [Pyro]");
            
AddMenuItem(menu"30763""The Balloonibouncer [Pyro]");
            
AddMenuItem(menu"30919""The Skating Scorcher [Pyro]");
        }
        case 
TFClass_DemoMan:
        {
            
AddMenuItem(menu"1114""Spent Well Spirits [Demoman]");
            
AddMenuItem(menu"1120""Oblooterated [Demoman]");
            
AddMenuItem(menu"30671""Bad Pipes [Demoman]");
            
AddMenuItem(menu"30840""Scotsmann's Stagger [Demoman]");
        }
        case 
TFClass_Heavy:
        {
            
AddMenuItem(menu"30843""Russian Arms Race [Heavy]");
            
AddMenuItem(menu"30844""Soviet Strongarm [Heavy]");
            
AddMenuItem(menu"1174""Table Tantrum [Heavy]");
            
AddMenuItem(menu"1175""Boiling Point [Heavy]");
            
AddMenuItem(menu"30616""Proletariat Posedown [Heavy]");
        }
        case 
TFClass_Engineer:
        {
            
AddMenuItem(menu"30842""Dueling Banjo [Engineer]");
            
AddMenuItem(menu"30845""Jumping Jack [Engineer]");
            
AddMenuItem(menu"1115""Rancho Relaxo [Engineer]");
            
AddMenuItem(menu"30618""Bucking Bronco [Engineer]");
        }
        case 
TFClass_Medic:
        {
            
AddMenuItem(menu"477""Meet the Medic [Medic]");
            
AddMenuItem(menu"1109""Results Are In [Medic]");
            
AddMenuItem(menu"30918""Surgeon's Squeezebox [Medic]");
        }
        case 
TFClass_Sniper:
        {
            
AddMenuItem(menu"1116""I See You [Sniper]");
            
AddMenuItem(menu"30609""The Killer Solo [Sniper]");
            
AddMenuItem(menu"30614""Most Wanted [Sniper]");
            
AddMenuItem(menu"30839""Didgeridrongo [Sniper]");
        }
        case 
TFClass_Spy:
        {
            
AddMenuItem(menu"1108""Buy A Life [Spy]");
            
AddMenuItem(menu"30615""Box Trot [Spy]");
            
AddMenuItem(menu"30762""Disco Fever [Spy]");
            
AddMenuItem(menu"30922""Luxury Lounge [Spy]");
        }
    }
    
AddMenuItem(menu"167""High Five! [Any]");
    
AddMenuItem(menu"438""Director's Vision [Any]");
    
AddMenuItem(menu"463""Schadenfreude [Any]");
    
AddMenuItem(menu"1015""Shred Alert [Any]");
    
AddMenuItem(menu"1106""Square Dance [Any]");
    
AddMenuItem(menu"1107""Flippin' Awesome [Any]");
    
AddMenuItem(menu"1110""Rock, Paper, Scissors [Any]");
    
AddMenuItem(menu"1111""Skullcracker [Any]");
    
AddMenuItem(menu"1118""Conga [Any]");
    
AddMenuItem(menu"1157""Kazotsky Kick [Any]");
    
AddMenuItem(menu"1162""Mannrobics [Any]");
    
AddMenuItem(menu"1172""Victory Lap [Any]");
    
AddMenuItem(menu"1182""Yeti Punch [Any]");
    
AddMenuItem(menu"1183""Yeti Smash [Any]");    
    
AddMenuItem(menu"30621""Burtchester [Any]");
    
AddMenuItem(menu"30672""Zoomin' Broom [Any]");
    
AddMenuItem(menu"30816""Second Rate Sourcery [Any]");
    
    
DisplayMenu(menuclient20);
}

public 
Tauntme_MenuSelected(Handle:menuMenuAction:actioniClientparam2)
{
    if(
action == MenuAction_End)
    {
        
CloseHandle(menu);
    }
    
    if(
action == MenuAction_Select)
    {
        
decl String:info[12];
        
        
GetMenuItem(menuparam2infosizeof(info));
        
ExecuteTaunt(iClientStringToInt(info));
    }
}

ExecuteTaunt(clientitemdef)
{
    static 
Handle:hItem;
    
hItem TF2Items_CreateItem(OVERRIDE_ALL|PRESERVE_ATTRIBUTES|FORCE_GENERATION);
    
    
TF2Items_SetClassname(hItem"tf_wearable_vm");
    
TF2Items_SetQuality(hItem6);
    
TF2Items_SetLevel(hItem1);
    
TF2Items_SetNumAttributes(hItem0);
    
TF2Items_SetItemIndex(hItemitemdef);
    
    new 
ent TF2Items_GiveNamedItem(clienthItem);
    new 
Address:pEconItemView GetEntityAddress(ent) + Address:FindSendPropInfo("CTFWearable""m_Item");
    
    
SDKCall(hPlayTauntclientpEconItemView) ? 0;
    
AcceptEntityInput(ent"Kill");

__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Lazytown
Old 10-21-2018 , 11:42   Re: [req] Taunts Bind
Reply With Quote #2

Code:
#pragma semicolon 1 

#include <sdktools> 
#include <tf2items> 
#include <tf2_stocks> 

#define PLUGIN_VERSION "1.0" 

public Plugin:myinfo = 
{ 
    name = "[TF2] Taunt Menu", 
    author = "FlaminSarge, Nighty, xCoderx", 
    description = "Displays a nifty taunt menu.", 
    version = PLUGIN_VERSION, 
    url = "http://forums.alliedmods.net/showthread.php?t=242866" 
}; 

new Handle:hPlayTaunt; 

public OnPluginStart() 
{ 
    new Handle:conf = LoadGameConfigFile("tf2.tauntem"); 
     
    if (conf == INVALID_HANDLE) 
    { 
        SetFailState("Unable to load gamedata/tf2.tauntem.txt. Good luck figuring that out."); 
        return; 
    } 
     
    StartPrepSDKCall(SDKCall_Player); 
    PrepSDKCall_SetFromConf(conf, SDKConf_Signature, "CTFPlayer::PlayTauntSceneFromItem"); 
    PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain); 
    PrepSDKCall_SetReturnInfo(SDKType_Bool, SDKPass_Plain); 
    hPlayTaunt = EndPrepSDKCall(); 
     
    if (hPlayTaunt == INVALID_HANDLE) 
    { 
        SetFailState("Unable to initialize call to CTFPlayer::PlayTauntSceneFromItem. Wait patiently for a fix."); 
        CloseHandle(conf); 
        return; 
    } 
     
    RegAdminCmd("sm_taunt", Cmd_TauntMenu, ADMFLAG_CUSTOM6, "Taunt Menu"); 
    RegAdminCmd("sm_taunts", Cmd_TauntMenu, ADMFLAG_CUSTOM6, "Taunt Menu"); 
    CloseHandle(conf); 
    LoadTranslations("common.phrases"); 
    CreateConVar("tf_tauntem_version", PLUGIN_VERSION, "[TF2] Taunt 'em Version", FCVAR_NOTIFY); 
} 

public Action:Cmd_TauntMenu(client, args) 
{ 
	if (args > 0)
	{
		char sID[16];
		GetCmdArgString(sID, sizeof(sID));
		ExecuteTaunt(client, StringToInt(sID)); 
		return Plugin_Handled; 
	}
	
	ShowMenu(client); 
	return Plugin_Handled; 
} 

public Action:ShowMenu(client) 
{ 
    new TFClassType:class = TF2_GetPlayerClass(client); 
    new Handle:menu = CreateMenu(Tauntme_MenuSelected); 
    SetMenuTitle(menu, "[FZG] Taunts:"); 
     
    switch(class) 
    { 
        case TFClass_Scout: 
        { 
            AddMenuItem(menu, "1197", "The Scooty Scoot [Scout]"); 
            AddMenuItem(menu, "1117", "Battin' a Thousand [Scout]"); 
            AddMenuItem(menu, "1119", "Deep Fried Desire [Scout]"); 
            AddMenuItem(menu, "1168", "Carlton [Scout]"); 
            AddMenuItem(menu, "30572", "The Boston Breakdance [Scout]"); 
            AddMenuItem(menu, "30917", "The Trackman's Touchdown [Scout]"); 
            AddMenuItem(menu, "30920", "The Bunnyhopper [Scout]"); 
            AddMenuItem(menu, "30921", "Runner's Rhythm [Scout]"); 
        } 
        case TFClass_Soldier: 
        { 
            AddMenuItem(menu, "1196", "Panzer Pants [Soldier]"); 
            AddMenuItem(menu, "1113", "Fresh Brewed Victory [Soldier]"); 
            AddMenuItem(menu, "30673", "Soldier's Requiem [Soldier]"); 
            AddMenuItem(menu, "30761", "The Fubar Fanfare [Soldier]"); 
        } 
        case TFClass_Pyro: 
        { 
            AddMenuItem(menu, "30876", "Headcase [Pyro]"); 
            AddMenuItem(menu, "1112", "Party Trick [Pyro]"); 
            AddMenuItem(menu, "30570", "Pool Party [Pyro]"); 
            AddMenuItem(menu, "30763", "The Balloonibouncer [Pyro]"); 
            AddMenuItem(menu, "30919", "The Skating Scorcher [Pyro]"); 
        } 
        case TFClass_DemoMan: 
        { 
            AddMenuItem(menu, "1114", "Spent Well Spirits [Demoman]"); 
            AddMenuItem(menu, "1120", "Oblooterated [Demoman]"); 
            AddMenuItem(menu, "30671", "Bad Pipes [Demoman]"); 
            AddMenuItem(menu, "30840", "Scotsmann's Stagger [Demoman]"); 
        } 
        case TFClass_Heavy: 
        { 
            AddMenuItem(menu, "30843", "Russian Arms Race [Heavy]"); 
            AddMenuItem(menu, "30844", "Soviet Strongarm [Heavy]"); 
            AddMenuItem(menu, "1174", "Table Tantrum [Heavy]"); 
            AddMenuItem(menu, "1175", "Boiling Point [Heavy]"); 
            AddMenuItem(menu, "30616", "Proletariat Posedown [Heavy]"); 
        } 
        case TFClass_Engineer: 
        { 
            AddMenuItem(menu, "30842", "Dueling Banjo [Engineer]"); 
            AddMenuItem(menu, "30845", "Jumping Jack [Engineer]"); 
            AddMenuItem(menu, "1115", "Rancho Relaxo [Engineer]"); 
            AddMenuItem(menu, "30618", "Bucking Bronco [Engineer]"); 
        } 
        case TFClass_Medic: 
        { 
            AddMenuItem(menu, "477", "Meet the Medic [Medic]"); 
            AddMenuItem(menu, "1109", "Results Are In [Medic]"); 
            AddMenuItem(menu, "30918", "Surgeon's Squeezebox [Medic]"); 
        } 
        case TFClass_Sniper: 
        { 
            AddMenuItem(menu, "1116", "I See You [Sniper]"); 
            AddMenuItem(menu, "30609", "The Killer Solo [Sniper]"); 
            AddMenuItem(menu, "30614", "Most Wanted [Sniper]"); 
            AddMenuItem(menu, "30839", "Didgeridrongo [Sniper]"); 
        } 
        case TFClass_Spy: 
        { 
            AddMenuItem(menu, "1108", "Buy A Life [Spy]"); 
            AddMenuItem(menu, "30615", "Box Trot [Spy]"); 
            AddMenuItem(menu, "30762", "Disco Fever [Spy]"); 
            AddMenuItem(menu, "30922", "Luxury Lounge [Spy]"); 
        } 
    } 
    AddMenuItem(menu, "167", "High Five! [Any]"); 
    AddMenuItem(menu, "438", "Director's Vision [Any]"); 
    AddMenuItem(menu, "463", "Schadenfreude [Any]"); 
    AddMenuItem(menu, "1015", "Shred Alert [Any]"); 
    AddMenuItem(menu, "1106", "Square Dance [Any]"); 
    AddMenuItem(menu, "1107", "Flippin' Awesome [Any]"); 
    AddMenuItem(menu, "1110", "Rock, Paper, Scissors [Any]"); 
    AddMenuItem(menu, "1111", "Skullcracker [Any]"); 
    AddMenuItem(menu, "1118", "Conga [Any]"); 
    AddMenuItem(menu, "1157", "Kazotsky Kick [Any]"); 
    AddMenuItem(menu, "1162", "Mannrobics [Any]"); 
    AddMenuItem(menu, "1172", "Victory Lap [Any]"); 
    AddMenuItem(menu, "1182", "Yeti Punch [Any]"); 
    AddMenuItem(menu, "1183", "Yeti Smash [Any]");     
    AddMenuItem(menu, "30621", "Burtchester [Any]"); 
    AddMenuItem(menu, "30672", "Zoomin' Broom [Any]"); 
    AddMenuItem(menu, "30816", "Second Rate Sourcery [Any]"); 
     
    DisplayMenu(menu, client, 20); 
} 

public Tauntme_MenuSelected(Handle:menu, MenuAction:action, iClient, param2) 
{ 
    if(action == MenuAction_End) 
    { 
        CloseHandle(menu); 
    } 
     
    if(action == MenuAction_Select) 
    { 
        decl String:info[12]; 
         
        GetMenuItem(menu, param2, info, sizeof(info)); 
        ExecuteTaunt(iClient, StringToInt(info)); 
    } 
} 

ExecuteTaunt(client, itemdef) 
{ 
    static Handle:hItem; 
    hItem = TF2Items_CreateItem(OVERRIDE_ALL|PRESERVE_ATTRIBUTES|FORCE_GENERATION); 
     
    TF2Items_SetClassname(hItem, "tf_wearable_vm"); 
    TF2Items_SetQuality(hItem, 6); 
    TF2Items_SetLevel(hItem, 1); 
    TF2Items_SetNumAttributes(hItem, 0); 
    TF2Items_SetItemIndex(hItem, itemdef); 
     
    new ent = TF2Items_GiveNamedItem(client, hItem); 
    new Address:pEconItemView = GetEntityAddress(ent) + Address:FindSendPropInfo("CTFWearable", "m_Item"); 
     
    SDKCall(hPlayTaunt, client, pEconItemView) ? 1 : 0; 
    AcceptEntityInput(ent, "Kill"); 
}
This should check if there's an argument and translate that into an id and just execute it on you. (this is assuming this code works with the menu already)
__________________
I sometimes do commissions.
Drixevel is offline
ApoziX
Member
Join Date: Sep 2018
Old 10-21-2018 , 11:43   Re: [req] Taunts Bind
Reply With Quote #3

Quote:
Originally Posted by Drixevel View Post
Code:
#pragma semicolon 1 

#include <sdktools> 
#include <tf2items> 
#include <tf2_stocks> 

#define PLUGIN_VERSION "1.0" 

public Plugin:myinfo = 
{ 
    name = "[TF2] Taunt Menu", 
    author = "FlaminSarge, Nighty, xCoderx", 
    description = "Displays a nifty taunt menu.", 
    version = PLUGIN_VERSION, 
    url = "http://forums.alliedmods.net/showthread.php?t=242866" 
}; 

new Handle:hPlayTaunt; 

public OnPluginStart() 
{ 
    new Handle:conf = LoadGameConfigFile("tf2.tauntem"); 
     
    if (conf == INVALID_HANDLE) 
    { 
        SetFailState("Unable to load gamedata/tf2.tauntem.txt. Good luck figuring that out."); 
        return; 
    } 
     
    StartPrepSDKCall(SDKCall_Player); 
    PrepSDKCall_SetFromConf(conf, SDKConf_Signature, "CTFPlayer::PlayTauntSceneFromItem"); 
    PrepSDKCall_AddParameter(SDKType_PlainOldData, SDKPass_Plain); 
    PrepSDKCall_SetReturnInfo(SDKType_Bool, SDKPass_Plain); 
    hPlayTaunt = EndPrepSDKCall(); 
     
    if (hPlayTaunt == INVALID_HANDLE) 
    { 
        SetFailState("Unable to initialize call to CTFPlayer::PlayTauntSceneFromItem. Wait patiently for a fix."); 
        CloseHandle(conf); 
        return; 
    } 
     
    RegAdminCmd("sm_taunt", Cmd_TauntMenu, ADMFLAG_CUSTOM6, "Taunt Menu"); 
    RegAdminCmd("sm_taunts", Cmd_TauntMenu, ADMFLAG_CUSTOM6, "Taunt Menu"); 
    CloseHandle(conf); 
    LoadTranslations("common.phrases"); 
    CreateConVar("tf_tauntem_version", PLUGIN_VERSION, "[TF2] Taunt 'em Version", FCVAR_NOTIFY); 
} 

public Action:Cmd_TauntMenu(client, args) 
{ 
	if (args > 0)
	{
		char sID[16];
		GetCmdArgString(sID, sizeof(sID));
		ExecuteTaunt(client, StringToInt(sID)); 
		return Plugin_Handled; 
	}
	
	ShowMenu(client); 
	return Plugin_Handled; 
} 

public Action:ShowMenu(client) 
{ 
    new TFClassType:class = TF2_GetPlayerClass(client); 
    new Handle:menu = CreateMenu(Tauntme_MenuSelected); 
    SetMenuTitle(menu, "[FZG] Taunts:"); 
     
    switch(class) 
    { 
        case TFClass_Scout: 
        { 
            AddMenuItem(menu, "1197", "The Scooty Scoot [Scout]"); 
            AddMenuItem(menu, "1117", "Battin' a Thousand [Scout]"); 
            AddMenuItem(menu, "1119", "Deep Fried Desire [Scout]"); 
            AddMenuItem(menu, "1168", "Carlton [Scout]"); 
            AddMenuItem(menu, "30572", "The Boston Breakdance [Scout]"); 
            AddMenuItem(menu, "30917", "The Trackman's Touchdown [Scout]"); 
            AddMenuItem(menu, "30920", "The Bunnyhopper [Scout]"); 
            AddMenuItem(menu, "30921", "Runner's Rhythm [Scout]"); 
        } 
        case TFClass_Soldier: 
        { 
            AddMenuItem(menu, "1196", "Panzer Pants [Soldier]"); 
            AddMenuItem(menu, "1113", "Fresh Brewed Victory [Soldier]"); 
            AddMenuItem(menu, "30673", "Soldier's Requiem [Soldier]"); 
            AddMenuItem(menu, "30761", "The Fubar Fanfare [Soldier]"); 
        } 
        case TFClass_Pyro: 
        { 
            AddMenuItem(menu, "30876", "Headcase [Pyro]"); 
            AddMenuItem(menu, "1112", "Party Trick [Pyro]"); 
            AddMenuItem(menu, "30570", "Pool Party [Pyro]"); 
            AddMenuItem(menu, "30763", "The Balloonibouncer [Pyro]"); 
            AddMenuItem(menu, "30919", "The Skating Scorcher [Pyro]"); 
        } 
        case TFClass_DemoMan: 
        { 
            AddMenuItem(menu, "1114", "Spent Well Spirits [Demoman]"); 
            AddMenuItem(menu, "1120", "Oblooterated [Demoman]"); 
            AddMenuItem(menu, "30671", "Bad Pipes [Demoman]"); 
            AddMenuItem(menu, "30840", "Scotsmann's Stagger [Demoman]"); 
        } 
        case TFClass_Heavy: 
        { 
            AddMenuItem(menu, "30843", "Russian Arms Race [Heavy]"); 
            AddMenuItem(menu, "30844", "Soviet Strongarm [Heavy]"); 
            AddMenuItem(menu, "1174", "Table Tantrum [Heavy]"); 
            AddMenuItem(menu, "1175", "Boiling Point [Heavy]"); 
            AddMenuItem(menu, "30616", "Proletariat Posedown [Heavy]"); 
        } 
        case TFClass_Engineer: 
        { 
            AddMenuItem(menu, "30842", "Dueling Banjo [Engineer]"); 
            AddMenuItem(menu, "30845", "Jumping Jack [Engineer]"); 
            AddMenuItem(menu, "1115", "Rancho Relaxo [Engineer]"); 
            AddMenuItem(menu, "30618", "Bucking Bronco [Engineer]"); 
        } 
        case TFClass_Medic: 
        { 
            AddMenuItem(menu, "477", "Meet the Medic [Medic]"); 
            AddMenuItem(menu, "1109", "Results Are In [Medic]"); 
            AddMenuItem(menu, "30918", "Surgeon's Squeezebox [Medic]"); 
        } 
        case TFClass_Sniper: 
        { 
            AddMenuItem(menu, "1116", "I See You [Sniper]"); 
            AddMenuItem(menu, "30609", "The Killer Solo [Sniper]"); 
            AddMenuItem(menu, "30614", "Most Wanted [Sniper]"); 
            AddMenuItem(menu, "30839", "Didgeridrongo [Sniper]"); 
        } 
        case TFClass_Spy: 
        { 
            AddMenuItem(menu, "1108", "Buy A Life [Spy]"); 
            AddMenuItem(menu, "30615", "Box Trot [Spy]"); 
            AddMenuItem(menu, "30762", "Disco Fever [Spy]"); 
            AddMenuItem(menu, "30922", "Luxury Lounge [Spy]"); 
        } 
    } 
    AddMenuItem(menu, "167", "High Five! [Any]"); 
    AddMenuItem(menu, "438", "Director's Vision [Any]"); 
    AddMenuItem(menu, "463", "Schadenfreude [Any]"); 
    AddMenuItem(menu, "1015", "Shred Alert [Any]"); 
    AddMenuItem(menu, "1106", "Square Dance [Any]"); 
    AddMenuItem(menu, "1107", "Flippin' Awesome [Any]"); 
    AddMenuItem(menu, "1110", "Rock, Paper, Scissors [Any]"); 
    AddMenuItem(menu, "1111", "Skullcracker [Any]"); 
    AddMenuItem(menu, "1118", "Conga [Any]"); 
    AddMenuItem(menu, "1157", "Kazotsky Kick [Any]"); 
    AddMenuItem(menu, "1162", "Mannrobics [Any]"); 
    AddMenuItem(menu, "1172", "Victory Lap [Any]"); 
    AddMenuItem(menu, "1182", "Yeti Punch [Any]"); 
    AddMenuItem(menu, "1183", "Yeti Smash [Any]");     
    AddMenuItem(menu, "30621", "Burtchester [Any]"); 
    AddMenuItem(menu, "30672", "Zoomin' Broom [Any]"); 
    AddMenuItem(menu, "30816", "Second Rate Sourcery [Any]"); 
     
    DisplayMenu(menu, client, 20); 
} 

public Tauntme_MenuSelected(Handle:menu, MenuAction:action, iClient, param2) 
{ 
    if(action == MenuAction_End) 
    { 
        CloseHandle(menu); 
    } 
     
    if(action == MenuAction_Select) 
    { 
        decl String:info[12]; 
         
        GetMenuItem(menu, param2, info, sizeof(info)); 
        ExecuteTaunt(iClient, StringToInt(info)); 
    } 
} 

ExecuteTaunt(client, itemdef) 
{ 
    static Handle:hItem; 
    hItem = TF2Items_CreateItem(OVERRIDE_ALL|PRESERVE_ATTRIBUTES|FORCE_GENERATION); 
     
    TF2Items_SetClassname(hItem, "tf_wearable_vm"); 
    TF2Items_SetQuality(hItem, 6); 
    TF2Items_SetLevel(hItem, 1); 
    TF2Items_SetNumAttributes(hItem, 0); 
    TF2Items_SetItemIndex(hItem, itemdef); 
     
    new ent = TF2Items_GiveNamedItem(client, hItem); 
    new Address:pEconItemView = GetEntityAddress(ent) + Address:FindSendPropInfo("CTFWearable", "m_Item"); 
     
    SDKCall(hPlayTaunt, client, pEconItemView) ? 1 : 0; 
    AcceptEntityInput(ent, "Kill"); 
}
This should check if there's an argument and translate that into an id and just execute it on you. (this is assuming this code works with the menu already)
What do you mean?
__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
PC Gamer
Senior Member
Join Date: Mar 2014
Old 10-21-2018 , 16:19   Re: [req] Taunts Bind
Reply With Quote #4

Drixevel was kind enough to edit the code for you. Once compiled it will allow you to do this:
1. Show a menu by typing: !taunt
2. Start the High Five taunt by typing: !taunt 167
3. Start the Conga taunt by typing: !taunt 1118
4. Start any taunt by typing: !taunt <taunt id>

You can also do this by installing the Taunt 'em plugin by Flamin Sarge which would allow you to target yourself or others. Here's the link: https://forums.alliedmods.net/showthread.php?t=242866

Last edited by PC Gamer; 10-21-2018 at 16:20.
PC Gamer is offline
ApoziX
Member
Join Date: Sep 2018
Old 10-21-2018 , 17:32   Re: [req] Taunts Bind
Reply With Quote #5

Quote:
Originally Posted by PC Gamer View Post
Drixevel was kind enough to edit the code for you. Once compiled it will allow you to do this:
1. Show a menu by typing: !taunt
2. Start the High Five taunt by typing: !taunt 167
3. Start the Conga taunt by typing: !taunt 1118
4. Start any taunt by typing: !taunt <taunt id>

You can also do this by installing the Taunt 'em plugin by Flamin Sarge which would allow you to target yourself or others. Here's the link: https://forums.alliedmods.net/showthread.php?t=242866
Thats not what I meant. I wanted Like the high five taunt will be taunt id 1

so what I did is simple I have downloaded Command chat trigger and when I did !taunt 1 It will execute the high five taunt on me
__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
ApoziX
Member
Join Date: Sep 2018
Old 10-21-2018 , 17:34   Re: [req] Taunts Bind
Reply With Quote #6

I Used That

And Thats the commandtriggers.cfg

PHP Code:
"Command_Triggers"
{
    
"!suicide"
    
{
        
"command"        "sm_kill #{USERID}"
        "type"            "server"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 1"
    
{
        
"command"        "sm_tauntme 167"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 2"
    
{
        
"command"        "sm_tauntme 438"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 3"
    
{
        
"command"        "sm_tauntme 463"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 4"
    
{
        
"command"        "sm_tauntme 1015"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 5"
    
{
        
"command"        "sm_tauntme 1106"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 6"
    
{
        
"command"        "sm_tauntme 1107"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 7"
    
{
        
"command"        "sm_tauntme 1110"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 8"
    
{
        
"command"        "sm_tauntme 1111"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 9"
    
{
        
"command"        "sm_tauntme 1118"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 10"
    
{
        
"command"        "sm_tauntme 1157"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 11"
    
{
        
"command"        "sm_tauntme 1162"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 12"
    
{
        
"command"        "sm_tauntme 1172"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 13"
    
{
        
"command"        "sm_tauntme 1182"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 14"
    
{
        
"command"        "sm_tauntme 1183"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 15"
    
{
        
"command"        "sm_tauntme 30621"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 16"
    
{
        
"command"        "sm_tauntme 30672"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 17"
    
{
        
"command"        "sm_tauntme 30816"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 18"
    
{
        
"command"        "sm_tauntme 1197"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 19"
    
{
        
"command"        "sm_tauntme 1117"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 20"
    
{
        
"command"        "sm_tauntme 1119"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 21"
    
{
        
"command"        "sm_tauntme 1168"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 22"
    
{
        
"command"        "sm_tauntme 30572"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 23"
    
{
        
"command"        "sm_tauntme 30917"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 24"
    
{
        
"command"        "sm_tauntme 30920"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 25"
    
{
        
"command"        "sm_tauntme 30921"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 26"
    
{
        
"command"        "sm_tauntme 1196"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 27"
    
{
        
"command"        "sm_tauntme 1113"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 28"
    
{
        
"command"        "sm_tauntme 30673"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 29"
    
{
        
"command"        "sm_tauntme 30761"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 30"
    
{
        
"command"        "sm_tauntme 30876"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 31"
    
{
        
"command"        "sm_tauntme 1112"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 32"
    
{
        
"command"        "sm_tauntme 30570"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 33"
    
{
        
"command"        "sm_tauntme 30763"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 34"
    
{
        
"command"        "sm_tauntme 30919"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 35"
    
{
        
"command"        "sm_tauntme 1114"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 36"
    
{
        
"command"        "sm_tauntme 1120"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 37"
    
{
        
"command"        "sm_tauntme 30671"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 38"
    
{
        
"command"        "sm_tauntme 30840"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 39"
    
{
        
"command"        "sm_tauntme 30843"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 40"
    
{
        
"command"        "sm_tauntme 30844"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 41"
    
{
        
"command"        "sm_tauntme 1174"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 42"
    
{
        
"command"        "sm_tauntme 1175"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 43"
    
{
        
"command"        "sm_tauntme 30616"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 44"
    
{
        
"command"        "sm_tauntme 30842"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 45"
    
{
        
"command"        "sm_tauntme 30845"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 46"
    
{
        
"command"        "sm_tauntme 1115"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 47"
    
{
        
"command"        "sm_tauntme 30618"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 48"
    
{
        
"command"        "sm_tauntme 477"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 49"
    
{
        
"command"        "sm_tauntme 1109"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 50"
    
{
        
"command"        "sm_tauntme 30918"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 51"
    
{
        
"command"        "sm_tauntme 1116"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 52"
    
{
        
"command"        "sm_tauntme 30609"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 53"
    
{
        
"command"        "sm_tauntme 30614"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 54"
    
{
        
"command"        "sm_tauntme 30839"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 55"
    
{
        
"command"        "sm_tauntme 1108"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 56"
    
{
        
"command"        "sm_tauntme 30615"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 57"
    
{
        
"command"        "sm_tauntme 30762"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}
    
"!taunt 58"
    
{
        
"command"        "sm_tauntme 30922"
        "type"            "client"
        "hidden"        "1"            
// If this is specified, the chat trigger will not be shown after it is used
    
}

__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Lazytown
Old 10-22-2018 , 08:57   Re: [req] Taunts Bind
Reply With Quote #7

Quote:
Originally Posted by ApoziX View Post
Thats not what I meant. I wanted Like the high five taunt will be taunt id 1

so what I did is simple I have downloaded Command chat trigger and when I did !taunt 1 It will execute the high five taunt on me
That's what it does, except it's not the id of '1' but the id '167' instead.
__________________
I sometimes do commissions.
Drixevel is offline
ApoziX
Member
Join Date: Sep 2018
Old 10-23-2018 , 14:03   Re: [req] Taunts Bind
Reply With Quote #8

Quote:
Originally Posted by Drixevel View Post
That's what it does, except it's not the id of '1' but the id '167' instead.
Yeah I know its not id 1 but it easier to remember
__________________
Looking To Start A TF2 Community
My Discord | My Steam
ApoziX is offline
Mr_panica
Member
Join Date: Jan 2017
Location: Russia, Saint-Petersburg
Old 10-24-2018 , 04:10   Re: [req] Taunts Bind
Reply With Quote #9

I apologize, where can I get the ID of the new taunts?
__________________
Sorry for my English.
Mr_panica is offline
PC Gamer
Senior Member
Join Date: Mar 2014
Old 10-25-2018 , 16:33   Re: [req] Taunts Bind
Reply With Quote #10

Kamil445 posted them in the Taunt 'em plugin thread: https://forums.alliedmods.net/showpo...&postcount=411

"1196", "Panzer Pants"
"1197", "The Scooty Scoot"
PC Gamer 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 03:52.


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