Hello I made a health potion with this script an I want to add a health regen effect onto it what would I put in my code?, sorry, new to Gmod Lua,
[CODE] items["health_potion"] = {
name = "Health potion",
desc = " Use this to raise your health when you are low on HP",
ent = "item_basic",
prices = {
buy = 10,
sell = 5
},
model = "models/items/provisions/potions/life_potion.mdl",
use = (function(ply, ent)
if ply:IsValid() then
ply:AddHealth( 2 )
if ent then
ent:Remove()
end
end
end),
spawn = (function(ply, ent)
ent:SetItemName( "healthpotion" )
end),
skin = 0,
buttonDist= 32,
} [/CODE]
This is not the gmod lua forum...
Sorry lol
The formatting is toxic
Sorry, you need to Log In to post a reply to this thread.