From a807348a28981d61d1007a74b3c065ce26bae6b8 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Sun, 10 Jul 2022 16:24:17 +0100 Subject: require sv_cheats for kill and explode commands (#414) --- .../mod/scripts/vscripts/_northstar_cheatcommands.nut | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Northstar.CustomServers/mod') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut b/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut index 619bfcaf..c79265ac 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_northstar_cheatcommands.nut @@ -54,7 +54,7 @@ bool function ClientCommandCallbackToggleDemigod( entity player, array a bool function ClientCommandCallbackKill( entity player, array args ) { - if ( IsAlive( player ) ) + if ( IsAlive( player ) && ( GetConVarBool( "sv_cheats" ) || GetConVarBool( "ns_allow_kill_commands" ) ) ) player.Die() return true @@ -62,7 +62,7 @@ bool function ClientCommandCallbackKill( entity player, array args ) bool function ClientCommandCallbackExplode( entity player, array args ) { - if ( IsAlive( player ) ) + if ( IsAlive( player ) && ( GetConVarBool( "sv_cheats" ) || GetConVarBool( "ns_allow_kill_commands" ) ) ) player.Die( null, null, { scriptType = DF_GIB } ) return true -- cgit v1.2.3