So basicly I have custom models on my server & you're supposed to buy them in the pointshop. Although you can just press C and select them.
So I got this code im preety sure its done but i got one problem with it & i really cant figure this out since im still kinda new to the pointshop.
[lua]hook.Add("PlayerSpawn", "Limit players from certain models", function(ply)
timer.Simple(0.1, function()
if not IsValid(ply) then return end
if ply:GetModel() == "models/norpo/ArkhamOrigins/Assassins/Deathstroke_ValveBiped.mdl" then
if not ply:PS_HasBoughtMode("deathstroke") then
--if they havent bought it, return now
return
end
--Reset their model
ply:SetModel("models/stalker.mdl")
--Kill them?
ply:Kill()
end
end)
end)[/lua]
I know that PS_HasBoughtModel wouldnt work so basicly what im asking is what would replace it?
[code]function Player:PS_HasItem(item_id)
if not self.PS_Items then return false end
return self.PS_Items[item_id] and true or false
end
[/code]
From here: [url]https://github.com/adamdburton/pointshop/blob/master/lua/cl_player_extension.lua[/url]
[QUOTE=code_gs;43579435][code]function Player:PS_HasItem(item_id)
if not self.PS_Items then return false end
return self.PS_Items[item_id] and true or false
end
[/code]
From here: [url]https://github.com/adamdburton/pointshop/blob/master/lua/cl_player_extension.lua[/url][/QUOTE]
Thanks alot man Helped tons.
Sorry, you need to Log In to post a reply to this thread.