diff options
Diffstat (limited to 'Northstar.Custom/mod/scripts/vscripts/sh_promode.gnut')
-rw-r--r-- | Northstar.Custom/mod/scripts/vscripts/sh_promode.gnut | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Northstar.Custom/mod/scripts/vscripts/sh_promode.gnut b/Northstar.Custom/mod/scripts/vscripts/sh_promode.gnut new file mode 100644 index 00000000..f390fed6 --- /dev/null +++ b/Northstar.Custom/mod/scripts/vscripts/sh_promode.gnut @@ -0,0 +1,25 @@ +untyped +global function Promode_Init +global function PromodeEnabled + +void function Promode_Init() +{ + AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_PROMODE", "promode_enable", [ "Disabled", "Enabled" ], "0" ) + + #if SERVER + AddCallback_OnPlayerRespawned( GivePromodeWeaponMod ) + #endif +} + +bool function PromodeEnabled() +{ + return GetCurrentPlaylistVarInt( "promode_enable", 0 ) == 1 +} + +#if SERVER +void function GivePromodeWeaponMod( entity player ) +{ + if ( PromodeEnabled() ) + player.GiveExtraWeaponMod( "promode" ) +} +#endif
\ No newline at end of file |