summaryrefslogtreecommitdiff
path: root/modLoader/main.gsc
blob: a460923e705c2d4eb499d67b9db3ead994d44733 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include common_scripts/utility;
#include maps/mp/gametypes_zm/_hud_util;
#include maps/mp/zombies/_zm;
#include maps/mp/zombies/_zm_utility;
#include maps/mp/zombies/_zm_perks;
#include maps/mp/zombies/_zm_afterlife;

/*
 * Function Responsible for Loading the Mods
 * uncomment the // for the mods you want to enable
 * and then compile with a gsc compiler.
 */
modLoader(p, l)
{
	// Preloads tombstone before black screen after loading the map
	// activateTombstone(l);

	////////////////////////////////////////////////////////////////////////
	// Waits for the black preload screen to pass so it can load the mods //
	// DO NOT TOUCH THIS LINE BELOW!!                                     //
	flag_wait( "initial_blackscreen_passed" );                            //
	////////////////////////////////////////////////////////////////////////
	
	// Player has 9 lifes in afterlife
	// catHas9Lifes(p, 9);
	
	// Player is invincible
	// godMode(p);
	
	// Unlimited ammo
	// thread unlimitedAmmo(p);
	
	// Sets the player camera to third person
	// playThirdPerson(p, true);
	
	// Set initial player points
	// setPlayerPoints(p, 500);
	
	// Mod sets a custom perk limit
	// thread setPerkLimit(l, 12);

	// Mod that sets the box price
	// setBoxPrice(l, 950);

	// Mod that adds a zombie counter to the bottom of the screen
	// thread zombieCounter(p, l, 0, 190);

	// Mod that adds a health counter to the bottom of the screen
	// thread healthCounter(p, 0, 190);

	// Mod that adds a zombie and health counters to the bottom of the screen
	// thread healthCounter(p, -100, 190);
	// thread zombieCounter(p, l, 100, 190);

	// Gives all the perks available in the map to the player
	// perkaholic(p, l, true);
}

init()
{
	level thread onPlayerConnect();
}

onPlayerConnect()
{
	while(1)
	{
		level waittill("connected", player);
		player thread onPlayerSpawned();
	}
}

onPlayerSpawned()
{
	self endon("disconnect");
	level endon("game_ended");
	while(1)
	{
		self waittill("spawned_player");
		modLoader(self, level);
	}
}