aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ffa.nut
blob: 85b4aefbd87f0250f2edcb6fcde41fa6e44e3e9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
global function FFA_Init

void function FFA_Init()
{
	ClassicMP_ForceDisableEpilogue( true )

	AddCallback_OnPlayerKilled( OnPlayerKilled )
}

void function OnPlayerKilled( entity victim, entity attacker, var damageInfo )
{
	if ( victim != attacker && victim.IsPlayer() && attacker.IsPlayer() && GetGameState() == eGameState.Playing )
	{
		AddTeamScore( attacker.GetTeam(), 1 )
		attacker.AddToPlayerGameStat( PGS_SCORE, 1 )
	}
}