I've searched vigorously throughout google for a method to get the player models to show in my server, but to no avail. What I've done is add the model's file into the addon's folder, go into the pointshop playermodel folder and create a lua file, add the base code and rename/edit the model name and directory. Here's what the code looks like for one of the models.
ITEM.Name = 'Master Chief'
ITEM.Price = 25000
ITEM.Model = 'models/player/chief.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
function ITEM:PlayerSetModel(ply)
ply:SetModel(self.Model)
end
The models shows up in my pointshop, but only as a giant error. Could anyone please help me with this problem?
Did you add the model to your fast DL? Also you say you added the model to your pointshop folder, I haven't used pointshop in forever, but are you sure that's where it goes?
[QUOTE=thelurker1234;45406922]Did you add the model to your fast DL? Also you say you added the model to your pointshop folder, I haven't used pointshop in forever, but are you sure that's where it goes?[/QUOTE]
No, I added the model to the addons folder along with the pointshop, but created a lua file for the model inside the pointshop's items.
Make sure you're actually downloading the models, and that the model paths are correct.
Make sure you have it in auto download, like veryone else said. To do that, i would recommend googling a video on it, because it is way too much to explain in text. Make sure the path is the same as the one in (name of playermodel)/lua/autorun.lua In that file, they should have a little bit of code, and in quotation marks, a file. use that file location, exactly. That should be it, and if it still doesn't work, i can see what i can do. On another note, when you do get it working, and for everyone else, make sure you check the size of the file... Nobody wants to download a giant model for a server they may never jon again. Even if it is the first time, still...
[QUOTE=Bazoogle;45410067]Make sure you have it in auto download, like veryone else said. To do that, i would recommend googling a video on it, because it is way too much to explain in text. Make sure the path is the same as the one in (name of playermodel)/lua/autorun.lua In that file, they should have a little bit of code, and in quotation marks, a file. use that file location, exactly. That should be it, and if it still doesn't work, i can see what i can do. On another note, when you do get it working, and for everyone else, make sure you check the size of the file... Nobody wants to download a giant model for a server they may never jon again. Even if it is the first time, still...[/QUOTE]
Actually, I've gotten about half of the models to work now. But for some reason, when I do the same thing for the other models, they show up as errors. Still don't understand why. Are there some models that aren't compatible with certain gamemodes?
I've had some models simply not work, despite all attempts. Sometimes related to models, or broken aspects.
Make sure it's a player model also, not a NPC.
[QUOTE=Eoj Nawoh;45417311]I've had some models simply not work, despite all attempts. Sometimes related to models, or broken aspects.
Make sure it's a player model also, not a NPC.[/QUOTE]
Wrong. Even if the model is an NPC, ragdoll, or prop, it will still display correctly; it will just have some animation issues.
Make sure you are using resource.Addfile + a webhost or resource.AddWorkshop to send the models to players.
Sorry, you need to Log In to post a reply to this thread.