• Players Can't Equip Player Models in PointShop? (Is my code wrong?)
    11 replies, posted
On my Prop Hunt server, I can equip player models but admins and regular players cannot. Did I write the the lua file wrong? If you could give it a quick once-over or point me in the right direction, I'd appreciate it NOTE: this example is one meant only for admins garrysmod\addons\pointshop\lua\pointshop\items\playermodels\ ITEM.Name = 'Chiaki' ITEM.Price = 1 ITEM.Model = "models/player/dewobedil/chiaki_nanami/default_p.mdl" ITEM.AllowedUserGroups = ( "admin" ) 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:OnHolster(ply) ply:SetModel (self.Model) end Thanks so much for your help!
I don't understand your question...This example works on admins?
ITEM.AllowedUserGroups = ( "admin" ) Be sure that you want this item only for admin. Also, if your admins can't use the, check their usergroup. This item may be available only for "admin" usergroup. GetUserGroup() PointShop Documentation
Yeah, this model is only meant for an admin and she is in the admin group but she can't equip this model (or any model for that matter)
And your admins are in "admin" usergroup? I find file that checks access for item. It uses usergroup
Yes, my admin is int he "admin" usergroup. I even tried removing her and adding her back with no improvement. And she can't even equip the player models that aren't "admin" restricted :/ What exactly do you mean when you say "I find file that checks access for item. It uses usergroup"?
I mean, that I had search for file and found it. pointshop/sv_player_extension.lua at 50afa56a4bb5efc53532cdcbabf..
But shouldn't she still be able to use player models that regular "users" can use? For some reason, I am able to equip any model. But she can't equip the player model for admins, or the player models made for plain "users"
Sorry to point it out but you are using () when you need to use {}
Point out whatever you'd like lol so long as it helps I don't care But oddly enough, I use ( "admin" ) for my player model and I am able to equip it. In fact I use ()'s instead of {}'s and it works just fine
Just use the {} brackets and see what happens.
Sorry, you need to Log In to post a reply to this thread.