Hi,
I have my own Gmod Murder Server and have set up Pointshop. It opens fine with F3 likes usual and all default items included display, but I can't add my own player models? I have successfully added one, but a bunch others won't install and I get the following error appropriate to the model:
Lua Error:
[POINTSHOP] Item missing name: playermodels/mario.lua
Can anyone help? :)
Thanks.
Post your code.
[QUOTE=code_gs;44582744]Post your code.[/QUOTE]
If you're regarding the .lua file, here's the code:
[QUOTE][I]ITEM.Name = ‘Mario’
ITEM.Price = 500
ITEM.Model = 'models/player/slow/mario.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[/I][/QUOTE]
[QUOTE=tomevans;44583790]If you're regarding the .lua file, here's the code:[/QUOTE]
1. In the future, use [code] tags, not [quote] for code. Also, don't italicize it.
2. If it appears as an error, then that means you don't have the model on the server and/or you aren't sending the model to player.
[QUOTE=code_gs;44583892]1. In the future, use tags, not for code. Also, don't italicize it.[/QUOTE]
Okay, thanks. I have the model in the directory on the server (keep in mind this is hosted with a company) that the working model is (both in separate folders), so it's not that.
Do you know what 'missing name' it is on about? The file has a name specified in it as you can see and the file name (mario.lua) does not have any spaces or capital letters, as the guy who created it advises.
No idea; never have seen that error.
Oh, I see your issue. You're using weird quotes surrounding your ITEM.Name string. Use normal quotes.
The default Kliener model provided with Pointshop uses apostrophes. I copied and pasted the .lua file from the default one and changed the appropriate parts (model location and name).
They're not, because they're not default apostrophes. Just replace them with the correct ones.
Sorry, you need to Log In to post a reply to this thread.