Making pointshop taunts work :)

Hello i am trying to make taunts work in my pointshop like a player buys a taunt and if they press a key say T it would play the taunt

i know lua i just need to know how to do this i can do the code just need an example. but help would be great

What have you tried so far?

oh hey acecool i lost the scripts but it checked for if the player had the item then used a keypress function then when the key is pressed it would play the sound

Well… Since I did write one to give out…

This is the “bloated” version:

And this is the simplified version:

how would i use this?

The first in the list is the “item”. The second is a shared file where you declare the enumeration for each taunt item you want to use so that the item can see the id. The third file is the back-end ( in the simplified version, everything goes through it ).

It’d need to be put into the pointshop folder, and includes would need to be added so the shared file gets loaded as one of the first, the sv file should be next. The items can just be dropped in.

Hopefully these tutorials and information helps. As always, to view the Lua from any of my tutorials to enable copy/pasting ( HTML doesn’t copy/paste well in terms of HTML / CSS Highlighted Lua ), remove .html from the url.

i dont understand how to use it but?

[editline]20th September 2014[/editline]

well acecool is currently afk so if anyone has any other ways for taunts please do tell lol


Check out how the Pointshop handles detecting what the player has equipped and then look into the various KeyPress/KeyDown related functions

Niandra but im not good in putting it all together thats why i came here… so u peeps can help

Link me to the pointshop git and I’ll tell you where to add the includes, and AddCSLuaFile. The item just drops into the items folder / nested folder and the system only allows one taunt to be equipped at a time. It forces the user to unequip before equipping another. If I was familiar with pointshop, I’d change it to auto unequip the previous taunt.

Just a note: I have told CertifiedCode where to put the includes in Steam about 3 times now ( the file that pointshop has the includes in, which I am pretty sure it does have an includer file )… I am unsure how you wanted to create a taunt system when you’re unable to look through the files yourself to find where the includes are happening. I am happy to teach those willing to learn, but if you won’t help yourself then there’s nothing more I can do. there ace cool


Create a new folder inside of pointshop/lua/ called pointshopmods.

so: addons/pointshop/lua/pointshopmods/ exists.

Drop these two Lua files into that folder.

Next, modify: addons/pointshop/lua/autorun/pointshop.lua


if SERVER then AddCSLuaFile() include "pointshop/sv_init.lua" end
if CLIENT then include "pointshop/cl_init.lua" end


if SERVER then
	// Must load before pointshop because the items use this code... - Acecool
	AddCSLuaFile( "pointshopmods/sh_taunt_system.lua" );
	include( "pointshopmods/sh_taunt_system.lua" );
	include( "pointshopmods/sv_taunt_system_simplification_solution.lua" );

	AddCSLuaFile( );
	include( "pointshop/sv_init.lua" );
	// Must load before pointshop because the items use this code... - Acecool
	include( "pointshopmods/sh_taunt_system.lua" );

	include( "pointshop/cl_init.lua" );

PS:Initialize( );

Next… put the following file into addons/pointshop/lua/pointshop/items/taunts/

You’ll notice that there are 2 taunts declared inside of sh_taunt_system.lua BUT I only included 1 taunt example…-- ANY TAUNTS YOU ADD… Add the same structure, just follow the pattern…

To add a new taunt, make sure the enumeration exists in the sh_ file…

Change: ITEM.TauntID = TAUNT_OH_NO; – to the new enumeration you used such as TAUNT_OH_NO2
Change: ITEM.Price = 50000; – to whatever you want it to cost.
Change: ITEM.Model = “”; – to include a valid model

Everything below the Model line should be filled in dynamically using the data inside the sh_ file.

Pointshop should take care of the rest.