aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Custom/mod/scripts/vscripts/_promode.gnut
blob: 3e6d6d65fddb7ee088a8477ebcfa0e6c0cdfd55a (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( "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