Disable a players ability to respawn themselves

Alright, i know this is my 2nd question thread in a few days but i tried to figure this out myself and i can’t find anything on it.

How can i disable a players ability to respawn when clicking, i want it to be done by the gamemode and the gamemode only which i have done.



function OnDeathRespawn( ply )
ply:Spawn()
end

function OnDeath( ply )
timer.Create( "Atimer", 10, 1, OnDeathRespawn, ply )
end
hook.Add("DoPlayerDeath", "OnDeath", OnDeath)


But a slight side effect of letting them respawn on their own is the timer keeps going, i want the timer to stay though.

**[Gamemode.PlayerDeathThink

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerDeathThink)**

That still allows them to respawn on their own, i want it so they have to wait the 10 seconds.

Returning false will prevent the player from respawning.

Ah, I musted of misinterpreted that.

Next time, click the link and read. The page even includes a full example of what you are trying to accomplish.