Suicide Timer

So I got this to block suicide:


local function BlockSuicide(ply)
	return false
end
hook.Add( "CanPlayerSuicide", "BlockSuicide", BlockSuicide )

But I want people to suicide I just want it so after they die they have to wait 10 seconds before suicide again, not sure how to do this. Any help is appreciated!

[lua]local function BlockSuicide(ply)
if ((ply.NextSuicide or 0) < CurTime()) then --Check if he got an Cooldown yet.
ply.NextSuicide = CurTime() + 10 – sets the cooldown
return true – allow suicide
end
return false – if cooldown then block
end
hook.Add( “CanPlayerSuicide”, “BlockSuicide”, BlockSuicide )[/lua]

Works thanks man.