I keep getting this lua error but I don't understand why.
[CODE]
[ERROR] addons/pointshop-master/lua/items/playermodels/marty.lua:19: attempt to call global 'AddPlayerModel' (a nil value)
1. unknown - addons/pointshop-master/lua/items/playermodels/marty.lua:19
2. include - [C]:-1
3. LoadItems - addons/pointshop-master/lua/sh_pointshop.lua:105
4. unknown - addons/pointshop-master/lua/autorun/pointshop.lua:35
[/CODE]
Anyone know why?
Post the code.
[CODE]ITEM.Name = 'Marty'
ITEM.Price = 10000
ITEM.Model = 'models/player/mart.mdl'
function ITEM:OnEquip(ply, modifications)
if not ply._OldModel then
ply._OldModel = ply:GetModel()
end
timer.Simple(1, function() ply:SetModel(self.Model) end)
end
function ITEM:OnHolster(ply)
if ply._OldModel then
ply:SetModel(ply._OldModel)
end
end
AddPlayerModel( "marty", "models/player/mart.mdl" )[/CODE]
Remove the AddPlayerModel line. I can't find anything on the net where that function is from.
That fixed it. Thank you!
Sorry, you need to Log In to post a reply to this thread.