• Pointshop add custom models
    9 replies, posted
Ok so I followed the template for adding custom playermodels to the [URL="http://www.facepunch.com/showthread.php?t=1250362"]pointshop [/URL] I added a Connor Kenway model and it shows up and is able to price at the right price. But I'm wondering if people could just equip the playermodel from the context menu. This would make the point of the pointshop redundant. Would this be a problem? Heres my code. [CODE]ITEM.Name = 'Connor Kenway' ITEM.Price = 4000 ITEM.Model = 'models/nikout/ac3/connor_playermodel.mdl' ITEM.Skin = 1 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[/CODE]
Pointshop has nothing to do with the context menu. Just disable the context menu playermodel selection if you don't want players to equip player models there.
How would I disable the playermodel selection
-snip- misread
[QUOTE=_Undefined;43232192]-snip- misread[/QUOTE] What do you mean.
[QUOTE=PancakePeng;43232218]What do you mean.[/QUOTE] His -snipped- his post because he misread what you were asking.
[QUOTE=code_gs;43232317]His -snipped- his post because he misread what you were asking.[/QUOTE] Oh. But how can I prevent users from just going to context menu and changing their playermodel to forcing them to buy it.
[url]http://wiki.garrysmod.com/page/GM/ContextMenuOpen[/url] [lua]local function OnContextMenuOpen() return false end hook.Add( "ContextMenuOpen", "OnContextMenuOpen", OnContextMenuOpen )[/lua]
[QUOTE=code_gs;43232365][url]http://wiki.garrysmod.com/page/GM/ContextMenuOpen[/url] [lua]local function OnContextMenuOpen() return false end hook.Add( "ContextMenuOpen", "OnContextMenuOpen", OnContextMenuOpen )[/lua][/QUOTE]Will this prevent the whole context menu from opening or just the playermodels menu
Context menu.
Sorry, you need to Log In to post a reply to this thread.