Hello. Is there a way to disable the kill command? Really need to do this since I don't want my players abusing it when they are on low health. Thanks!
[code]-- Run serverside
hook.Add( "CanPlayerSuicide", "NoSuicide", function( ply )
ply:PrintMessage( HUD_PRINTTALK, "You can't suicide!" )
return false
end )[/code]
-snip- too slow
[editline]18th July 2014[/editline]
[QUOTE=code_gs;45431280][code]-- Run serverside
hook.Add( "CanPlayerSuicide", "NoSuicide", function( ply )
ply:PrintMessage( HUD_PRINTTALK, "You can't suicide!" )
return false
end)[/code][/QUOTE]
Closed your bracket ;)
[QUOTE=code_gs;45431280][code]-- Run serverside
hook.Add( "CanPlayerSuicide", "NoSuicide", function( ply )
ply:PrintMessage( HUD_PRINTTALK, "You can't suicide!" )
return false
end )[/code][/QUOTE]
Sorry I am a retard but where doI put this? :s
Serverside - so place it in init.lua of your gamemode
[QUOTE=NiandraLades;45431783]Serverside - so place it in init.lua of your gamemode[/QUOTE]
Or just make a file in lua/autorun/server; I assume he's not making his own gamemode, otherwise, he should be creating the function instead of using a hook.
Sorry, you need to Log In to post a reply to this thread.