Hai,
So basically im the owner of a Deathrun server. So Basically I want a pointshop item that when you buy it. You get respawned. The hitch is that the AFK killers... kill you.
So basically I either want the respawn to reset my HP to 100 after a few seconds. Or have godmode toggled for a few seconds.
What I have ATM:
[CODE]ITEM.Name = 'Respawn'
ITEM.Price = 10000
ITEM.Material = 'models/props_junk/GlassBottle01a.mdl'
ITEM.SingleUse = true
function ITEM:OnBuy(ply)
ply:Spawn()
ply:ChatPrint("You have been brought back from the dead!")
ply:SetHealth(100)
timer.simple(5, function()
ply:SetHealth(100)
end)
timer.simple(5, function()
ply:SetHealth(100)
end)
end[/CODE]
I also tried this:
[CODE]ITEM.Name = 'Respawn'
ITEM.Price = 10000
ITEM.Material = 'models/props_junk/GlassBottle01a.mdl'
ITEM.SingleUse = true
function ITEM:OnBuy(ply)
ply:Spawn()
ply:ChatPrint("You have been brought back from the dead!")
ply:GodEnable()
timer.simple(5, function()
ply:GodDisable()
end)
end[/CODE]
Thanks.
I feel gross doing this.... but Bump. ;-; Oh god what have I done....
I just really want this to work. It should be quite simple.
its timer.Simple() - not timer.simple()
ffs... Really?
So basically you should post your lua errors, basically.
Basically next time remember to post it with the error, basically.
sethealth does nothing if your already dead, you need to use ply:Spawn()
[QUOTE=legendofrobbo;49757959]sethealth does nothing if your already dead, you need to use ply:Spawn()[/QUOTE]
He did do ply:Spawn() can you not read?
[QUOTE=legendofrobbo;49757959]sethealth does nothing if your already dead, you need to use ply:Spawn()[/QUOTE]
The ply:Spawn() is in there. The sethealth was supposed to reset your HP after you get out of the AFK killer zones. But the godmode is working. So its obviously the better choice.
Sorry, you need to Log In to post a reply to this thread.