Peoples weapon disappear when they die. How to fix it?
1 replies, posted
Hello facepunh, im currently using WIP: Pointshop revision 61 and its woriking fine for me except for one thing..
When people buy a weapon they get it immediatly but when they die, they lose it again.. But its still in ther inventory.
The currently lua code is:
Scout = {
Name = "Scout",
Enabled = true,
Description = "Get a SCOUT sniper!",
Cost = 2500,
Model = "models/weapons/w_snip_scout.mdl",
Functions = {
OnGive = function(ply, item)
ply:Give("weapon_real_cs_scout")
end,
OnTake = function(ply, item)
item.Hooks.PlayerDeath(ply, item)
end
},
Hooks = {
PlayerDeath = function(ply, item)
if ply:PS_HasItem(item.ID) then
ply:PS_TakeItem(item.ID)
if ply:GetWeapon("weapon_real_cs_scout") then
ply:GetWeapon("weapon_real_cs_scout"):Remove()
end
end
end
}
},
Could someone please send a new fixed code so its dont disappear? :)
Lua tags?
[editline]7th April 2011[/editline]
Also wrong section.
Sorry, you need to Log In to post a reply to this thread.