• Disabling Pointshop playermodels on prophunt?
    6 replies, posted
Basically, pointshop skins are breaking my prophunt gamemode because props cant be killed unless the user removes his/her player model. I have been trying for a while to get a method of [B][I]holstering [/I]any/all player models[/B] the user has equipped and [B][I]disabling [/I]the category[/B] while they are on TEAM_PROPS but I cant for the life of me get it working! Can you guys offer any suggestions?
[QUOTE=Handsome Matt;42661925] ITEM.Name = 'Kleiner'ITEM.Price = 250ITEM.Model = 'models/player/kleiner.mdl'function ITEM:OnEquip(ply, modifications) if ply:Team() == TEAM_PROPS then return end if not ply._OldModel then ply._OldModel = ply:GetModel() end timer.Simple(1, function() ply:SetModel(self.Model) end)endfunction ITEM:OnHolster(ply) if ply:Team() == TEAM_PROPS then return end if ply._OldModel then ply:SetModel(ply._OldModel) endendfunction ITEM:PlayerSetModel(ply) if ply:Team() == TEAM_PROPS then return end ply:SetModel(self.Model)end Sorry there's not an easier way, we're working on adding more hooks to make limiting categories and items easier.[/QUOTE] Thanks, ill test it out now! Edit: Thank you so much! It works a charm, love you ;)
[QUOTE=Handsome Matt;42661925][lua]ITEM.Name = 'Kleiner' ITEM.Price = 250 ITEM.Model = 'models/player/kleiner.mdl' function ITEM:OnEquip(ply, modifications) if ply:Team() == TEAM_PROPS then return end 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:Team() == TEAM_PROPS then return end if ply._OldModel then ply:SetModel(ply._OldModel) end end function ITEM:PlayerSetModel(ply) if ply:Team() == TEAM_PROPS then return end ply:SetModel(self.Model) end[/lua] Sorry there's not an easier way, we're working on adding more hooks to make limiting categories and items easier.[/QUOTE] How would I set up this code for trails, backpacks, and hats? Also, does this code re-apply the items to the player after they switch back?
[QUOTE=WitheredPyre;42759341]How would I set up this code for trails, backpacks, and hats? Also, does this code re-apply the items to the player after they switch back?[/QUOTE] Yes it re-applies the item. However this code is quite specific to player models, a item verson would be different by quite a stretch im guessing.
I've made a couple of trails pack for the Workshop, so I would very much appreciate some help on setting up this code for materials.
[QUOTE=WitheredPyre;42759341]How would I set up this code for trails, backpacks, and hats? Also, does this code re-apply the items to the player after they switch back?[/QUOTE] I tried this and works fine but part of the model like a pie shape shows up in preview when a prop and also causes that to be the props shadow. Not sure how to get around this. Maybe a nodraw or something statement. Any ideas? Thanks!
Sorry, you need to Log In to post a reply to this thread.