Recently my "Jump Pack" accessory suddenly stopped working.
Here's the default code for the jumppack that I'm currently using:
[CODE]ITEM.Name = 'Jump Pack'
ITEM.Price = 1000
ITEM.Model = 'models/xqm/jetengine.mdl'
ITEM.Bone = 'ValveBiped.Bip01_Spine2'
function ITEM:OnEquip(ply, modifications)
ply:PS_AddClientsideModel(self.ID)
end
function ITEM:OnHolster(ply)
ply:PS_RemoveClientsideModel(self.ID)
end
function ITEM:ModifyClientsideModel(ply, model, pos, ang)
model:SetModelScale(0.5, 0)
pos = pos + (ang:Right() * 7) + (ang:Forward() * 6)
return model, pos, ang
end
function ITEM:Think(ply, modifications)
if ply:KeyDown(IN_JUMP) then
ply:SetVelocity(ply:GetUp() * 6)
end
end[/CODE]
Here's the error it's throwing:
[CODE][ERROR] addons/customps/lua/sv_player_extension.lua:234: attempt to call method 'OnBuy' (a nil value)
1. PS_BuyItem - addons/customps/lua/sv_player_extension.lua:234
2. func - addons/customps/lua/sv_pointshop.lua:4
3. unknown - lua/includes/modules/net.lua:32[/CODE]
Lastly, here's what I have in my sv_player_extension file on line 234:
[CODE] ITEM:OnBuy(self)[/CODE]
This also randomly happened to the backpack that I had in my shop before, but I removed it as nobody was buying it anyways. The jumppack had been working fine up until today, but I haven't changed anything that would affect those files recently.
Additional Info:
I'm currently using the "Advanced Point Shop [PAC]" as my pointshop.
Sorry, you need to Log In to post a reply to this thread.