/**
 * (C)2003-2013 David "BAILOPAN" Anderson modified by fiercetiger
 * Day of Defeat (dod_tickets) 0.9.0 Module Includes
 */

#if defined _dod_tickets_included
  #endinput
#endif
#define _dod_tickets_included

#define	CFG_READ		0	//Line is being read normally
#define	CFG_RELOAD		1	//Section is being parsed from the start
#define	CFG_DONE		2	//Section is done being parsed

/************
 * FORWARDS *
 ************/
 
//Called when dod initializes.  It passes in a version string, or a blank
// string if some load failure occurred.
//Do pre-config stuff here.
forward dod_Init(const version[]);

//Called when dod is ready to accept config hooks.
forward dod_CfgInit();

//Called right before a death message is sent.  Return value has no effect.
forward dod_PreDeath(killer, victim, headshot, const weapon[]);

//Called right after a death message is handled.  
//return PLUGIN_HANDLED will block dod from doing any physical respawning.
forward dod_PostDeath(killer, victim, headshot, const weapon[]);

//Called after a player is physically respawned,
// but before the spawn handler is called.  Returning PLUGIN_HANDLED
// will block dod from calling the set spawn handler.
//Note! this will only be called if dod internally respawns or you use
// dod_respawn().
forward dod_PreSpawn(player, bool:fake);

//Called after a player is physically respawned, 
// and after all spawn handling is completed.
forward dod_PostSpawn(player, bool:fake);

//Called right before round is restarted
//The post parameter is set to 1 if the event is post.
//If post is 0, the event is pre, and PLUGIN_HANDLED will block
// dod from doing round restart actions (respawning)
forward dod_RoundRestart(post);

//Called when a dod state is set
forward dod_StateChange(dod_state);

/***********
 * NATIVES *
 ***********/
 
//To retrieve/set angles and v_angles, pass up to two more vectors
native dod_getpos(player, Float:origin[3], ...);

native dod_setpos(player, const Float:origin[3], ...);

//Returns the number of registered spawn styles
native dod_spawnstyles();

//Retrieves the name of a spawn style by index (indices start at 0)
native dod_styleinfo(style_index, name[], maxlength);

//Adds a spawn style handler
native dod_addstyle(const name[], const function[]);

//Sets the current spawn style handler by name.
//The handler registered to this name will be called after every spawn.
native dod_setstyle(const name[]);


//Respawns a player correctly under the dod spawn system.
native dod_respawn(player);

//Forces a "fake" respawn on the player - sort of like a ResetHUD
native dod_fakespawn(player);

//Registers a hook on the config reader
//The forward looks like this:
//forward my_cfg_reader(read_mode, const line[], const section[])
native tickets_reg_cfg(const sectionName[], const handler[]);

//Reloads the config file
//If you specify a named file, dod auto-prepends the configs dir.
// I.e., passing dod\mapconfigs\de_dust2.cfg will turn into:
// addons\amxmodx\configs\dod\mapconfigs\de_dust2.cfg
native tickets_reload_cfg(const file[]="");

//Returns whether tickets is active
native tickets_active();
//Sets tickets to active (do not set the cvar!)
native tickets_set_active(on_or_off);

//Gets/sets the respawn wait time
native Float:dod_get_spawnwait();
native dod_set_spawnwait(Float:time);


/**
 * Natives defined by Tickets menu 
 */

//Returns the handle for the settings dod menu, letting you modify it.
native tickets_settings_menu();

// Writes the Value of the Setting Parameter in the Section of dod.cfg
native tickets_write_cfg(id, const section[], const parameter[], const value[])


/*** ************ ***
 *** HELPER STUFF 
 ***/

#define	ALLIES		1
#define	AXIS		2


stock bool:IsValidTeam(team)
{
	if (team == 1 || team == 2)
		return true
	return false
}