hello i made health vials on my rp server, look on this code
[CODE] if ( activator:IsPlayer() ) then
local health = activator:Health()
activator:SetHealth( health + 65 )
end[/CODE]
but the question is how do i set so it can only give max 100 hp?
//THX
[highlight](User was banned for this post ("Wrong section" - mahalis))[/highlight]
[lua]local maxhealth = 100
if activator:IsPlayer() then
local health = activator:Health()
activator:SetHealth(math.min(maxhealth, health+65))
end[/lua]
[QUOTE=NullPoint;19994230][lua]local maxhealth = 100
if activator:IsPlayer() then
local health = activator:Health()
activator:SetHealth(math.min(maxhealth, health+65))
end[/lua][/QUOTE]
thanks alot
Sorry, you need to Log In to post a reply to this thread.