aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/sh_promode.gnut
blob: 1572ccfa8766ba14392fe52899dca8bf764e486b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
untyped
global function Promode_Init
global function PromodeEnabled

void function Promode_Init()
{
	AddPrivateMatchModeSettingEnum( "#MODE_SETTING_CATEGORY_PROMODE", "promode_enable", [ "#SETTING_DISABLED", "#SETTING_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