Pointshop addon´s

Hello Community,
I´ve got 2 questions about the Pointshop

**The first, how to add ammuniton to the poitshop ?
I searched around the web and i only found a dead link tutorial. **

The second, is for my TTT Server,
I´ve got an detectiv pass,

here is my code :
ITEM.Name = ‘Detective’
ITEM.Price = 5000
ITEM.Material = ‘VGUI/ttt/sprite_detectiv.vmt’
ITEM.OneUse = true

function ITEM:OnEquip(ply, modifications)
hook.Add(“TTTBeginRound”, ply:UniqueID() … “_detective”, function()
if ply:GetRoleString() != “detective” then
ply:AddCredits(GetConVarNumber(“ttt_credits_starti ng”))

if SERVER then

hook.Remove(“TTTBeginRound”, ply:UniqueID() … “_detective”)

function ITEM:OnHolster(ply)
hook.Remove(“TTTBeginRound”, ply:UniqueID() … “_detective”)

function ITEM:OnSell(ply)
hook.Remove(“TTTBeginRound”, ply:UniqueID() … “_detective”)
end **

The code work but the picture dont work,

I hope one or 2 can help me,
Deadalus3010, aka Lucas.

Hey there, be more careful in future since you’ve made two threads and avoid bolding parts of your post.

‘VGUI/ttt/sprite_detectiv.vmt’ looks like a typo, is that what the actual file is called as opposed to sprite_detective? Make sure the material is on the server and fastdl’d, too.

No need for all the bold text which is hard to read along with the random bbcode.

To add ammo, you can use Player:GiveAmmo( amount, type ) in the OnEquip code.

Example of some of the ammo types: https://dl.dropboxusercontent.com/u/26074909/tutoring/weapons/hl2_weapons_table.lua

Example of getting the table of a weapon and giving ammo based on the primary type: https://dl.dropboxusercontent.com/u/26074909/tutoring/entities/ammo_dispenser_entity.lua.html

You’d use Player:GetActiveWeapon( ) instead of _w in the loop.