Revision Difference
GM:CanPlayerSuicide#527197
<function name="CanPlayerSuicide" parent="GM" type="hook">
<ishook>yes</ishook>
<description>Determines if the player can kill themselves using the concommands "kill" or "explode".</description>
<realm>Server</realm>
<predicted>No</predicted>
<args>
<arg name="player" type="Player">The player</arg>
</args>
<rets>
<ret name="" type="boolean">True if they can suicide.</ret>
</rets>
</function>
<example>
<description>Makes suiciding only accessible for super admins.</description>
<code>
function GM:CanPlayerSuicide( ply )
hook.Add( "CanPlayerSuicide", "AllowOwnerSuicide", function( ply )
return ply:IsSuperAdmin()
end⤶
end )⤶
</code>
</example>