Custom Player Models in point shop are just a ERROR
0 replies, posted
I am trying to add custom models to my server but all anyone can see is errors. I have all the models and materials in the correct place and I have the .lua in the autorun section this is the code :
[QUOTE]
if (SERVER) then
player_manager.AddValidModel( "Arnold Schwarzenegger", "models/player/arnold_schwarzenegger.mdl" );
AddCSLuaFile( "arnoldschwarzenegger.lua" )
end
list.Set( "PlayerOptionsModel", "Arnold Schwarzenegger", "models/player/arnold_schwarzenegger.mdl" );
if (SERVER) then
resource.AddFile( "models/player/arnold_schwarzenegger.mdl" )
resource.AddFile( "materials/models/player/arnoldschwarzenegger/arnold_t-850_d.vmt" )
resource.AddFile( "materials/models/player/arnoldschwarzenegger/arnold_t-850_d.vtf" )
end[/QUOTE]
Then in the pointshop I have this code :
[QUOTE]ITEM.Name = 'Arnold'
ITEM.Price = 10
ITEM.Model = 'models/player/arnold_schwarzenegger.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
[/QUOTE]
But it still shows huge error sighs when equipped and people do not seem to be downloading hte files.
Sorry, you need to Log In to post a reply to this thread.