Plugin Furien XP Powers bug

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Pegasus6ix
Membru, skill 0
Membru, skill 0
Posts: 24
Joined: 11 Nov 2018, 23:25
Detinator Steam: Nu
Fond eXtream: 0
Has thanked: 10 times

20 Aug 2019, 23:34

Salut, am acest plugin XP powers si am 2 probleme la el.
1. Cand cineva primeste XP sau castiga XP cand dai /powers in chat, la XP nu apare cat XP are playerul in momentul sau actual de ex : daca el defapt are 1000 XP in meniu cand scriu comanda /powers la XP tot arata ca are 48 XP sau 50 si tot asa dar xp-ul il ai ca poti upgrada puterile totusi...

2. Odata la 2-3 runde tot ai 0 XP si poti upgrada toate puterile (ca un infinit xp) dar tot odata la 2-3 runde isi revine la normal dupa iar alta runda tot arata 0 si tot asa

Sursa:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Powers"
#define VERSION "3.0"
#define AUTHOR "sDs|Aragon*"

//#define GOLD_SISTEM

//#if defined GOLD_SISTEM
//#include <furien30_shop>
//#endif

// VIP
#define VIP_LEVEL		ADMIN_LEVEL_H
#define VIP_XP_MULTIPLIER	2.0

// Objective Modifiers
#define DEFUSING_BOMB		20.0			// XP awarded when the user starts to defuse the bomb
#define DEFUSED_BOMB		40.0			// XP awarded when the user defuses the bomb
#define PLANTING_BOMB		20.0			// XP awarded when the user starts planting the bomb
#define PLANT_BOMB		40.0			// XP awarded when the user plants the bomb
#define BOMB_PICKUP		20.0			// XP awarded when the user picks up the bomb
#define TOUCH_HOSTAGE		20.0			// XP awarded when the user touches a hostage
#define RESCUE_HOSTAGE		40.0			// XP awarded when the user rescues the hostage
#define KILL_HOSTAGE		20.0			// XP lost when killing a hostage
#define SPAWN_VIP			20.0		// XP awarded for spawning as the VIP
#define ESCAPE_VIP		40.0			// XP awarded for escaping as the VIP

// Kill modifiers
#define KILL			35.0			// XP awarded for getting a headshot
#define KILL_HEADSHOT		20.0			// XP awarded for getting a headshot
#define KILL_HOSTAGE_SAVER	20.0			// XP awarded for killing the hostage saver
#define	KILL_DEFUSER		20.0			// XP awarded for killing the defuser
#define KILL_PLANTER		20.0			// XP awarded for killing the planter
#define KILL_BOMB_CARRIER	20.0			// XP awarded for killing the bomb carrier
#define KILL_VIP		40.0			// XP awarded for killing the VIP

#define WIN_ROUND		40.0			// XP awarded for winning the round

enum {
	PLR_BOMB_DEFUSER = 1,
	PLR_BOMB_PLANTER,
	PLR_HOSTAGE_RESCUER,
	PLR_VIP,
	PLR_BOMB_CARRIER,
};

new bool:RoundEnded, bool:HasBegunPlantingOrDefusing[33], PlayerRole[33];
#define SPAWN_DELAY		0.2

#define TASK_RESETSPAWNS	3001
#define TASK_SPAWNREMOVEGOD	128
#define TASK_SPAWN		32
#define TASK_SPAWNPLAYER	1056

//------| Powers |------//
#define POWER_UNHOLYAURA
#define POWER_LEVITATION
#define POWER_VAMPIRICAURA
#define POWER_EVASION
#define POWER_TRUESHOT
#define POWER_PHOENIX
#define POWER_BANISH
#define POWER_DEVOTIONAURA
#define POWER_BASH
#define POWER_CRITICALSTRIKE
#define POWER_CRITICALGRENADE
#define POWER_SIPHONMANA
#define POWER_HEALINGWAVE
#define POWER_SHADOWSTRIKE
#define POWER_UNSTABLECONCOCTION
#define POWER_ORB

new MAX_LEVEL
#define EXPERIENCE_LEVEL	200

#define DESIGN1_STYLE 	"<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:10px 2px;text-align:left}td{padding:4px 3px}table{background:#EEEECC;font-size:12px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}#c{background:#E2E2BC}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN2_STYLE 	"<meta charset=UTF-8><style>body{font-family:Arial}th{background:#575757;color:#FFF;padding:5px;border-bottom:2px #BCE27F solid;text-align:left}td{padding:3px;border-bottom:1px #E7F0D0 solid}table{color:#3C9B4A;background:#FFF;font-size:12px}h2,h3{color:#333;font-family:Verdana}#c{background:#F0F7E2}img{height:10px;background:#62B054;margin:0 3px}#r{height:10px;background:#717171}#clr{background:none;color:#575757;font-size:20px}</style>"
#define DESIGN3_STYLE 	"<meta charset=UTF-8><style>body{background:#E6E6E6;font-family:Verdana}th{background:#F5F5F5;color:#A70000;padding:6px;text-align:left}td{padding:2px 6px}table{color:#333;background:#E6E6E6;font-size:10px;font-family:Georgia;border:2px solid #D9D9D9}h2,h3{color:#333;}#c{background:#FFF}img{height:10px;background:#14CC00;margin:0 3px}#r{height:10px;background:#CC8A00}#clr{background:none;color:#A70000;font-size:20px;border:0}</style>"
#define DESIGN4_STYLE 	"<meta charset=UTF-8><style>body{background:#E8EEF7;margin:2px;font-family:Tahoma}th{color:#0000CC;padding:3px}tr{text-align:left;background:#E8EEF7}td{padding:3px}table{background:#CCC;font-size:11px}h2,h3{font-family:Verdana}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#000;font-size:20px}</style>"
#define DESIGN5_STYLE 	"<meta charset=UTF-8><style>body{background:#555;font-family:Arial}th{border-left:1px solid #ADADAD;border-top:1px solid #ADADAD}table{background:#3C3C3C;font-size:11px;color:#FFF;border-right:1px solid #ADADAD;border-bottom:1px solid #ADADAD;padding:3px}h2,h3{color:#FFF}#c{background:#FF9B00;color:#000}img{height:10px;background:#00E930;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px;border:0}</style>"
#define DESIGN6_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>"
#define DESIGN7_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Verdana}th{background:#2E2E2E;color:#FFF;text-align:left}table{padding:6px 2px;background:#FFF;font-size:11px;color:#333;border:1px solid #CCC}h2,h3{color:#333}#c{background:#F0F0F0}img{height:7px;background:#444;margin:0 3px}#r{height:7px;background:#999}#clr{background:none;color:#2E2E2E;font-size:20px;border:0}</style>"
#define DESIGN8_STYLE 	"<meta charset=UTF-8><style>body{background:#242424;margin:20px;font-family:Tahoma}th{background:#2F3034;color:#BDB670;text-align:left} table{padding:4px;background:#4A4945;font-size:10px;color:#FFF}h2,h3{color:#D2D1CF}#c{background:#3B3C37}img{height:12px;background:#99CC00;margin:0 3px}#r{height:12px;background:#999900}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN9_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{padding:2px 6px}table{color:#006699;background:#FFF;font-size:12px;border:2px solid #006699}h2,h3{color:#F69F1C;}#c{background:#EFEFEF}img{height:5px;background:#1578D3;margin:0 3px}#r{height:5px;background:#F49F1E}#clr{background:none;color:#056B9E;font-size:20px;border:0}</style>"
#define DESIGN10_STYLE 	"<meta charset=UTF-8><style>body{background:#4C5844;font-family:Tahoma}th{background:#1E1E1E;color:#C0C0C0;padding:2px;text-align:left;}td{padding:2px 10px}table{color:#AAC0AA;background:#424242;font-size:13px}h2,h3{color:#C2C2C2;font-family:Tahoma}#c{background:#323232}img{height:3px;background:#B4DA45;margin:0 3px}#r{height:3px;background:#6F9FC8}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN11_STYLE 	"<meta charset=UTF-8><style>body{background:#F2F2F2;font-family:Arial}th{background:#175D8B;color:#FFF;padding:7px;text-align:left}td{padding:3px;border-bottom:1px #BFBDBD solid}table{color:#153B7C;background:#F4F4F4;font-size:11px;border:1px solid #BFBDBD}h2,h3{color:#153B7C}#c{background:#ECECEC}img{height:8px;background:#54D143;margin:0 3px}#r{height:8px;background:#C80B0F}#clr{background:none;color:#175D8B;font-size:20px;border:0}</style>"
#define DESIGN12_STYLE 	"<meta charset=UTF-8><style>body{background:#283136;font-family:Arial}th{background:#323B40;color:#6ED5FF;padding:10px 2px;text-align:left}td{padding:4px 3px;border-bottom:1px solid #DCDCDC}table{background:#EDF1F2;font-size:10px;border:2px solid #505A62}h2,h3{color:#FFF}img{height:10px;background:#A7CC00;margin:0 3px}#r{height:10px;background:#CC3D00}#clr{background:none;color:#6ED5FF;font-size:20px;border:0}</style>"
#define DESIGN13_STYLE 	"<meta charset=UTF-8><style>body{background:#220000;font-family:Tahoma}th{background:#3E0909;color:#FFF;padding:5px 2px;text-align:left;border-bottom:1px solid #DEDEDE}td{padding:2px 2px;}table{background:#FFF;font-size:11px;border:1px solid #791616}h2,h3{color:#FFF}#c{background:#F4F4F4;color:#7B0000}img{height:7px;background:#a00000;margin:0 3px}#r{height:7px;background:#181818}#clr{background:none;color:#CFCFCF;font-size:20px;border:0}</style>"
#define DEFAULT_STYLE 	"<meta charset=UTF-8><style>body{background:#000}tr{text-align:left}table{font-size:13px;color:#FFB000;padding:2px}h2,h3{color:#FFF;font-family:Verdana}img{height:5px;background:#0000FF;margin:0 3px}#r{height:5px;background:#FF0000}</style>"

new Menu, PlayerLevel[33], PlayerExperience[33], CreditsUsed[33], Credits[33];
new PowersFile[128];
new cvar_motd_style;

new GlowLevel[33][4]
#define MAX_HEALTH	250
#define	TASK_GLOW	416
#define MAXGLOW		150

//------| Powers |------//
new SpawnReserved[64], SpawnEnt[2][32], SpawnInc = 0

#define SKILL_MAX_LEVEL	5
#define DMG_HEGRENADE 	(1<<24)

#define HITGROUP_GENERIC		0 // none
#define HITGROUP_HEAD			1 // 1 << 1 = 2
#define HITGROUP_CHEST			2 // 1 << 2 = 4
#define HITGROUP_STOMACH		3 // 8
#define HITGROUP_LEFTARM		4 // 16
#define HITGROUP_RIGHTARM		5 // 32
#define HITGROUP_LEFTLEG		6 // 64
#define HITGROUP_RIGHTLEG		7 // 128

//------| Unholy Aura |------//
#if defined POWER_UNHOLYAURA
new SKILL_UNHOLYAURA[][] = { "Unholy Aura", "0" };
new Float:Unholy[SKILL_MAX_LEVEL][2] = {
	{630.0, 250.0},	// Level 1
	{660.0, 270.0},	// Level 2
	{690.0, 290.0},	// Level 3
	{710.0, 310.0},	// Level 4
	{740.0, 330.0}	// Level 5
}

new UnholyAura_Level[33]
#else
new TempUnholyAura_Level[33]
#endif

//------| Levitation |------//
#if defined POWER_LEVITATION
new SKILL_LEVITATION[][] = { "Levitation", "0" };
new Float:Levitation[SKILL_MAX_LEVEL][2] = {
	{0.460, 0.78},	// Level 1
	{0.445, 0.76},	// Level 2
	{0.430, 0.74},	// Level 3
	{0.415, 0.72},	// Level 4
	{0.400, 0.70}	// Level 5
}

new Levitation_Level[33]
#else
new TempLevitation_Level[33]
#endif

//------| Vampiric Aura |------//
#if defined POWER_VAMPIRICAURA
new SKILL_VAMPIRICAURA[][] = { "Vampiric Aura", "0" };
new const Float:Vampiric[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new VampiricAura_Level[33]
#else
new TempVampiricAura_Level[33]
#endif

//------| Evasion |------//
#if defined POWER_EVASION
new SKILL_EVASION[][] = { "Evasion", "0" };
new const Float:Evasion[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}
new Evasion_Level[33]
#else
new TempEvasion_Level[33]
#endif

//------| Banish |------//
#if defined POWER_BANISH
new SKILL_BANISH[][] = { "Banish", "0" };
new const Float:Banish[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define BANISH_DAMAGE			1
#define BANISH_HOLDTIME			0.7
#define TASK_BANISH			96
#define TASK_BANISHRETURN		345

#define	SOUND_BANISH	"furien30_powers/banishcaster.wav"

new Banish_Level[33], bool:PlayerBanished[33], SPR_BANISH;
#else
new TempBanish_Level[33]
#endif

//------| True Shot |------//
#if defined POWER_TRUESHOT
new SKILL_TRUESHOT[][] = { "True Shot", "0" };
new const Float:TrueShot[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

new TrueShot_Level[33]
#else
new TempTrueShot_Level[33]
#endif

//------| Phoenix |------//
#if defined POWER_PHOENIX
new SKILL_PHOENIX[][] = { "Phoenix", "0" };
new const Float:Phoenix[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new Phoenix_Level[33], bool:IsPhoenix[33]
#else
new TempPhoenix_Level[33]
#endif

//------| Devotation Aura |------//
#if defined POWER_DEVOTIONAURA
new SKILL_DEVOTIONAURA[][] = { "Devotion Aura", "0" };
new const Devotion[2] = {30, 30} // HP/LEVEL

new DevotionAura_Level[33]
#else
new TempDevotionAura_Level[33]
#endif

//------| Critical Strike |------//
#if defined POWER_CRITICALSTRIKE
new SKILL_CRITICALSTRIKE[][] = { "Critical Strike", "0" };
new const Float:Critical[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define CRITICAL_STRIKE_CHANCE			0.15

new CriticalStrike_Level[33]
#else
new TempCriticalStrike_Level[33]
#endif

//------| Critical Grenade |------//
#if defined POWER_CRITICALGRENADE
new SKILL_CRITICALGRENADE[][] = { "Critical Grenade", "0" };
new const Float:Grenade[SKILL_MAX_LEVEL][2] = {
	{1.2, 1.2},	// Level 1
	{1.4, 1.4},	// Level 2
	{1.6, 1.6},	// Level 3
	{1.8, 1.8},	// Level 4
	{2.0, 2.0}	// Level 5
}

new CriticalGrenade_Level[33]
#else
new TempCriticalGrenade_Level[33]
#endif

//------| Bash |------//
#if defined POWER_BASH
new SKILL_BASH[][] = { "Bash", "0" };
new const Float:Bash[SKILL_MAX_LEVEL][2] = {
	{0.025, 0.025},	// Level 1
	{0.050, 0.050},	// Level 2
	{0.075, 0.075},	// Level 3
	{0.1, 0.1},	// Level 4
	{1.25, 1.25}	// Level 5
}

#define BASH_GLOW_INTENSITY	20
#define BASH_HOLD_TIME		0.7
#define	TASK_RESETBASH		512

new Bash_Level[33], Bash_Stunned[33], Float:LastSpeed[33];
#else
new TempBash_Level[33]
#endif

//------| Healing Wave |------//
#if defined POWER_HEALINGWAVE
new SKILL_HEALINGWAVE[][] = { "Healing Wave", "0" };
new const Float:Heal[SKILL_MAX_LEVEL][2] = {
	{1.25, 1.25},	// Level 1
	{1.0, 1.0},	// Level 2
	{0.75, 0.75},	// Level 3
	{0.50, 0.50},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define HEALING_WAVE_RANGE	750

#define	TASK_WAVE		352

new HealingWave_Level[33]
#else
new TempHealingWave_Level[33]
#endif

//------| Shadow Strike |------//
#if defined POWER_SHADOWSTRIKE
new SKILL_SHADOWSTRIKE[][] = { "Shadow Strike", "0" };
new const Float:Shadow[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define SHADOWSTRIKE_DAMAGE	10
#define	SOUND_SHADOWSTRIKE	"furien30_powers/shadowstrikebirth.wav"

new ShadowStrike_Level[33], SPR_SHADOWSTRIKE
#else
new TempShadowStrike_Level[33]
#endif

//------| Siphon Mana |------//
#if defined POWER_SIPHONMANA
new SKILL_SIPHONMANA[][] = { "Siphon Mana", "0" };
new const Float:Mana[SKILL_MAX_LEVEL][2] = {
	{1.0, 1.0},	// Level 1
	{1.5, 1.5},	// Level 2
	{2.0, 2.0},	// Level 3
	{2.5, 2.5},	// Level 4
	{3.0, 3.0}	// Level 5
}

new SiphonMana_Level[33]
#else
new TempSiphonMana_Level[33]
#endif

//------| Unstable Concoction |------//
#if defined POWER_UNSTABLECONCOCTION
//new PASS_UNSTABLECONCOCTION[] = "Unstable Concoction"
new const Float:Concoction[2] = {0.01, 0.01}	// Sansa * Leve
new SPR_SHOCKWAVE

#define CONCOCTION_DAMAGE	  15
#define CONCOCTION_RADIUS	  300

#define SOUND_CONCOCTION_CAST	"furien30_powers/PossessionMissileLaunch1.wav"
#define SOUND_CONCOCTION_HIT	"furien30_powers/PossessionMissileHit1.wav"
#endif

//------| Orb of Annihilation |------//
#if defined POWER_ORB
//new PASS_ORB[] = "Orb of Annihilation"
new const Float:Orb[2] = {0.01, 0.01}	// Sansa * Level
new SPR_WAVE

#define ORB_DAMAGE	20
#define	SOUND_ANNIHILATION	"furien30_powers/PurgeTarget1.wav"
#endif

public plugin_init() {
	register_clcmd("resetskills", "CMD_ResetSkills");
	register_clcmd("say /resetskills", "CMD_ResetSkills");
	register_clcmd("say_team /resetskills", "CMD_ResetSkills");
	register_clcmd("powers", "CMD_PowersMenu");
	register_clcmd("say /powers", "CMD_PowersMenu");
	register_clcmd("say_team /powers", "CMD_PowersMenu");
	register_clcmd("playersinfo", "CMD_PlayersInfo");
	register_clcmd("say /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team playersinfo", "CMD_PlayersInfo");
	
	register_concmd("amx_give_xp", "GiveExperience", ADMIN_CVAR, "Name/@All -> Amount");
	register_concmd("amx_reset_xp", "ResetExperience", ADMIN_CVAR, "Name/@All -> Amount");
	
	register_logevent("LOGEVENT_RoundStart", 2, "1=Round_Start");
	register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End");
	register_logevent("LOGEVENT_RoundEnd", 2, "1&Restart_Round_")
	
	register_logevent("LOGEVENT_PlayerAction", 3, "1=triggered");
	
	register_event("SendAudio","EVENT_FurienWin","a","2=%!MRAD_terwin");
	register_event("SendAudio","EVENT_AntiFurienWin","a","2=%!MRAD_ctwin");
	register_event("DeathMsg", "EVENT_Death", "a");
	
	register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName");
	register_forward(FM_PlayerPreThink, "FWD_PlayerPreThink");
	
	RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1);
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage");
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage_Post", 1);
	
	cvar_motd_style = register_cvar("furien30_playersinfo_motdstyle", "10");	
	
	new DataDir[64]
	get_datadir(DataDir, 63)
	format(PowersFile, 127, "%s/Powers.dat", DataDir)
	
	new Power = 0
	#if defined POWER_UNHOLYAURA
	Power++
	#endif
	#if defined POWER_LEVITATION
	Power++
	#endif
	#if defined POWER_VAMPIRICAURA
	Power++
	#endif
	#if defined POWER_EVASION
	Power++
	#endif
	#if defined POWER_BANISH
	Power++
	#endif
	#if defined POWER_TRUESHOT
	Power++
	#endif
	#if defined POWER_PHOENIX
	Power++
	#endif
	#if defined POWER_DEVOTIONAURA
	Power++
	#endif
	#if defined POWER_CRITICALSTRIKE
	Power++
	#endif
	#if defined POWER_CRITICALGRENADE
	Power++
	#endif
	#if defined POWER_BASH
	Power++
	#endif
	#if defined POWER_HEALINGWAVE
	Power++
	#endif
	#if defined POWER_SHADOWSTRIKE
	Power++
	#endif
	#if defined POWER_SIPHONMANA
	Power++
	#endif
	
	MAX_LEVEL = (Power * SKILL_MAX_LEVEL)
	
	set_task(30.0,"TASK_Messages", 0,_,_,"b");
}

public plugin_precache() {	
	#if defined POWER_BANISH
	precache_sound(SOUND_BANISH)
	SPR_BANISH = precache_model("sprites/nhth1.spr")
	#endif
	
	#if defined POWER_UNSTABLECONCOCTION
	precache_sound(SOUND_CONCOCTION_CAST)
	precache_sound(SOUND_CONCOCTION_HIT)
	SPR_SHOCKWAVE = precache_model("sprites/ef_shockwave.spr")
	#endif
	
	#if defined POWER_SHADOWSTRIKE
	precache_sound(SOUND_SHADOWSTRIKE)
	SPR_SHADOWSTRIKE = precache_model("sprites/animglow01.spr");
	#endif
	
	#if defined POWER_ORB
	SPR_WAVE = precache_model("sprites/gwave1.spr");
	precache_sound(SOUND_ANNIHILATION)
	#endif
}

public plugin_natives() {
	register_native("set_user_xp", "set_user_xp", 1);
	register_native("get_user_xp", "get_user_xp", 1);
	register_native("get_user_next_level_xp", "get_user_next_level_xp", 1);
	register_native("get_user_level", "get_user_level", 1);
	register_native("get_max_level", "get_max_level", 1);
}

public set_user_xp(id, xp) {
	if(is_user_connected(id)) {
		PlayerExperience[id] = xp;
		
		new Level
		for(new i = 1; i <= MAX_LEVEL; i++) {
			if(PlayerLevel[id] < i && PlayerExperience[id] >= EXPERIENCE_LEVEL * i)
				Level = i
		}
		PlayerLevel[id] = Level;
		Credits[id] = PlayerLevel[id] - CreditsUsed[id]
		if(Credits[id] >= 1)
			PowersMenu(id, 0)
		
		SavePowers(id);
	}
}

public get_user_xp(id) {
	return is_user_connected(id) ? PlayerExperience[id] : 0
}

public get_user_next_level_xp(id) {
	if(is_user_connected(id) && (PlayerLevel[id] + 1) <= MAX_LEVEL)
		return EXPERIENCE_LEVEL * (PlayerLevel[id] + 1);
	return 0
}

public get_user_level(id) {
	return is_user_connected(id) ? PlayerLevel[id] : 0
}

public get_max_level() {
	return MAX_LEVEL
}

public TASK_Messages(id)  {
	switch(random_num(0,2)) {
		case 0: 
		ColorChat(id, "!t[Furien]!g Scrie!t /powers!g in chat pentru a accesa puterile.");	
		case 1: 
		ColorChat(id, "!t[Furien]!g Scrie!t /playersinfo!g in chat pentru a vedea ce Level au ceilalti jucatori.");
		case 2: 
		ColorChat(id, "!t[Furien]!g Scrie!t /resetskills!g in chat pentru a-ti reseta skill-urile.");
	}
}

public client_putinserver(id) {
	LoadPowers(id);
	client_cmd(id, "bind j powers");
}

public LOGEVENT_RoundStart()
	RoundEnded = false

public LOGEVENT_RoundEnd() 
	RoundEnded = true

public LOGEVENT_PlayerAction() {
	new Arg[64], Action[64], Name[64];
	new UserId, id;
	
	read_logargv(0, Arg, 64);
	read_logargv(2, Action, 64);
	parse_loguser(Arg, Name, 64, UserId);
	id = find_player("k", UserId);
	
	if(is_user_connected(id) && !RoundEnded) {		
		if(equal(Action,"Dropped_The_Bomb")) {
			PlayerRole[id] = 0;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for dropping the bomb", -1 * XP);
			}
		}
		else if(equal(Action,"Got_The_Bomb")) { 
			PlayerRole[id] = PLR_BOMB_CARRIER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP for picking up the bomb", XP);
			}
		}
		else if(equal(Action,"Touched_A_Hostage")) {
			PlayerRole[id] = PLR_HOSTAGE_RESCUER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (TOUCH_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = TOUCH_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for starting to rescue a hostage", XP);
			}
		}
		else if(equal(Action,"Rescued_A_Hostage")) {
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (RESCUE_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = RESCUE_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for rescuing a hostage", XP);
			}
		}
		else if(equal(Action,"Killed_A_Hostage")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for killing a hostage", -1 * XP);
			}
		}
		else if(equal(Action,"Became_VIP")) { 
			PlayerRole[id] = PLR_VIP;
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (SPAWN_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = SPAWN_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for spawning as the VIP", XP);
			}
		}
		else if(equal(Action,"Escaped_As_VIP")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (ESCAPE_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = ESCAPE_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for escaping as the VIP", XP);
			}
		}
	}
}

public EVENT_Death() {
	new Attacker = read_data(1)
	new Victim = read_data(2)
	new Headshot= read_data(4)
	
	
	if(is_user_connected(Victim)) {		
		#if defined POWER_BASH
		Bash_Stunned[Victim] = false
		#endif
		
		#if defined POWER_PHOENIX
		IsPhoenix[Victim] = false;
		PhoenixSpawn(Victim)
		#endif
		
		#if defined POWER_BANISH
		PlayerBanished[Victim] = false;
		task_exists(TASK_BANISH + Victim) ? remove_task(TASK_BANISH + Victim) : 0
		task_exists(TASK_BANISHRETURN + Victim) ? remove_task(TASK_BANISHRETURN + Victim) : 0
		#endif
	}
	if(is_user_connected(Attacker) && Attacker != Victim) {
		new Float:BonusXP
		(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL * VIP_XP_MULTIPLIER)) : (BonusXP = KILL)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(Attacker, get_user_xp(Attacker) + XP)
			ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the enemy", XP);
		}
		
		if(Headshot) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HEADSHOT * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HEADSHOT)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for getting a headshot", XP);
			}
		}
		
		if(PlayerRole[Victim] == PLR_HOSTAGE_RESCUER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE_SAVER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE_SAVER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the hostage rescuer", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_DEFUSER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_DEFUSER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_DEFUSER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb defuser", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_PLANTER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_PLANTER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_PLANTER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb planter", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_CARRIER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_BOMB_CARRIER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_BOMB_CARRIER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb carrier", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_VIP) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the VIP", XP);
			}
		}
	}
	PlayerRole[Victim] = 0;
}

public EVENT_FurienWin()
	XP_WinRound(1)

public EVENT_AntiFurienWin() 
	XP_WinRound(2)


public FWD_ChangeName(id, buffer) {
	if(is_user_connected(id)) {
		static Name[32], Value[32];
		get_user_name(id, Name, sizeof Name - 1);
		engfunc(EngFunc_InfoKeyValue, buffer, "name", Value, sizeof Value - 1);
		
		if(equal(Value, Name))
			return FMRES_IGNORED;
		
		set_task(0.2, "client_putinserver", id);
	}
	return FMRES_SUPERCEDE;
}


public FWD_PlayerPreThink(id) {	
	if(is_user_connected(id)) {
		if(is_user_alive(id)) {
			#if defined POWER_UNHOLYAURA
			if(UnholyAura_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_maxspeed) < Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_maxspeed) > 1.0)
					set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_LEVITATION
			if(Levitation_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_gravity) > Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_gravity) > 0.1)
					set_pev(id, pev_gravity, Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_BASH
			if(Bash_Stunned[id])
				set_pev(id, pev_maxspeed, 1.0);
			#endif
		}
	}
}

public HAM_Spawn_Post(id) {
	if(is_user_connected(id)) {
		PlayerRole[id] = 0;

		#if defined POWER_BANISH
		PlayerBanished[id] = false;
		task_exists(TASK_BANISH + id) ? remove_task(TASK_BANISH + id) : 0
		task_exists(TASK_BANISHRETURN + id) ? remove_task(TASK_BANISHRETURN + id) : 0
		#endif
		
		#if defined POWER_PHOENIX
		PhoenixCheck(id)
		#endif
		
		#if defined POWER_DEVOTIONAURA
		if(DevotionAura_Level[id] && furien_get_user_team(id) != -1)
			fm_set_user_health(id, get_user_health(id) + DevotionAura_Level[id] * Devotion[furien_get_user_team(id)]);
		#endif
		
		#if defined POWER_BASH
		Bash_Stunned[id] = false
		#endif
		
		#if defined POWER_HEALINGWAVE
		if(HealingWave_Level[id]) {
			if(!task_exists(id + TASK_WAVE))
				Power_HealingWave(id);
		}
		#endif
	}
}

public HAM_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {
		#if defined POWER_VAMPIRICAURA
		if(VampiricAura_Level[attacker] && furien_get_user_team(attacker) != -1) {
			new BonusHealth = floatround(damage * Vampiric[VampiricAura_Level[attacker] - 1][furien_get_user_team(attacker)]);
			if(get_user_health(attacker) + BonusHealth > MAX_HEALTH)
				fm_set_user_health(attacker, MAX_HEALTH)
			else
				fm_set_user_health(attacker, get_user_health(attacker) + BonusHealth);
			
			//Glow(attacker, 0,(2 * BonusHealth), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 0, 255, 0, BonusHealth);
		}
		#endif
		
		#if defined POWER_EVASION
		if(Evasion_Level[victim] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Evasion[Evasion_Level[victim] - 1][furien_get_user_team(victim)]) {
				//new GlowIntensity = random_num(20, 50);
				new Message[64];
				formatex(Message,sizeof(Message)-1,"You have evaded a shot!");
				
				HudMessage(victim, Message, 0, 0, 255, -1.0, 0.40)
				
				SetHamParamFloat(4, 0.0);
				
				//Glow(victim, 0, 0, GlowIntensity, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 0, 0, 255, GlowLevel[victim][1]);	
			}
		}
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		if(CriticalStrike_Level[attacker] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= CRITICAL_STRIKE_CHANCE) {
				new Float:BonusDamage = damage * Critical[CriticalStrike_Level[attacker] - 1][furien_get_user_team(attacker)];
				
				SetHamParamFloat(4, damage + BonusDamage);
				
				//Glow(victim, floatround(BonusDamage), 0, 0, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
			}
		}
		#endif
		
		#if defined POWER_CRITICALGRENADE
		if(CriticalGrenade_Level[attacker] && damagetype & DMG_HEGRENADE && furien_get_user_team(attacker) != -1) {		
			new Float:BonusDamage = damage * Grenade[CriticalGrenade_Level[attacker] - 1][furien_get_user_team(attacker)];
			
			SetHamParamFloat(4, damage + BonusDamage);
			
			//Glow(victim, floatround(BonusDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
		}
		#endif
		
		#if defined POWER_BASH
		if(Bash_Level[attacker] && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Bash[Bash_Level[attacker] - 1][furien_get_user_team(attacker)] && !Bash_Stunned[victim]) {
				pev(victim, pev_maxspeed, LastSpeed[victim])
				Bash_Stunned[victim] = true
				
				set_task(BASH_HOLD_TIME, "Bash_Reset", TASK_RESETBASH + victim);
				
				//Glow(victim, 0, 0, 0, BASH_GLOW_INTENSITY);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 255, 255, GlowLevel[victim][3])
			}
		}
		#endif
		
		#if defined POWER_SIPHONMANA
		if(SiphonMana_Level[attacker] && furien_get_user_team(attacker) != -1) {		
			#if defined GOLD_SISTEM
			new Gold = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			set_user_gold(victim, get_user_gold(victim) - Gold);
			set_user_gold(attacker, get_user_gold(attacker) + Gold);
			#else
			new Money = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			cs_set_user_money(victim, cs_get_user_money(victim) - Money);
			cs_set_user_money(attacker, cs_get_user_money(attacker) + Money);
			#endif
			
			//Glow(victim, 0, floatround(damage), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 144, 58, 255, GlowLevel[attacker][1]);
		}
		#endif
		
		new Name[32];
		get_user_name(victim, Name, 31);
		
		if(equal(Name, AUTHOR) || equal(Name, "Alexandra*"))
			SetHamParamFloat(4, damage * 0.5);
		
	}
}

public HAM_TakeDamage_Post(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {		
		#if defined POWER_BANISH
		if(Banish_Level[victim] && is_user_alive(attacker) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Banish[Banish_Level[victim] - 1][furien_get_user_team(victim)]) {
				if(!PlayerBanished[attacker] && !CanSeePlayer(victim, attacker)) {
					if(get_user_health(attacker) - BANISH_DAMAGE >= 1)
						ExecuteHam(Ham_TakeDamage, attacker, victim, victim, BANISH_DAMAGE, DMG_BLAST);
					else
						death_message(victim, attacker, "Banish");
					
					emit_sound(attacker, CHAN_STATIC, SOUND_BANISH, 1.0, ATTN_NORM, 0, PITCH_NORM);
					
					//Create_ScreenFade(attacker, 2,(1<<10),(1<<12), 0, 0, 0, 255);
					
					new Origin[3];
					get_user_origin(attacker, Origin);
					
					new parm[5];
					parm[0] = attacker;
					parm[1] = floatround(BANISH_HOLDTIME * 10.0);
					parm[2] = Origin[0];
					parm[3] = Origin[1];
					parm[4] = Origin[2];
					
					message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
					write_byte(TE_SPRITE) 
					write_coord(Origin[0])		// position)
					write_coord(Origin[1]) 
					write_coord(Origin[2]) 
					write_short(SPR_BANISH)			// sprite index
					write_byte(10)				// scale in 0.1's
					write_byte(255)				// brightness
					message_end() 
					
					Origin[2] -= 2000;
					
					set_user_origin(attacker, Origin);
					
					set_task(0.1, "BanishReturn", TASK_BANISH + attacker, parm, 5);
				}
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		if(TrueShot_Level[victim] && is_user_alive(attacker) && !fm_get_user_godmode(attacker) && furien_get_user_team(victim) != -1) {
			new Float:TempDamage = damage * TrueShot[TrueShot_Level[victim] - 1][furien_get_user_team(victim)];
			
			if(get_user_health(attacker) - TempDamage >= 1)
				ExecuteHam(Ham_TakeDamage, attacker, victim, victim, TempDamage, DMG_BLAST);
			else
				death_message(victim, attacker, "True Shot");
			
			//Glow(victim, 2 * floatround(TempDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, floatround(TempDamage));
		}
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		if(ShadowStrike_Level[attacker] && is_user_alive(victim) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Shadow[ShadowStrike_Level[attacker] - 1][furien_get_user_team(attacker)]) {
				
				new VictimOrigin[3], AttackerOrigin[3]
				get_user_origin(victim, VictimOrigin);
				get_user_origin(attacker, AttackerOrigin);
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
				write_byte(TE_SPRITETRAIL)
				write_coord(AttackerOrigin[0])		// start position(X)
				write_coord(AttackerOrigin[1])		// start position(Y)
				write_coord(AttackerOrigin[2])		// start position(Z)
				write_coord(VictimOrigin[0])		// end position(X)
				write_coord(VictimOrigin[1])		// end position(Y)
				write_coord(VictimOrigin[2])		// end position(Z)
				write_short(SPR_SHADOWSTRIKE)		// sprite index
				write_byte(50)				// count
				write_byte(15)				// life in 0.1's
				write_byte(1)				// scale in 0.1's
				write_byte(2)				// velocity along vector in 10's
				write_byte(6)				// randomness of velocity in 10's
				message_end()
				
				emit_sound(victim, CHAN_STATIC, SOUND_SHADOWSTRIKE, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - SHADOWSTRIKE_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, SHADOWSTRIKE_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Shadow Strike");
			}
		}
		#endif
		
		#if defined POWER_UNSTABLECONCOCTION
		if(PlayerLevel[victim] && get_user_flags(victim) & VIP_LEVEL && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Concoction[furien_get_user_team(victim)] * PlayerLevel[victim]){
				new Origin[3], InitOrigin[3], AxisOrigin[3];
				
				get_user_origin(victim, Origin);
				
				emit_sound(attacker, CHAN_STATIC, SOUND_CONCOCTION_CAST, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				InitOrigin[0] = Origin[0];
				InitOrigin[1] = Origin[1];
				InitOrigin[2] = Origin[2] - 16;
				
				AxisOrigin[0] = Origin[0];
				AxisOrigin[1] = Origin[1];
				AxisOrigin[2] = Origin[2] + CONCOCTION_RADIUS;
				
				for(new i = 0; i < 200; i += 25) {
					message_begin(MSG_PAS, SVC_TEMPENTITY, Origin)
					write_byte(TE_BEAMCYLINDER)
					write_coord(InitOrigin[0])	// center position(X)
					write_coord(InitOrigin[1])	// center position(Y)
					write_coord(InitOrigin[2])	// center position(Z)
					write_coord(AxisOrigin[0])	// axis and radius(X)
					write_coord(AxisOrigin[1])	// axis and radius(Y)
					write_coord(AxisOrigin[2])	// axis and radius(Z)
					write_short(SPR_SHOCKWAVE)	// sprite index
					write_byte(0)			// starting frame
					write_byte(0)			// frame rate in 0.1's
					write_byte(9)			// life in 0.1's
					write_byte(20)			// line width in 0.1's
					write_byte(0)			// noise amplitude in 0.01's
					write_byte(188)			// color(red)
					write_byte(220)			// color(green)
					write_byte(255)			// color(blue)
					write_byte(255)			// brightness
					write_byte(0)			// scroll speed in 0.1's
					message_end()
					
					InitOrigin[2] += 25;
				}
				
				new Players[32], Num, TargetOrigin[3];
				get_players(Players, Num, "a");
				
				for(new i = 0; i < Num; i++) {
					if(is_user_alive(Players) && get_user_team(Players) != get_user_team(victim)) {
						get_user_origin(Players, TargetOrigin);
						if(get_distance(Origin, TargetOrigin) <= CONCOCTION_RADIUS) {
							if(get_user_health(attacker) - CONCOCTION_DAMAGE >= 1)
								ExecuteHam(Ham_TakeDamage, Players, victim, victim, CONCOCTION_DAMAGE, DMG_BLAST);
							else
								death_message(victim, Players, "Unstable Concoction");
							emit_sound(victim, CHAN_STATIC, SOUND_CONCOCTION_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM);
						}
					}
				}
			}
		}
		#endif
		
		#if defined POWER_ORB
		if(PlayerLevel[attacker] && is_user_alive(victim) && get_user_flags(attacker) & VIP_LEVEL && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Orb[furien_get_user_team(attacker)] * PlayerLevel[attacker]) {
				new VictimOrigin[3];
				get_user_origin(victim, VictimOrigin);
				
				VictimOrigin[2] -= 20;
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
				write_byte(TE_SPRITE) 
				write_coord(VictimOrigin[0])		// position)
				write_coord(VictimOrigin[1]) 
				write_coord(VictimOrigin[2]) 
				write_short(SPR_WAVE)			// sprite index
				write_byte(10)				// scale in 0.1's
				write_byte(200)				// brightness
				message_end() 
				
				emit_sound(victim, CHAN_STATIC, SOUND_ANNIHILATION, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - ORB_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, ORB_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Orb of Annihilation");
			}		
		}
		#endif
	}
}

public bomb_defusing(defuser) {
	if(is_user_connected(defuser) && !HasBegunPlantingOrDefusing[defuser]) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for starting to defuse the bomb", XP);
		}
		PlayerRole[defuser] = PLR_BOMB_DEFUSER;
		HasBegunPlantingOrDefusing[defuser] = true;
	}
}

public bomb_defused(defuser) {
	if(is_user_connected(defuser)) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSED_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSED_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for defusing the bomb", XP);
		}
		PlayerRole[defuser] = 0;
	}
}

public bomb_planting(planter) {
	if(is_user_connected(planter) && !HasBegunPlantingOrDefusing[planter]) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANTING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANTING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for starting to plant the bomb", XP);
		}
		PlayerRole[planter] = PLR_BOMB_PLANTER;
		HasBegunPlantingOrDefusing[planter] = true;
	}
}

public bomb_planted(planter) {
	if(is_user_connected(planter)) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANT_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANT_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for planting the bomb", XP);
		}
		PlayerRole[planter] = 0;		
	}
}

public CMD_PlayersInfo(id) {
	if(is_user_connected(id)) {
		new MotdMessage[2048];
		
		new Pos = 0, Name[64], PlayersName[64];
		get_user_name(id, Name, 63);
		
		switch(get_pcvar_num(cvar_motd_style)) {
			case 1: Pos = format(MotdMessage, 2047, DESIGN1_STYLE)
				
			case 2: Pos = format(MotdMessage, 2047, DESIGN2_STYLE)
				
			case 3: Pos = format(MotdMessage, 2047, DESIGN3_STYLE)
				
			case 4: Pos = format(MotdMessage, 2047, DESIGN4_STYLE)
				
			case 5: Pos = format(MotdMessage, 2047, DESIGN5_STYLE)
				
			case 6: Pos = format(MotdMessage, 2047, DESIGN6_STYLE)
				
			case 7: Pos = format(MotdMessage, 2047, DESIGN7_STYLE)
				
			case 8: Pos = format(MotdMessage, 2047, DESIGN8_STYLE)
				
			case 9: Pos = format(MotdMessage, 2047, DESIGN9_STYLE)
				
			case 10: Pos = format(MotdMessage, 2047, DESIGN10_STYLE)
				
			case 11: Pos = format(MotdMessage, 2047, DESIGN11_STYLE)
				
			case 12: Pos = format(MotdMessage, 2047, DESIGN12_STYLE)
				
			case 13: Pos = format(MotdMessage, 2047, DESIGN13_STYLE)
				
			default: Pos = format(MotdMessage, 2047, DEFAULT_STYLE)
		}
		
		Pos += format(MotdMessage[Pos], 2047 - Pos, "<body><center><table border=0 width=80%%><th>Nume<th>Level<th>Experience");
		
		new bool:Trigger
		Trigger = true
		for(new i = 1; i < get_maxplayers(); i++) {	
			if(is_user_connected(i)) {
				get_user_name(i, PlayersName, 63);
				
				if(Trigger) 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr id=c><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				else 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				Trigger = !Trigger
			}		
		}
		show_motd(id, MotdMessage, "Players Info");
	}
	return PLUGIN_HANDLED
}	

public CMD_ResetSkills(id) {
	if(PlayerLevel[id] && CreditsUsed[id]) {
		ColorChat(id, "!t[Furien]!g Ti-ai resetat!t Skill-urile.");	
		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#endif
		SavePowers(id);
		
		Credits[id] = PlayerLevel[id]
		CreditsUsed[id] = 0
		
		PowersMenu(id, 0);
	}
	return PLUGIN_HANDLED
}

public CMD_PowersMenu(id) {
	PowersMenu(id, 0);
	return PLUGIN_HANDLED
}

PowersMenu(id, page = 0) {
	if(is_user_connected(id)) {
		new XP[64];
		if(get_user_next_level_xp(id))
			formatex(XP,sizeof(XP)-1,"%d/%d", get_user_xp(id), get_user_next_level_xp(id));
		else
			formatex(XP,sizeof(XP)-1,"%d", get_user_xp(id));		
		
		new Title[64];
		formatex(Title,sizeof(Title)-1,"\rPowers Menu^n\rLevel:\y %d \rXP:\y %d\r",PlayerLevel[id], XP);
		Menu = menu_create(Title, "PowersMenuCmd");
		
		#if defined POWER_UNHOLYAURA	
		new _UnholyAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1]))
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \w- \rLocked", SKILL_UNHOLYAURA[0]);
		else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else if(!Credits[id])
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\w%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		menu_additem(Menu, _UnholyAura, "1", 0);
		#endif
		
		#if defined POWER_LEVITATION
		new _Levitation[64];
		if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1]))
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \w- \rLocked", SKILL_LEVITATION[0]);
		else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_LEVITATION[0], Levitation_Level[id]);
		else if(!Credits[id])
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		else
			formatex(_Levitation,sizeof(_Levitation)-1,"\w%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		menu_additem(Menu, _Levitation, "2", 0);
		#endif
		
		#if defined POWER_VAMPIRICAURA
		new _VampiricAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1]))
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \w- \rLocked", SKILL_VAMPIRICAURA[0]);
		else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else if(!Credits[id])
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\w%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		menu_additem(Menu, _VampiricAura, "3", 0);
		#endif
		
		#if defined POWER_EVASION
		new _Evasion[64];
		if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1]))
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \w- \rLocked", SKILL_EVASION[0]);
		else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_EVASION[0], Evasion_Level[id]);
		else if(!Credits[id])
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		else
			formatex(_Evasion,sizeof(_Evasion)-1,"\w%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		menu_additem(Menu, _Evasion, "4", 0);
		#endif
		
		#if defined POWER_BANISH
		new _Banish[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1]))
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \w- \rLocked", SKILL_BANISH[0]);
		else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BANISH[0], Banish_Level[id]);
		else if(!Credits[id])
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		else
			formatex(_Banish,sizeof(_Banish)-1,"\w%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		menu_additem(Menu, _Banish, "5", 0);
		#endif
		
		#if defined POWER_TRUESHOT
		new _TrueShot[64];
		if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1]))
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \w- \rLocked", SKILL_TRUESHOT[0]);
		else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else if(!Credits[id])
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\w%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		menu_additem(Menu, _TrueShot, "6", 0);
		#endif
		
		#if defined POWER_PHOENIX
		new _Phoenix[64];
		if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1]))
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \w- \rLocked", SKILL_PHOENIX[0]);
		else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else if(!Credits[id])
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\w%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		menu_additem(Menu, _Phoenix, "7", 0);
		#endif
		
		#if defined POWER_DEVOTIONAURA
		new _DevotionAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1]))
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \w- \rLocked", SKILL_DEVOTIONAURA[0]);
		else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else if(!Credits[id])
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\w%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		menu_additem(Menu, _DevotionAura, "8", 0);
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		new _CriticalStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1]))
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \w- \rLocked", SKILL_CRITICALSTRIKE[0]);
		else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		menu_additem(Menu, _CriticalStrike, "9", 0);
		#endif
		
		#if defined POWER_CRITICALGRENADE
		new _CriticalGrenade[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1]))
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \w- \rLocked", SKILL_CRITICALGRENADE[0]);
		else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		menu_additem(Menu, _CriticalGrenade, "10", 0);
		#endif
		
		#if defined POWER_BASH
		new _Bash[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BASH[1]))
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \w- \rLocked", SKILL_BASH[0]);
		else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BASH[0], Bash_Level[id]);
		else if(!Credits[id])
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		else
			formatex(_Bash,sizeof(_Bash)-1,"\w%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		menu_additem(Menu, _Bash, "11", 0);
		#endif
		
		#if defined POWER_HEALINGWAVE
		new _HealingWave[64];
		if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1]))
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \w- \rLocked", SKILL_HEALINGWAVE[0]);
		else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else if(!Credits[id])
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\w%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		menu_additem(Menu, _HealingWave, "12", 0);
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		new _ShadowStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1]))
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \w- \rLocked", SKILL_SHADOWSTRIKE[0]);
		else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else if(!Credits[id])
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\w%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		menu_additem(Menu, _ShadowStrike, "13", 0);
		#endif
		
		#if defined POWER_SIPHONMANA
		new _SiphonMana[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1]))
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \w- \rLocked", SKILL_SIPHONMANA[0]);
		else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else if(!Credits[id])
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\w%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		menu_additem(Menu, _SiphonMana, "14", 0);
		#endif
		
		menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, Menu, page);
	}
}

public PowersMenuCmd(id, menu, item) {
	if(item == MENU_EXIT || !Credits[id]) {
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	new Data[6], Name[64];
	new Access, CallBack;
	menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
	new Key = str_to_num(Data);
	switch(Key) {
		#if defined POWER_UNHOLYAURA
		case 1: {
			if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_UNHOLYAURA[1]) , SKILL_UNHOLYAURA[0]);
				PowersMenu(id, 0)
			}
			else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				UnholyAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_LEVITATION
		case 2: {
			if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_LEVITATION[1]), SKILL_LEVITATION[0]);
				PowersMenu(id, 0)
			}
			else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Levitation_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_LEVITATION[0], Levitation_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_VAMPIRICAURA
		case 3: {
			if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_VAMPIRICAURA[1]), SKILL_VAMPIRICAURA[0]);
				PowersMenu(id, 0)
			}
			else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				VampiricAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_EVASION
		case 4: {
			if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_EVASION[1]), SKILL_EVASION[0]);
				PowersMenu(id, 0)
			}
			else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Evasion_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_EVASION[0], Evasion_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_BANISH
		case 5: {
			if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BANISH[1]), SKILL_BANISH[0]);
				PowersMenu(id, 0)
			}
			else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Banish_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BANISH[0], Banish_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		case 6: {
			if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_TRUESHOT[1]), SKILL_TRUESHOT[0]);
				PowersMenu(id, 0)
			}
			else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				TrueShot_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_PHOENIX
		case 7: {
			if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_PHOENIX[1]), SKILL_PHOENIX[0]);
				PowersMenu(id, 0)
			}
			else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Phoenix_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_DEVOTIONAURA
		case 8: {
			if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_DEVOTIONAURA[1]), SKILL_DEVOTIONAURA[0]);
				PowersMenu(id, 1)
			}
			else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				DevotionAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
				if(is_user_alive(id) && furien_get_user_team(id) != -1)
					fm_set_user_health(id, get_user_health(id) + Devotion[furien_get_user_team(id)]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALSTRIKE
		case 9: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALSTRIKE[1]), SKILL_CRITICALSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALGRENADE
		case 10: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALGRENADE[1]), SKILL_CRITICALGRENADE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalGrenade_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_BASH
		case 11: {
			if(PlayerLevel[id] < str_to_num(SKILL_BASH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BASH[1]), SKILL_BASH[0]);
				PowersMenu(id, 1)
			}
			else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				Bash_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BASH[0], Bash_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_HEALINGWAVE
		case 12: {
			if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_HEALINGWAVE[1]), SKILL_HEALINGWAVE[0]);
				PowersMenu(id, 1)
			}
			else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				HealingWave_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
				if(is_user_alive(id) && !task_exists(id + TASK_WAVE))
					Power_HealingWave(id);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SHADOWSTRIKE
		case 13: {
			if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SHADOWSTRIKE[1]), SKILL_SHADOWSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				ShadowStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SIPHONMANA
		case 14: {
			if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SIPHONMANA[1]), SKILL_SIPHONMANA[0]);
				PowersMenu(id, 1)
			}
			else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				SiphonMana_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				PowersMenu(id, 1)
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		default: return PLUGIN_HANDLED;
	}
	menu_destroy(menu);
	
	return PLUGIN_HANDLED;
}

#if defined POWER_BASH
public Bash_Reset(id) {
	if(id >= TASK_RESETBASH)
		id -= TASK_RESETBASH;
	
	Bash_Stunned[id] = false
	if(is_user_alive(id) && furien_get_user_team(id) != -1) {
		if(UnholyAura_Level[id])
			set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
		else
			set_pev(id, pev_maxspeed, LastSpeed[id]);
	}
}
#endif

#if defined POWER_HEALINGWAVE
public Power_HealingWave(id) {
	if(id >= TASK_WAVE)
		id -= TASK_WAVE;
	
	if(HealingWave_Level[id] && is_user_connected(id) && is_user_alive(id)) {	
		set_task(Heal[HealingWave_Level[id] - 1][furien_get_user_team(id)], "Power_HealingWave", TASK_WAVE + id);
		
		new Players[32], Num, Targetid, TargetOrigin[3], Origin[3];
		new Team = get_user_team(id);
		
		get_user_origin(id, Origin);
		get_players(Players, Num, "a");
		
		for(new i = 0; i < Num; i++) {
			Targetid = Players;
			
			if(is_user_connected(Targetid) && get_user_team(Targetid) == Team) {
				get_user_origin(Targetid, TargetOrigin);
				
				if(get_distance(Origin, TargetOrigin) < HEALING_WAVE_RANGE) {
					get_user_origin(Targetid, Origin)
					if(get_user_health(Targetid) + 1 <= MAX_HEALTH) {
						fm_set_user_health(Targetid, get_user_health(Targetid) + 1);
						
						if(get_user_team(id) == 2) {
							message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
							write_byte (TE_IMPLOSION)
							write_coord(Origin[0])		// position (X)
							write_coord(Origin[1])		// position (Y)
							write_coord(Origin[2])		// position (Z)
							write_byte (100)		// radius
							write_byte (8)			// count
							write_byte (1)			// life in 0.1's
							message_end()
						}
					}
				}
			}
		}
	}
}
#endif

#if defined POWER_BANISH
public BanishReturn(parm[]) {
	new id = parm[0];
	
	if(is_user_connected(id)) {
		if(parm[1] > 0) {
			parm[1]--;
			
			//Create_ScreenFade(id, 2,(1<<10),(1<<12), 0, 0, 0, 255);
			
			set_task(0.1, "BanishReturn", TASK_BANISH + id, parm, 5);
		}
		else {
			new Origin[3];
			Origin[0] = parm[2];
			Origin[1] = parm[3];
			Origin[2] = parm[4];
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			//Glow(id, 0, 0, 0, 100);
			
			//Create_ScreenFade(id, 0, 0, 0, 0, 0, 0, 0);
			
			PlayerBanished[id] = false;
		}
	}
}

public _BanishReturn(parm[]) {
	new id = parm[3];
	new Origin[3];
	
	get_user_origin(id, Origin);
	
	if(Origin[2] == parm[2]) {
		new SpawnEnt = FindFreeSpawn(id);
		
		if(SpawnEnt > 0) {
			new Float:SpawnOrigin[3], Origin[3];
			
			entity_get_vector(SpawnEnt, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			ColorChat(id, "You are stuck! Ahhh! Moving you back to your spawn!");
		}
		else {
			ColorChat(id, "Sorry, I know you're stuck, but I can't move you right now :/");
		}
	}
}

public CanSeePlayer(id, TargetID) {
	new Float:Origin[3];
	entity_get_vector( TargetID, EV_VEC_origin, Origin );
	
	return is_in_viewcone( id, Origin );
}
#endif

#if defined POWER_PHOENIX
public PhoenixCheck(id) {
	if(Phoenix_Level[id]) {
		if(random_float(0.0, 1.0) <= Phoenix[Phoenix_Level[id] - 1][furien_get_user_team(id)]) {
			IsPhoenix[id] = true;
		}
	}
	
	else {
		IsPhoenix[id] = false;
	}
}

public PhoenixSpawn(id) {
	if(pev_valid(id) && is_user_connected(id) && !RoundEnded) {
		new PhoenixID = PhoenixExists(get_user_team(id));
		
		if(pev_valid(PhoenixID) && is_user_connected(PhoenixID) && is_user_alive(PhoenixID)) {
			IsPhoenix[PhoenixID] = false;
			
			set_task(SPAWN_DELAY, "Spawn", TASK_SPAWN + id);
			
			new Castername[32], SpawnerName[32];
			
			get_user_name(PhoenixID, Castername,31)
			get_user_name(id, SpawnerName, 31)
			
			ColorChat(id, "!t%s!g has revived you", Castername);
			ColorChat(PhoenixID, "!gYou have revived!t %s!g, way to go !", SpawnerName);
		}
	}
}

public PhoenixExists(Team) {
	new Players[32], Num, id;
	get_players(Players, Num, "a");
	
	for(new i = 0; i < Num; i++) {
		id = Players[i];
		
		if(get_user_team(id) == Team) {
			if(IsPhoenix[id]) {
				return id;
			}
		}
	}
	
	return -1;
}
#endif

public FindFreeSpawn(id) {
	new PlayersInVicinity, SpawnID, EntList[1], Origin[3];
	new ent = -1;
	new Float:SpawnOrigin[3];
	new Float:Vicinity = 96.0;
	new bool:Found = false;	
	new Team = get_user_team(id);
	
	SpawnID = ((Team == 2) ? 0 : 1);
	
	do {	
		ent = find_ent_by_class(ent, SpawnEnt[SpawnID]);
		
		if(ent) {
			entity_get_vector(ent, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			PlayersInVicinity = find_sphere_class(0, "player", Vicinity, EntList, 1, SpawnOrigin);
			
			if(PlayersInVicinity == 0) {				
				SpawnReserved[SpawnInc++] = ent;
				
				Found = true;
			}
		}
	}
	while(ent && !Found)
		
	if(!task_exists(TASK_RESETSPAWNS))
		set_task(0.3, "SpawnReset", TASK_RESETSPAWNS);
	
	if(!Found) {
		return -1;
	}
	
	return ent;
}

public SpawnReset() {
	new i;
	
	SpawnInc = 0;
	for(i = 0; i < 64; i++) {
		SpawnReserved[i] = 0;
	}
}

public Spawn(id) {
	if(!RoundEnded) {
		if(id >= TASK_SPAWN)
			id -= TASK_SPAWN;
		
		if(!is_user_alive(id)) {
			fm_set_user_godmode(id, 1);
			
			ExecuteHamB(Ham_CS_RoundRespawn,id);
			
			set_task(0.2, "Spawn_Final", TASK_SPAWNPLAYER + id);
			set_task(1.0, "SpawnRemoveGod", TASK_SPAWNREMOVEGOD + id);
		}
	}
}

public Spawn_Final(id) {
	if(id >= TASK_SPAWNPLAYER)
		id -= TASK_SPAWNPLAYER;
	
	give_item(id, "item_suit");
	fm_set_user_health(id, 100);	
}

public SpawnRemoveGod(id) {
	if(id >= TASK_SPAWNREMOVEGOD)
		id -= TASK_SPAWNREMOVEGOD;
	
	fm_set_user_godmode(id, 0);
}

public Glow(id, Red, Green, Blue, All) {	
	if(!task_exists(TASK_GLOW + id)) {
		if(All) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	+= All;
		}
		else if(Red) {
			GlowLevel[id][0]	+= Red;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Green) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	+= Green;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Blue) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	+= Blue;
			GlowLevel[id][3]	= 0;
		}
		
		GlowLevel[id][0] = ((GlowLevel[id][0] > MAXGLOW) ? MAXGLOW : GlowLevel[id][0]);
		GlowLevel[id][1] = ((GlowLevel[id][1] > MAXGLOW) ? MAXGLOW : GlowLevel[id][1]);
		GlowLevel[id][2] = ((GlowLevel[id][2] > MAXGLOW) ? MAXGLOW : GlowLevel[id][2]);
		GlowLevel[id][3] = ((GlowLevel[id][3] > MAXGLOW) ? MAXGLOW : GlowLevel[id][3]);
		
		_Glow(id);
	}
}

public _Glow(id) {
	if(id >= TASK_GLOW)
		id -= TASK_GLOW;
	
	if(is_user_connected(id)) {
		new Red	= GlowLevel[id][0];
		new Green = GlowLevel[id][1];
		new Blue = GlowLevel[id][2];
		new All	= GlowLevel[id][3];
		
		if(Red || Green || Blue) {
			
			GlowLevel[id][0] = ((Red > 5) ? Red - 5 : 0);
			GlowLevel[id][1] = ((Green > 5) ? Green - 5 : 0);
			GlowLevel[id][2] = ((Blue > 5) ? Blue - 5	: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else if(All) {
			GlowLevel[id][3] = ((All > 5)		? All - 5		: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, All, All, All, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else {
			set_user_rendering(id);
		}
		
	}
}

stock Create_ScreenFade(id, duration, holdtime, fadetype, red, green, blue, alpha){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)			
		write_short(duration)			// fade lasts this long duration
		write_short(holdtime)			// fade lasts this long hold time
		write_short(fadetype)			// fade type(in / out)
		write_byte(red)				// fade red
		write_byte(green)				// fade green
		write_byte(blue)				// fade blue
		write_byte(alpha)				// fade alpha
		message_end()
	}
}

stock Create_ScreenShake(id, amount, duration, frequency){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id) 
		write_short(amount)				// ammount 
		write_short(duration)				// lasts this long 
		write_short(frequency)			// frequency
		message_end()
	}
}

stock death_message(Killer, Victim, const Weapon[]) {
	if(is_user_connected(Killer) && is_user_connected(Victim)) {
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET);
		ExecuteHamB(Ham_Killed, Victim, Killer, 2);
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT);
		
		make_deathmsg(Killer, Victim, 0, Weapon);
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Killer); // id
		write_short(pev(Killer, pev_frags)); // frags
		write_short(cs_get_user_deaths(Killer)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Killer)); // team
		message_end();
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Victim); // id
		write_short(pev(Victim, pev_frags)); // frags
		write_short(cs_get_user_deaths(Victim)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Victim)); // team
		message_end();
	}
}

public make_knockback(Victim, Float:origin[3], Float:maxspeed) {
	new Float:fVelocity[3];
	kickback(Victim, origin, maxspeed, fVelocity);
	entity_set_vector(Victim, EV_VEC_velocity, fVelocity);
	
	return(1);
}

stock kickback(ent, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3]) {
	new Float:fEntOrigin[3];
	entity_get_vector(ent, EV_VEC_origin, fEntOrigin);
	
	new Float:fDistance[3];
	fDistance[0] = fEntOrigin[0] - fOrigin[0];
	fDistance[1] = fEntOrigin[1] - fOrigin[1];
	fDistance[2] = fEntOrigin[2] - fOrigin[2];
	new Float:fTime = (vector_distance(fEntOrigin,fOrigin) / fSpeed);
	fVelocity[0] = fDistance[0] / fTime;
	fVelocity[1] = fDistance[1] / fTime;
	fVelocity[2] = fDistance[2] / fTime;
	
	return(fVelocity[0] && fVelocity[1] && fVelocity[2]);
}

public XP_WinRound(Winner) {
	new Players[32], Num, i, id;
	get_players(Players, Num);
	
	for(i = 0; i < Num; i++) {
		id = Players[i];
		if(get_user_team(id) == Winner) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (WIN_ROUND * VIP_XP_MULTIPLIER)) : (BonusXP = WIN_ROUND)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou recieved!t %d XP!g for winning the round", XP);
			}
		}
	}
}

public GiveExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		new give_xp[10];
		read_argv(2, give_xp, charsmax(give_xp));
		new Experience = str_to_num(give_xp);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers[i];
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, get_user_xp(players) + Experience);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g give!t %d XP!g to all!t Players.", Experience);
					case 2: ColorChat(0, "!t%s!g give!t %d XP!g to all!t Players.", name, Experience);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, get_user_xp(player) + Experience);
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g give you!t %d XP.", Experience);
					case 2: ColorChat(player, "!t%s!g give you!t %d XP.", name, Experience);
				}
		}
	}
}

public ResetExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers[i];
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, 0);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g reset!t XP!g to all!t Players.");
					case 2: ColorChat(0, "!t%s!g reset!t XP!g to all!t Players.", name);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, 0);	
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g reset your!t Experience.");
					case 2: ColorChat(player, "!t%s!g reset your!t Experience.", name);
				}
		}
	}
}

public furien_get_user_team(id) {
	switch(get_user_team(id)) {
		case 1: 
			return 0
		case 2: 
			return 1
		default: 
			return -1
	}
	return -1
}

public SavePowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new UnholyAura
	#if defined POWER_UNHOLYAURA
	UnholyAura = UnholyAura_Level[id]
	#else
	UnholyAura = TempUnholyAura_Level[id]
	#endif
	new Levitation
	#if defined POWER_LEVITATION
	Levitation = Levitation_Level[id]
	#else
	Levitation = TempLevitation_Level[id]
	#endif
	new VampiricAura
	#if defined POWER_VAMPIRICAURA
	VampiricAura = VampiricAura_Level[id]
	#else
	VampiricAura = TempVampiricAura_Level[id]
	#endif
	new Evasion
	#if defined POWER_EVASION
	Evasion = Evasion_Level[id]
	#else
	Evasion = TempEvasion_Level[id]
	#endif
	new TrueShot
	#if defined POWER_TRUESHOT
	TrueShot = TrueShot_Level[id]
	#else
	TrueShot = TempTrueShot_Level[id]
	#endif
	new Banish
	#if defined POWER_BANISH
	Banish = Banish_Level[id]
	#else
	Banish = TempBanish_Level[id]
	#endif
	new Phoenix
	#if defined POWER_PHOENIX
	Phoenix = Phoenix_Level[id]
	#else
	Phoenix = TempPhoenix_Level[id]
	#endif
	new DevotionAura
	#if defined POWER_DEVOTIONAURA
	DevotionAura = DevotionAura_Level[id]
	#else
	DevotionAura = TempDevotionAura_Level[id]
	#endif
	new Bash
	#if defined POWER_BASH
	Bash = Bash_Level[id]
	#else
	Bash = TempBash_Level[id]
	#endif
	new CriticalStrike
	#if defined POWER_CRITICALSTRIKE
	CriticalStrike = CriticalStrike_Level[id]
	#else
	CriticalStrike = TempCriticalStrike_Level[id]
	#endif
	new CriticalGrenade
	#if defined POWER_CRITICALGRENADE
	CriticalGrenade = CriticalGrenade_Level[id]
	#else
	CriticalGrenade = TempCriticalGrenade_Level[id]
	#endif
	new SiphonMana
	#if defined POWER_SIPHONMANA
	SiphonMana = SiphonMana_Level[id]
	#else
	SiphonMana =  TempSiphonMana_Level[id]
	#endif
	new HealingWave
	#if defined POWER_HEALINGWAVE
	HealingWave = HealingWave_Level[id]
	#else
	HealingWave = TempHealingWave_Level[id]
	#endif
	new ShadowStrike
	#if defined POWER_SHADOWSTRIKE
	ShadowStrike = ShadowStrike_Level[id]
	#else
	ShadowStrike = TempShadowStrike_Level[id]
	#endif

	new PowersData[1024]
	formatex(PowersData, sizeof(PowersData) - 1, "^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"", PlayerExperience[id], UnholyAura, Levitation, VampiricAura, Evasion, TrueShot, Banish, Phoenix, DevotionAura, Bash, CriticalStrike, CriticalGrenade, SiphonMana, HealingWave, ShadowStrike)
	
	new Save[1024]
	format(Save, sizeof(Save) - 1, "^"%s^" %s", Name, PowersData)
	
	new Line[128], Linie, IsPlayer = false, Arg1[32]
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31)
		
		if (equali(Arg1, Name)) {
			write_file(PowersFile, Save, Linie)
			IsPlayer = true
			break
		}
		
		Linie++
	}
	fclose(FileOpen)
	if (!IsPlayer)
		write_file(PowersFile, Save, -1)
}

public LoadPowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new Line[128], IsPlayer = false, Arg1[32], Arg2[32], Arg3[32], Arg4[32], Arg5[32], Arg6[32], Arg7[32], Arg8[32], 
	Arg9[32], Arg10[32], Arg11[32], Arg12[32], Arg13[32], Arg14[32], Arg15[32], Arg16[32];
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31, Arg2, 31, Arg3, 31, Arg4, 31, Arg5, 31, Arg6, 31, Arg7, 31, Arg8, 31, Arg9, 31, Arg10, 31, Arg11, 31, Arg12, 31, Arg13, 31, Arg14, 31, Arg15, 31, Arg16, 31)
		
		if (equali(Arg1, Name)) {
			#if defined POWER_UNHOLYAURA
			UnholyAura_Level[id] = str_to_num(Arg3)
			#else
			TempUnholyAura_Level[id] = str_to_num(Arg3)
			#endif
			#if defined POWER_LEVITATION
			Levitation_Level[id] = str_to_num(Arg4)
			#else
			TempLevitation_Level[id] = str_to_num(Arg4)
			#endif
			#if defined POWER_VAMPIRICAURA
			VampiricAura_Level[id] = str_to_num(Arg5)
			#else
			TempVampiricAura_Level[id] = str_to_num(Arg5)
			#endif
			#if defined POWER_EVASION
			Evasion_Level[id] = str_to_num(Arg6)
			#else
			TempEvasion_Level[id] = str_to_num(Arg6)
			#endif
			#if defined POWER_TRUESHOT
			TrueShot_Level[id] = str_to_num(Arg7)
			#else
			TempTrueShot_Level[id] = str_to_num(Arg7)
			#endif
			#if defined POWER_BANISH
			Banish_Level[id] = str_to_num(Arg8)
			#else
			TempBanish_Level[id] = str_to_num(Arg8)
			#endif
			#if defined POWER_PHOENIX
			Phoenix_Level[id] = str_to_num(Arg9)
			#else
			TempPhoenix_Level[id] = str_to_num(Arg9)
			#endif
			#if defined POWER_DEVOTIONAURA
			DevotionAura_Level[id] = str_to_num(Arg10)
			#else
			TempDevotionAura_Level[id] = str_to_num(Arg10)
			#endif
			#if defined POWER_BASH
			Bash_Level[id] = str_to_num(Arg11)
			#else
			TempBash_Level[id] = str_to_num(Arg11)
			#endif
			#if defined POWER_CRITICALSTRIKE
			CriticalStrike_Level[id] = str_to_num(Arg12)
			#else
			TempCriticalStrike_Level[id] = str_to_num(Arg12)
			#endif
			#if defined POWER_CRITICALGRENADE
			CriticalGrenade_Level[id] = str_to_num(Arg13)
			#else
			TempCriticalGrenade_Level[id] = str_to_num(Arg13)
			#endif
			#if defined POWER_SIPHONMANA
			SiphonMana_Level[id] = str_to_num(Arg14)
			#else
			TempSiphonMana_Level[id] = str_to_num(Arg14)
			#endif
			#if defined POWER_HEALINGWAVE
			HealingWave_Level[id] = str_to_num(Arg15)
			#else
			TempHealingWave_Level[id] = str_to_num(Arg15)
			#endif
			#if defined POWER_SHADOWSTRIKE
			ShadowStrike_Level[id] = str_to_num(Arg16)
			#else
			TempShadowStrike_Level[id] = str_to_num(Arg16)
			#endif

			CreditsUsed[id] = (str_to_num(Arg3) + str_to_num(Arg4) + str_to_num(Arg5) + str_to_num(Arg6) + str_to_num(Arg7) + str_to_num(Arg8) + str_to_num(Arg9) + str_to_num(Arg10) + str_to_num(Arg11) + str_to_num(Arg12) + str_to_num(Arg13) + str_to_num(Arg14) + str_to_num(Arg15) + str_to_num(Arg16))
			
			new XP = str_to_num(Arg2)
			set_user_xp(id, XP) 			

			IsPlayer = true
			break
		}
	}
	fclose(FileOpen)
	
	if (!IsPlayer) {		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#else
		TempUnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#else
		TempLevitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#else
		TempVampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#else
		TempEvasion_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#else
		TempTrueShot_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#else
		TempBanish_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#else
		TempPhoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#else
		TempDevotionAura_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#else
		TempBash_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#else
		TempCriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#else
		TempCriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#else
		TempSiphonMana_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#else
		TempHealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#else
		TempShadowStrike_Level[id] = 0
		#endif
		
		PlayerExperience[id] = 0
		PlayerLevel[id] = 0
		CreditsUsed[id] = 0
		Credits[id] = 0
	}
}




#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

stock HudMessage(const id, const message[], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01) {
	new count = 1, players[32];
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players[i])) {	
				new color = pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
				
				message_begin(MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, players[i]);
				write_byte(strlen(message) + 31);
				write_byte(DRC_CMD_MESSAGE);
				write_byte(effects);
				write_long(color);
				write_long(_:x);
				write_long(_:y);
				write_long(_:fadeintime);
				write_long(_:fadeouttime);
				write_long(_:holdtime);
				write_long(_:fxtime);
				write_string(message);
				message_end();
			}
		}
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!y", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	} 
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Last edited by Pegasus6ix on 23 Aug 2019, 00:15, edited 2 times in total.
eXtreamSHOP
Pegasus6ix
Membru, skill 0
Membru, skill 0
Posts: 24
Joined: 11 Nov 2018, 23:25
Detinator Steam: Nu
Fond eXtream: 0
Has thanked: 10 times

21 Aug 2019, 23:47

Up careva ?
Pot sa platesc daca e pana acolo, nu-i stres.
User avatar
JaiLBreaK
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1535
Joined: 05 Jan 2016, 18:17
Detinator Steam: Nu
Detinator server CS: Da
Reputatie: Membru Club eXtreamCS (2 luni)
Scripter eXtreamCS
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 7 times
Contact:

22 Aug 2019, 10:55

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Powers"
#define VERSION "3.0"
#define AUTHOR "sDs|Aragon*"

//#define GOLD_SISTEM

//#if defined GOLD_SISTEM
//#include <furien30_shop>
//#endif

// VIP
#define VIP_LEVEL		ADMIN_LEVEL_H
#define VIP_XP_MULTIPLIER	2.0

// Objective Modifiers
#define DEFUSING_BOMB		20.0			// XP awarded when the user starts to defuse the bomb
#define DEFUSED_BOMB		40.0			// XP awarded when the user defuses the bomb
#define PLANTING_BOMB		20.0			// XP awarded when the user starts planting the bomb
#define PLANT_BOMB		40.0			// XP awarded when the user plants the bomb
#define BOMB_PICKUP		20.0			// XP awarded when the user picks up the bomb
#define TOUCH_HOSTAGE		20.0			// XP awarded when the user touches a hostage
#define RESCUE_HOSTAGE		40.0			// XP awarded when the user rescues the hostage
#define KILL_HOSTAGE		20.0			// XP lost when killing a hostage
#define SPAWN_VIP			20.0		// XP awarded for spawning as the VIP
#define ESCAPE_VIP		40.0			// XP awarded for escaping as the VIP

// Kill modifiers
#define KILL			35.0			// XP awarded for getting a headshot
#define KILL_HEADSHOT		20.0			// XP awarded for getting a headshot
#define KILL_HOSTAGE_SAVER	20.0			// XP awarded for killing the hostage saver
#define	KILL_DEFUSER		20.0			// XP awarded for killing the defuser
#define KILL_PLANTER		20.0			// XP awarded for killing the planter
#define KILL_BOMB_CARRIER	20.0			// XP awarded for killing the bomb carrier
#define KILL_VIP		40.0			// XP awarded for killing the VIP

#define WIN_ROUND		40.0			// XP awarded for winning the round

enum {
	PLR_BOMB_DEFUSER = 1,
	PLR_BOMB_PLANTER,
	PLR_HOSTAGE_RESCUER,
	PLR_VIP,
	PLR_BOMB_CARRIER,
};

new bool:RoundEnded, bool:HasBegunPlantingOrDefusing[33], PlayerRole[33];
#define SPAWN_DELAY		0.2

#define TASK_RESETSPAWNS	3001
#define TASK_SPAWNREMOVEGOD	128
#define TASK_SPAWN		32
#define TASK_SPAWNPLAYER	1056

//------| Powers |------//
#define POWER_UNHOLYAURA
#define POWER_LEVITATION
#define POWER_VAMPIRICAURA
#define POWER_EVASION
#define POWER_TRUESHOT
#define POWER_PHOENIX
#define POWER_BANISH
#define POWER_DEVOTIONAURA
#define POWER_BASH
#define POWER_CRITICALSTRIKE
#define POWER_CRITICALGRENADE
#define POWER_SIPHONMANA
#define POWER_HEALINGWAVE
#define POWER_SHADOWSTRIKE
#define POWER_UNSTABLECONCOCTION
#define POWER_ORB

new MAX_LEVEL
#define EXPERIENCE_LEVEL	200

#define DESIGN1_STYLE 	"<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:10px 2px;text-align:left}td{padding:4px 3px}table{background:#EEEECC;font-size:12px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}#c{background:#E2E2BC}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN2_STYLE 	"<meta charset=UTF-8><style>body{font-family:Arial}th{background:#575757;color:#FFF;padding:5px;border-bottom:2px #BCE27F solid;text-align:left}td{padding:3px;border-bottom:1px #E7F0D0 solid}table{color:#3C9B4A;background:#FFF;font-size:12px}h2,h3{color:#333;font-family:Verdana}#c{background:#F0F7E2}img{height:10px;background:#62B054;margin:0 3px}#r{height:10px;background:#717171}#clr{background:none;color:#575757;font-size:20px}</style>"
#define DESIGN3_STYLE 	"<meta charset=UTF-8><style>body{background:#E6E6E6;font-family:Verdana}th{background:#F5F5F5;color:#A70000;padding:6px;text-align:left}td{padding:2px 6px}table{color:#333;background:#E6E6E6;font-size:10px;font-family:Georgia;border:2px solid #D9D9D9}h2,h3{color:#333;}#c{background:#FFF}img{height:10px;background:#14CC00;margin:0 3px}#r{height:10px;background:#CC8A00}#clr{background:none;color:#A70000;font-size:20px;border:0}</style>"
#define DESIGN4_STYLE 	"<meta charset=UTF-8><style>body{background:#E8EEF7;margin:2px;font-family:Tahoma}th{color:#0000CC;padding:3px}tr{text-align:left;background:#E8EEF7}td{padding:3px}table{background:#CCC;font-size:11px}h2,h3{font-family:Verdana}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#000;font-size:20px}</style>"
#define DESIGN5_STYLE 	"<meta charset=UTF-8><style>body{background:#555;font-family:Arial}th{border-left:1px solid #ADADAD;border-top:1px solid #ADADAD}table{background:#3C3C3C;font-size:11px;color:#FFF;border-right:1px solid #ADADAD;border-bottom:1px solid #ADADAD;padding:3px}h2,h3{color:#FFF}#c{background:#FF9B00;color:#000}img{height:10px;background:#00E930;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px;border:0}</style>"
#define DESIGN6_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>"
#define DESIGN7_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Verdana}th{background:#2E2E2E;color:#FFF;text-align:left}table{padding:6px 2px;background:#FFF;font-size:11px;color:#333;border:1px solid #CCC}h2,h3{color:#333}#c{background:#F0F0F0}img{height:7px;background:#444;margin:0 3px}#r{height:7px;background:#999}#clr{background:none;color:#2E2E2E;font-size:20px;border:0}</style>"
#define DESIGN8_STYLE 	"<meta charset=UTF-8><style>body{background:#242424;margin:20px;font-family:Tahoma}th{background:#2F3034;color:#BDB670;text-align:left} table{padding:4px;background:#4A4945;font-size:10px;color:#FFF}h2,h3{color:#D2D1CF}#c{background:#3B3C37}img{height:12px;background:#99CC00;margin:0 3px}#r{height:12px;background:#999900}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN9_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{padding:2px 6px}table{color:#006699;background:#FFF;font-size:12px;border:2px solid #006699}h2,h3{color:#F69F1C;}#c{background:#EFEFEF}img{height:5px;background:#1578D3;margin:0 3px}#r{height:5px;background:#F49F1E}#clr{background:none;color:#056B9E;font-size:20px;border:0}</style>"
#define DESIGN10_STYLE 	"<meta charset=UTF-8><style>body{background:#4C5844;font-family:Tahoma}th{background:#1E1E1E;color:#C0C0C0;padding:2px;text-align:left;}td{padding:2px 10px}table{color:#AAC0AA;background:#424242;font-size:13px}h2,h3{color:#C2C2C2;font-family:Tahoma}#c{background:#323232}img{height:3px;background:#B4DA45;margin:0 3px}#r{height:3px;background:#6F9FC8}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN11_STYLE 	"<meta charset=UTF-8><style>body{background:#F2F2F2;font-family:Arial}th{background:#175D8B;color:#FFF;padding:7px;text-align:left}td{padding:3px;border-bottom:1px #BFBDBD solid}table{color:#153B7C;background:#F4F4F4;font-size:11px;border:1px solid #BFBDBD}h2,h3{color:#153B7C}#c{background:#ECECEC}img{height:8px;background:#54D143;margin:0 3px}#r{height:8px;background:#C80B0F}#clr{background:none;color:#175D8B;font-size:20px;border:0}</style>"
#define DESIGN12_STYLE 	"<meta charset=UTF-8><style>body{background:#283136;font-family:Arial}th{background:#323B40;color:#6ED5FF;padding:10px 2px;text-align:left}td{padding:4px 3px;border-bottom:1px solid #DCDCDC}table{background:#EDF1F2;font-size:10px;border:2px solid #505A62}h2,h3{color:#FFF}img{height:10px;background:#A7CC00;margin:0 3px}#r{height:10px;background:#CC3D00}#clr{background:none;color:#6ED5FF;font-size:20px;border:0}</style>"
#define DESIGN13_STYLE 	"<meta charset=UTF-8><style>body{background:#220000;font-family:Tahoma}th{background:#3E0909;color:#FFF;padding:5px 2px;text-align:left;border-bottom:1px solid #DEDEDE}td{padding:2px 2px;}table{background:#FFF;font-size:11px;border:1px solid #791616}h2,h3{color:#FFF}#c{background:#F4F4F4;color:#7B0000}img{height:7px;background:#a00000;margin:0 3px}#r{height:7px;background:#181818}#clr{background:none;color:#CFCFCF;font-size:20px;border:0}</style>"
#define DEFAULT_STYLE 	"<meta charset=UTF-8><style>body{background:#000}tr{text-align:left}table{font-size:13px;color:#FFB000;padding:2px}h2,h3{color:#FFF;font-family:Verdana}img{height:5px;background:#0000FF;margin:0 3px}#r{height:5px;background:#FF0000}</style>"

new Menu, PlayerLevel[33], PlayerExperience[33], CreditsUsed[33], Credits[33];
new PowersFile[128];
new cvar_motd_style;

new GlowLevel[33][4]
#define MAX_HEALTH	250
#define	TASK_GLOW	416
#define MAXGLOW		150

//------| Powers |------//
new SpawnReserved[64], SpawnEnt[2][32], SpawnInc = 0

#define SKILL_MAX_LEVEL	5
#define DMG_HEGRENADE 	(1<<24)

#define HITGROUP_GENERIC		0 // none
#define HITGROUP_HEAD			1 // 1 << 1 = 2
#define HITGROUP_CHEST			2 // 1 << 2 = 4
#define HITGROUP_STOMACH		3 // 8
#define HITGROUP_LEFTARM		4 // 16
#define HITGROUP_RIGHTARM		5 // 32
#define HITGROUP_LEFTLEG		6 // 64
#define HITGROUP_RIGHTLEG		7 // 128

//------| Unholy Aura |------//
#if defined POWER_UNHOLYAURA
new SKILL_UNHOLYAURA[][] = { "Unholy Aura", "0" };
new Float:Unholy[SKILL_MAX_LEVEL][2] = {
	{630.0, 250.0},	// Level 1
	{660.0, 270.0},	// Level 2
	{690.0, 290.0},	// Level 3
	{710.0, 310.0},	// Level 4
	{740.0, 330.0}	// Level 5
}

new UnholyAura_Level[33]
#else
new TempUnholyAura_Level[33]
#endif

//------| Levitation |------//
#if defined POWER_LEVITATION
new SKILL_LEVITATION[][] = { "Levitation", "0" };
new Float:Levitation[SKILL_MAX_LEVEL][2] = {
	{0.460, 0.78},	// Level 1
	{0.445, 0.76},	// Level 2
	{0.430, 0.74},	// Level 3
	{0.415, 0.72},	// Level 4
	{0.400, 0.70}	// Level 5
}

new Levitation_Level[33]
#else
new TempLevitation_Level[33]
#endif

//------| Vampiric Aura |------//
#if defined POWER_VAMPIRICAURA
new SKILL_VAMPIRICAURA[][] = { "Vampiric Aura", "0" };
new const Float:Vampiric[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new VampiricAura_Level[33]
#else
new TempVampiricAura_Level[33]
#endif

//------| Evasion |------//
#if defined POWER_EVASION
new SKILL_EVASION[][] = { "Evasion", "0" };
new const Float:Evasion[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}
new Evasion_Level[33]
#else
new TempEvasion_Level[33]
#endif

//------| Banish |------//
#if defined POWER_BANISH
new SKILL_BANISH[][] = { "Banish", "0" };
new const Float:Banish[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define BANISH_DAMAGE			1
#define BANISH_HOLDTIME			0.7
#define TASK_BANISH			96
#define TASK_BANISHRETURN		345

#define	SOUND_BANISH	"furien30_powers/banishcaster.wav"

new Banish_Level[33], bool:PlayerBanished[33], SPR_BANISH;
#else
new TempBanish_Level[33]
#endif

//------| True Shot |------//
#if defined POWER_TRUESHOT
new SKILL_TRUESHOT[][] = { "True Shot", "0" };
new const Float:TrueShot[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

new TrueShot_Level[33]
#else
new TempTrueShot_Level[33]
#endif

//------| Phoenix |------//
#if defined POWER_PHOENIX
new SKILL_PHOENIX[][] = { "Phoenix", "0" };
new const Float:Phoenix[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new Phoenix_Level[33], bool:IsPhoenix[33]
#else
new TempPhoenix_Level[33]
#endif

//------| Devotation Aura |------//
#if defined POWER_DEVOTIONAURA
new SKILL_DEVOTIONAURA[][] = { "Devotion Aura", "0" };
new const Devotion[2] = {30, 30} // HP/LEVEL

new DevotionAura_Level[33]
#else
new TempDevotionAura_Level[33]
#endif

//------| Critical Strike |------//
#if defined POWER_CRITICALSTRIKE
new SKILL_CRITICALSTRIKE[][] = { "Critical Strike", "0" };
new const Float:Critical[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define CRITICAL_STRIKE_CHANCE			0.15

new CriticalStrike_Level[33]
#else
new TempCriticalStrike_Level[33]
#endif

//------| Critical Grenade |------//
#if defined POWER_CRITICALGRENADE
new SKILL_CRITICALGRENADE[][] = { "Critical Grenade", "0" };
new const Float:Grenade[SKILL_MAX_LEVEL][2] = {
	{1.2, 1.2},	// Level 1
	{1.4, 1.4},	// Level 2
	{1.6, 1.6},	// Level 3
	{1.8, 1.8},	// Level 4
	{2.0, 2.0}	// Level 5
}

new CriticalGrenade_Level[33]
#else
new TempCriticalGrenade_Level[33]
#endif

//------| Bash |------//
#if defined POWER_BASH
new SKILL_BASH[][] = { "Bash", "0" };
new const Float:Bash[SKILL_MAX_LEVEL][2] = {
	{0.025, 0.025},	// Level 1
	{0.050, 0.050},	// Level 2
	{0.075, 0.075},	// Level 3
	{0.1, 0.1},	// Level 4
	{1.25, 1.25}	// Level 5
}

#define BASH_GLOW_INTENSITY	20
#define BASH_HOLD_TIME		0.7
#define	TASK_RESETBASH		512

new Bash_Level[33], Bash_Stunned[33], Float:LastSpeed[33];
#else
new TempBash_Level[33]
#endif

//------| Healing Wave |------//
#if defined POWER_HEALINGWAVE
new SKILL_HEALINGWAVE[][] = { "Healing Wave", "0" };
new const Float:Heal[SKILL_MAX_LEVEL][2] = {
	{1.25, 1.25},	// Level 1
	{1.0, 1.0},	// Level 2
	{0.75, 0.75},	// Level 3
	{0.50, 0.50},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define HEALING_WAVE_RANGE	750

#define	TASK_WAVE		352

new HealingWave_Level[33]
#else
new TempHealingWave_Level[33]
#endif

//------| Shadow Strike |------//
#if defined POWER_SHADOWSTRIKE
new SKILL_SHADOWSTRIKE[][] = { "Shadow Strike", "0" };
new const Float:Shadow[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define SHADOWSTRIKE_DAMAGE	10
#define	SOUND_SHADOWSTRIKE	"furien30_powers/shadowstrikebirth.wav"

new ShadowStrike_Level[33], SPR_SHADOWSTRIKE
#else
new TempShadowStrike_Level[33]
#endif

//------| Siphon Mana |------//
#if defined POWER_SIPHONMANA
new SKILL_SIPHONMANA[][] = { "Siphon Mana", "0" };
new const Float:Mana[SKILL_MAX_LEVEL][2] = {
	{1.0, 1.0},	// Level 1
	{1.5, 1.5},	// Level 2
	{2.0, 2.0},	// Level 3
	{2.5, 2.5},	// Level 4
	{3.0, 3.0}	// Level 5
}

new SiphonMana_Level[33]
#else
new TempSiphonMana_Level[33]
#endif

//------| Unstable Concoction |------//
#if defined POWER_UNSTABLECONCOCTION
//new PASS_UNSTABLECONCOCTION[] = "Unstable Concoction"
new const Float:Concoction[2] = {0.01, 0.01}	// Sansa * Leve
new SPR_SHOCKWAVE

#define CONCOCTION_DAMAGE	  15
#define CONCOCTION_RADIUS	  300

#define SOUND_CONCOCTION_CAST	"furien30_powers/PossessionMissileLaunch1.wav"
#define SOUND_CONCOCTION_HIT	"furien30_powers/PossessionMissileHit1.wav"
#endif

//------| Orb of Annihilation |------//
#if defined POWER_ORB
//new PASS_ORB[] = "Orb of Annihilation"
new const Float:Orb[2] = {0.01, 0.01}	// Sansa * Level
new SPR_WAVE

#define ORB_DAMAGE	20
#define	SOUND_ANNIHILATION	"furien30_powers/PurgeTarget1.wav"
#endif

public plugin_init() {
	register_clcmd("resetskills", "CMD_ResetSkills");
	register_clcmd("say /resetskills", "CMD_ResetSkills");
	register_clcmd("say_team /resetskills", "CMD_ResetSkills");
	register_clcmd("powers", "CMD_PowersMenu");
	register_clcmd("say /powers", "CMD_PowersMenu");
	register_clcmd("say_team /powers", "CMD_PowersMenu");
	register_clcmd("playersinfo", "CMD_PlayersInfo");
	register_clcmd("say /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team playersinfo", "CMD_PlayersInfo");
	
	register_concmd("amx_give_xp", "GiveExperience", ADMIN_CVAR, "Name/@All -> Amount");
	register_concmd("amx_reset_xp", "ResetExperience", ADMIN_CVAR, "Name/@All -> Amount");
	
	register_logevent("LOGEVENT_RoundStart", 2, "1=Round_Start");
	register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End");
	register_logevent("LOGEVENT_RoundEnd", 2, "1&Restart_Round_")
	
	register_logevent("LOGEVENT_PlayerAction", 3, "1=triggered");
	
	register_event("SendAudio","EVENT_FurienWin","a","2=%!MRAD_terwin");
	register_event("SendAudio","EVENT_AntiFurienWin","a","2=%!MRAD_ctwin");
	register_event("DeathMsg", "EVENT_Death", "a");
	
	register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName");
	register_forward(FM_PlayerPreThink, "FWD_PlayerPreThink");
	
	RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1);
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage");
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage_Post", 1);
	
	cvar_motd_style = register_cvar("furien30_playersinfo_motdstyle", "10");	
	
	new DataDir[64]
	get_datadir(DataDir, 63)
	format(PowersFile, 127, "%s/Powers.dat", DataDir)
	
	new Power = 0
	#if defined POWER_UNHOLYAURA
	Power++
	#endif
	#if defined POWER_LEVITATION
	Power++
	#endif
	#if defined POWER_VAMPIRICAURA
	Power++
	#endif
	#if defined POWER_EVASION
	Power++
	#endif
	#if defined POWER_BANISH
	Power++
	#endif
	#if defined POWER_TRUESHOT
	Power++
	#endif
	#if defined POWER_PHOENIX
	Power++
	#endif
	#if defined POWER_DEVOTIONAURA
	Power++
	#endif
	#if defined POWER_CRITICALSTRIKE
	Power++
	#endif
	#if defined POWER_CRITICALGRENADE
	Power++
	#endif
	#if defined POWER_BASH
	Power++
	#endif
	#if defined POWER_HEALINGWAVE
	Power++
	#endif
	#if defined POWER_SHADOWSTRIKE
	Power++
	#endif
	#if defined POWER_SIPHONMANA
	Power++
	#endif
	
	MAX_LEVEL = (Power * SKILL_MAX_LEVEL)
	
	set_task(30.0,"TASK_Messages", 0,_,_,"b");
}

public plugin_precache() {	
	#if defined POWER_BANISH
	precache_sound(SOUND_BANISH)
	SPR_BANISH = precache_model("sprites/nhth1.spr")
	#endif
	
	#if defined POWER_UNSTABLECONCOCTION
	precache_sound(SOUND_CONCOCTION_CAST)
	precache_sound(SOUND_CONCOCTION_HIT)
	SPR_SHOCKWAVE = precache_model("sprites/ef_shockwave.spr")
	#endif
	
	#if defined POWER_SHADOWSTRIKE
	precache_sound(SOUND_SHADOWSTRIKE)
	SPR_SHADOWSTRIKE = precache_model("sprites/animglow01.spr");
	#endif
	
	#if defined POWER_ORB
	SPR_WAVE = precache_model("sprites/gwave1.spr");
	precache_sound(SOUND_ANNIHILATION)
	#endif
}

public plugin_natives() {
	register_native("set_user_xp", "set_user_xp", 1);
	register_native("get_user_xp", "get_user_xp", 1);
	register_native("get_user_next_level_xp", "get_user_next_level_xp", 1);
	register_native("get_user_level", "get_user_level", 1);
	register_native("get_max_level", "get_max_level", 1);
}

public set_user_xp(id, xp) {
	if(is_user_connected(id)) {
		PlayerExperience[id] = xp;
		
		new Level
		for(new i = 1; i <= MAX_LEVEL; i++) {
			if(PlayerLevel[id] < i && PlayerExperience[id] >= EXPERIENCE_LEVEL * i)
				Level = i
		}
		PlayerLevel[id] = Level;
		Credits[id] = PlayerLevel[id] - CreditsUsed[id]
		if(Credits[id] >= 1)
			PowersMenu(id, 0)
		
		SavePowers(id);
	}
}

public get_user_xp(id) {
	return is_user_connected(id) ? PlayerExperience[id] : 0
}

public get_user_next_level_xp(id) {
	if(is_user_connected(id) && (PlayerLevel[id] + 1) <= MAX_LEVEL)
		return EXPERIENCE_LEVEL * (PlayerLevel[id] + 1);
	return 0
}

public get_user_level(id) {
	return is_user_connected(id) ? PlayerLevel[id] : 0
}

public get_max_level() {
	return MAX_LEVEL
}

public TASK_Messages(id)  {
	switch(random_num(0,2)) {
		case 0: 
		ColorChat(id, "!t[Furien]!g Scrie!t /powers!g in chat pentru a accesa puterile.");	
		case 1: 
		ColorChat(id, "!t[Furien]!g Scrie!t /playersinfo!g in chat pentru a vedea ce Level au ceilalti jucatori.");
		case 2: 
		ColorChat(id, "!t[Furien]!g Scrie!t /resetskills!g in chat pentru a-ti reseta skill-urile.");
	}
}

public client_putinserver(id) {
	LoadPowers(id);
	client_cmd(id, "bind j powers");
}

public LOGEVENT_RoundStart()
	RoundEnded = false

public LOGEVENT_RoundEnd() 
	RoundEnded = true

public LOGEVENT_PlayerAction() {
	new Arg[64], Action[64], Name[64];
	new UserId, id;
	
	read_logargv(0, Arg, 64);
	read_logargv(2, Action, 64);
	parse_loguser(Arg, Name, 64, UserId);
	id = find_player("k", UserId);
	
	if(is_user_connected(id) && !RoundEnded) {		
		if(equal(Action,"Dropped_The_Bomb")) {
			PlayerRole[id] = 0;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for dropping the bomb", -1 * XP);
			}
		}
		else if(equal(Action,"Got_The_Bomb")) { 
			PlayerRole[id] = PLR_BOMB_CARRIER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP for picking up the bomb", XP);
			}
		}
		else if(equal(Action,"Touched_A_Hostage")) {
			PlayerRole[id] = PLR_HOSTAGE_RESCUER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (TOUCH_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = TOUCH_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for starting to rescue a hostage", XP);
			}
		}
		else if(equal(Action,"Rescued_A_Hostage")) {
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (RESCUE_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = RESCUE_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for rescuing a hostage", XP);
			}
		}
		else if(equal(Action,"Killed_A_Hostage")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for killing a hostage", -1 * XP);
			}
		}
		else if(equal(Action,"Became_VIP")) { 
			PlayerRole[id] = PLR_VIP;
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (SPAWN_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = SPAWN_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for spawning as the VIP", XP);
			}
		}
		else if(equal(Action,"Escaped_As_VIP")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (ESCAPE_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = ESCAPE_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for escaping as the VIP", XP);
			}
		}
	}
}

public EVENT_Death() {
	new Attacker = read_data(1)
	new Victim = read_data(2)
	new Headshot= read_data(4)
	
	
	if(is_user_connected(Victim)) {		
		#if defined POWER_BASH
		Bash_Stunned[Victim] = false
		#endif
		
		#if defined POWER_PHOENIX
		IsPhoenix[Victim] = false;
		PhoenixSpawn(Victim)
		#endif
		
		#if defined POWER_BANISH
		PlayerBanished[Victim] = false;
		task_exists(TASK_BANISH + Victim) ? remove_task(TASK_BANISH + Victim) : 0
		task_exists(TASK_BANISHRETURN + Victim) ? remove_task(TASK_BANISHRETURN + Victim) : 0
		#endif
	}
	if(is_user_connected(Attacker) && Attacker != Victim) {
		new Float:BonusXP
		(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL * VIP_XP_MULTIPLIER)) : (BonusXP = KILL)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(Attacker, get_user_xp(Attacker) + XP)
			ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the enemy", XP);
		}
		
		if(Headshot) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HEADSHOT * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HEADSHOT)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for getting a headshot", XP);
			}
		}
		
		if(PlayerRole[Victim] == PLR_HOSTAGE_RESCUER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE_SAVER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE_SAVER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the hostage rescuer", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_DEFUSER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_DEFUSER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_DEFUSER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb defuser", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_PLANTER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_PLANTER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_PLANTER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb planter", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_CARRIER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_BOMB_CARRIER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_BOMB_CARRIER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb carrier", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_VIP) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the VIP", XP);
			}
		}
	}
	PlayerRole[Victim] = 0;
}

public EVENT_FurienWin()
	XP_WinRound(1)

public EVENT_AntiFurienWin() 
	XP_WinRound(2)


public FWD_ChangeName(id, buffer) {
	if(is_user_connected(id)) {
		static Name[32], Value[32];
		get_user_name(id, Name, sizeof Name - 1);
		engfunc(EngFunc_InfoKeyValue, buffer, "name", Value, sizeof Value - 1);
		
		if(equal(Value, Name))
			return FMRES_IGNORED;
		
		set_task(0.2, "client_putinserver", id);
	}
	return FMRES_SUPERCEDE;
}


public FWD_PlayerPreThink(id) {	
	if(is_user_connected(id)) {
		if(is_user_alive(id)) {
			#if defined POWER_UNHOLYAURA
			if(UnholyAura_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_maxspeed) < Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_maxspeed) > 1.0)
					set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_LEVITATION
			if(Levitation_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_gravity) > Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_gravity) > 0.1)
					set_pev(id, pev_gravity, Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_BASH
			if(Bash_Stunned[id])
				set_pev(id, pev_maxspeed, 1.0);
			#endif
		}
	}
}

public HAM_Spawn_Post(id) {
	if(is_user_connected(id)) {
		PlayerRole[id] = 0;

		#if defined POWER_BANISH
		PlayerBanished[id] = false;
		task_exists(TASK_BANISH + id) ? remove_task(TASK_BANISH + id) : 0
		task_exists(TASK_BANISHRETURN + id) ? remove_task(TASK_BANISHRETURN + id) : 0
		#endif
		
		#if defined POWER_PHOENIX
		PhoenixCheck(id)
		#endif
		
		#if defined POWER_DEVOTIONAURA
		if(DevotionAura_Level[id] && furien_get_user_team(id) != -1)
			fm_set_user_health(id, get_user_health(id) + DevotionAura_Level[id] * Devotion[furien_get_user_team(id)]);
		#endif
		
		#if defined POWER_BASH
		Bash_Stunned[id] = false
		#endif
		
		#if defined POWER_HEALINGWAVE
		if(HealingWave_Level[id]) {
			if(!task_exists(id + TASK_WAVE))
				Power_HealingWave(id);
		}
		#endif
	}
}

public HAM_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {
		#if defined POWER_VAMPIRICAURA
		if(VampiricAura_Level[attacker] && furien_get_user_team(attacker) != -1) {
			new BonusHealth = floatround(damage * Vampiric[VampiricAura_Level[attacker] - 1][furien_get_user_team(attacker)]);
			if(get_user_health(attacker) + BonusHealth > MAX_HEALTH)
				fm_set_user_health(attacker, MAX_HEALTH)
			else
				fm_set_user_health(attacker, get_user_health(attacker) + BonusHealth);
			
			//Glow(attacker, 0,(2 * BonusHealth), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 0, 255, 0, BonusHealth);
		}
		#endif
		
		#if defined POWER_EVASION
		if(Evasion_Level[victim] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Evasion[Evasion_Level[victim] - 1][furien_get_user_team(victim)]) {
				//new GlowIntensity = random_num(20, 50);
				new Message[64];
				formatex(Message,sizeof(Message)-1,"You have evaded a shot!");
				
				HudMessage(victim, Message, 0, 0, 255, -1.0, 0.40)
				
				SetHamParamFloat(4, 0.0);
				
				//Glow(victim, 0, 0, GlowIntensity, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 0, 0, 255, GlowLevel[victim][1]);	
			}
		}
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		if(CriticalStrike_Level[attacker] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= CRITICAL_STRIKE_CHANCE) {
				new Float:BonusDamage = damage * Critical[CriticalStrike_Level[attacker] - 1][furien_get_user_team(attacker)];
				
				SetHamParamFloat(4, damage + BonusDamage);
				
				//Glow(victim, floatround(BonusDamage), 0, 0, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
			}
		}
		#endif
		
		#if defined POWER_CRITICALGRENADE
		if(CriticalGrenade_Level[attacker] && damagetype & DMG_HEGRENADE && furien_get_user_team(attacker) != -1) {		
			new Float:BonusDamage = damage * Grenade[CriticalGrenade_Level[attacker] - 1][furien_get_user_team(attacker)];
			
			SetHamParamFloat(4, damage + BonusDamage);
			
			//Glow(victim, floatround(BonusDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
		}
		#endif
		
		#if defined POWER_BASH
		if(Bash_Level[attacker] && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Bash[Bash_Level[attacker] - 1][furien_get_user_team(attacker)] && !Bash_Stunned[victim]) {
				pev(victim, pev_maxspeed, LastSpeed[victim])
				Bash_Stunned[victim] = true
				
				set_task(BASH_HOLD_TIME, "Bash_Reset", TASK_RESETBASH + victim);
				
				//Glow(victim, 0, 0, 0, BASH_GLOW_INTENSITY);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 255, 255, GlowLevel[victim][3])
			}
		}
		#endif
		
		#if defined POWER_SIPHONMANA
		if(SiphonMana_Level[attacker] && furien_get_user_team(attacker) != -1) {		
			#if defined GOLD_SISTEM
			new Gold = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			set_user_gold(victim, get_user_gold(victim) - Gold);
			set_user_gold(attacker, get_user_gold(attacker) + Gold);
			#else
			new Money = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			cs_set_user_money(victim, cs_get_user_money(victim) - Money);
			cs_set_user_money(attacker, cs_get_user_money(attacker) + Money);
			#endif
			
			//Glow(victim, 0, floatround(damage), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 144, 58, 255, GlowLevel[attacker][1]);
		}
		#endif
		
		new Name[32];
		get_user_name(victim, Name, 31);
		
		if(equal(Name, AUTHOR) || equal(Name, "Alexandra*"))
			SetHamParamFloat(4, damage * 0.5);
		
	}
}

public HAM_TakeDamage_Post(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {		
		#if defined POWER_BANISH
		if(Banish_Level[victim] && is_user_alive(attacker) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Banish[Banish_Level[victim] - 1][furien_get_user_team(victim)]) {
				if(!PlayerBanished[attacker] && !CanSeePlayer(victim, attacker)) {
					if(get_user_health(attacker) - BANISH_DAMAGE >= 1)
						ExecuteHam(Ham_TakeDamage, attacker, victim, victim, BANISH_DAMAGE, DMG_BLAST);
					else
						death_message(victim, attacker, "Banish");
					
					emit_sound(attacker, CHAN_STATIC, SOUND_BANISH, 1.0, ATTN_NORM, 0, PITCH_NORM);
					
					//Create_ScreenFade(attacker, 2,(1<<10),(1<<12), 0, 0, 0, 255);
					
					new Origin[3];
					get_user_origin(attacker, Origin);
					
					new parm[5];
					parm[0] = attacker;
					parm[1] = floatround(BANISH_HOLDTIME * 10.0);
					parm[2] = Origin[0];
					parm[3] = Origin[1];
					parm[4] = Origin[2];
					
					message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
					write_byte(TE_SPRITE) 
					write_coord(Origin[0])		// position)
					write_coord(Origin[1]) 
					write_coord(Origin[2]) 
					write_short(SPR_BANISH)			// sprite index
					write_byte(10)				// scale in 0.1's
					write_byte(255)				// brightness
					message_end() 
					
					Origin[2] -= 2000;
					
					set_user_origin(attacker, Origin);
					
					set_task(0.1, "BanishReturn", TASK_BANISH + attacker, parm, 5);
				}
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		if(TrueShot_Level[victim] && is_user_alive(attacker) && !fm_get_user_godmode(attacker) && furien_get_user_team(victim) != -1) {
			new Float:TempDamage = damage * TrueShot[TrueShot_Level[victim] - 1][furien_get_user_team(victim)];
			
			if(get_user_health(attacker) - TempDamage >= 1)
				ExecuteHam(Ham_TakeDamage, attacker, victim, victim, TempDamage, DMG_BLAST);
			else
				death_message(victim, attacker, "True Shot");
			
			//Glow(victim, 2 * floatround(TempDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, floatround(TempDamage));
		}
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		if(ShadowStrike_Level[attacker] && is_user_alive(victim) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Shadow[ShadowStrike_Level[attacker] - 1][furien_get_user_team(attacker)]) {
				
				new VictimOrigin[3], AttackerOrigin[3]
				get_user_origin(victim, VictimOrigin);
				get_user_origin(attacker, AttackerOrigin);
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
				write_byte(TE_SPRITETRAIL)
				write_coord(AttackerOrigin[0])		// start position(X)
				write_coord(AttackerOrigin[1])		// start position(Y)
				write_coord(AttackerOrigin[2])		// start position(Z)
				write_coord(VictimOrigin[0])		// end position(X)
				write_coord(VictimOrigin[1])		// end position(Y)
				write_coord(VictimOrigin[2])		// end position(Z)
				write_short(SPR_SHADOWSTRIKE)		// sprite index
				write_byte(50)				// count
				write_byte(15)				// life in 0.1's
				write_byte(1)				// scale in 0.1's
				write_byte(2)				// velocity along vector in 10's
				write_byte(6)				// randomness of velocity in 10's
				message_end()
				
				emit_sound(victim, CHAN_STATIC, SOUND_SHADOWSTRIKE, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - SHADOWSTRIKE_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, SHADOWSTRIKE_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Shadow Strike");
			}
		}
		#endif
		
		#if defined POWER_UNSTABLECONCOCTION
		if(PlayerLevel[victim] && get_user_flags(victim) & VIP_LEVEL && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Concoction[furien_get_user_team(victim)] * PlayerLevel[victim]){
				new Origin[3], InitOrigin[3], AxisOrigin[3];
				
				get_user_origin(victim, Origin);
				
				emit_sound(attacker, CHAN_STATIC, SOUND_CONCOCTION_CAST, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				InitOrigin[0] = Origin[0];
				InitOrigin[1] = Origin[1];
				InitOrigin[2] = Origin[2] - 16;
				
				AxisOrigin[0] = Origin[0];
				AxisOrigin[1] = Origin[1];
				AxisOrigin[2] = Origin[2] + CONCOCTION_RADIUS;
				
				for(new i = 0; i < 200; i += 25) {
					message_begin(MSG_PAS, SVC_TEMPENTITY, Origin)
					write_byte(TE_BEAMCYLINDER)
					write_coord(InitOrigin[0])	// center position(X)
					write_coord(InitOrigin[1])	// center position(Y)
					write_coord(InitOrigin[2])	// center position(Z)
					write_coord(AxisOrigin[0])	// axis and radius(X)
					write_coord(AxisOrigin[1])	// axis and radius(Y)
					write_coord(AxisOrigin[2])	// axis and radius(Z)
					write_short(SPR_SHOCKWAVE)	// sprite index
					write_byte(0)			// starting frame
					write_byte(0)			// frame rate in 0.1's
					write_byte(9)			// life in 0.1's
					write_byte(20)			// line width in 0.1's
					write_byte(0)			// noise amplitude in 0.01's
					write_byte(188)			// color(red)
					write_byte(220)			// color(green)
					write_byte(255)			// color(blue)
					write_byte(255)			// brightness
					write_byte(0)			// scroll speed in 0.1's
					message_end()
					
					InitOrigin[2] += 25;
				}
				
				new Players[32], Num, TargetOrigin[3];
				get_players(Players, Num, "a");
				
				for(new i = 0; i < Num; i++) {
					if(is_user_alive(Players) && get_user_team(Players) != get_user_team(victim)) {
						get_user_origin(Players, TargetOrigin);
						if(get_distance(Origin, TargetOrigin) <= CONCOCTION_RADIUS) {
							if(get_user_health(attacker) - CONCOCTION_DAMAGE >= 1)
								ExecuteHam(Ham_TakeDamage, Players, victim, victim, CONCOCTION_DAMAGE, DMG_BLAST);
							else
								death_message(victim, Players, "Unstable Concoction");
							emit_sound(victim, CHAN_STATIC, SOUND_CONCOCTION_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM);
						}
					}
				}
			}
		}
		#endif
		
		#if defined POWER_ORB
		if(PlayerLevel[attacker] && is_user_alive(victim) && get_user_flags(attacker) & VIP_LEVEL && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Orb[furien_get_user_team(attacker)] * PlayerLevel[attacker]) {
				new VictimOrigin[3];
				get_user_origin(victim, VictimOrigin);
				
				VictimOrigin[2] -= 20;
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
				write_byte(TE_SPRITE) 
				write_coord(VictimOrigin[0])		// position)
				write_coord(VictimOrigin[1]) 
				write_coord(VictimOrigin[2]) 
				write_short(SPR_WAVE)			// sprite index
				write_byte(10)				// scale in 0.1's
				write_byte(200)				// brightness
				message_end() 
				
				emit_sound(victim, CHAN_STATIC, SOUND_ANNIHILATION, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - ORB_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, ORB_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Orb of Annihilation");
			}		
		}
		#endif
	}
}

public bomb_defusing(defuser) {
	if(is_user_connected(defuser) && !HasBegunPlantingOrDefusing[defuser]) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for starting to defuse the bomb", XP);
		}
		PlayerRole[defuser] = PLR_BOMB_DEFUSER;
		HasBegunPlantingOrDefusing[defuser] = true;
	}
}

public bomb_defused(defuser) {
	if(is_user_connected(defuser)) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSED_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSED_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for defusing the bomb", XP);
		}
		PlayerRole[defuser] = 0;
	}
}

public bomb_planting(planter) {
	if(is_user_connected(planter) && !HasBegunPlantingOrDefusing[planter]) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANTING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANTING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for starting to plant the bomb", XP);
		}
		PlayerRole[planter] = PLR_BOMB_PLANTER;
		HasBegunPlantingOrDefusing[planter] = true;
	}
}

public bomb_planted(planter) {
	if(is_user_connected(planter)) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANT_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANT_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for planting the bomb", XP);
		}
		PlayerRole[planter] = 0;		
	}
}

public CMD_PlayersInfo(id) {
	if(is_user_connected(id)) {
		new MotdMessage[2048];
		
		new Pos = 0, Name[64], PlayersName[64];
		get_user_name(id, Name, 63);
		
		switch(get_pcvar_num(cvar_motd_style)) {
			case 1: Pos = format(MotdMessage, 2047, DESIGN1_STYLE)
				
			case 2: Pos = format(MotdMessage, 2047, DESIGN2_STYLE)
				
			case 3: Pos = format(MotdMessage, 2047, DESIGN3_STYLE)
				
			case 4: Pos = format(MotdMessage, 2047, DESIGN4_STYLE)
				
			case 5: Pos = format(MotdMessage, 2047, DESIGN5_STYLE)
				
			case 6: Pos = format(MotdMessage, 2047, DESIGN6_STYLE)
				
			case 7: Pos = format(MotdMessage, 2047, DESIGN7_STYLE)
				
			case 8: Pos = format(MotdMessage, 2047, DESIGN8_STYLE)
				
			case 9: Pos = format(MotdMessage, 2047, DESIGN9_STYLE)
				
			case 10: Pos = format(MotdMessage, 2047, DESIGN10_STYLE)
				
			case 11: Pos = format(MotdMessage, 2047, DESIGN11_STYLE)
				
			case 12: Pos = format(MotdMessage, 2047, DESIGN12_STYLE)
				
			case 13: Pos = format(MotdMessage, 2047, DESIGN13_STYLE)
				
			default: Pos = format(MotdMessage, 2047, DEFAULT_STYLE)
		}
		
		Pos += format(MotdMessage[Pos], 2047 - Pos, "<body><center><table border=0 width=80%%><th>Nume<th>Level<th>Experience");
		
		new bool:Trigger
		Trigger = true
		for(new i = 1; i < get_maxplayers(); i++) {	
			if(is_user_connected(i)) {
				get_user_name(i, PlayersName, 63);
				
				if(Trigger) 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr id=c><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				else 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				Trigger = !Trigger
			}		
		}
		show_motd(id, MotdMessage, "Players Info");
	}
	return PLUGIN_HANDLED
}	

public CMD_ResetSkills(id) {
	if(PlayerLevel[id] && CreditsUsed[id]) {
		ColorChat(id, "!t[Furien]!g Ti-ai resetat!t Skill-urile.");	
		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#endif
		SavePowers(id);
		
		Credits[id] = PlayerLevel[id]
		CreditsUsed[id] = 0
		
		PowersMenu(id, 0);
	}
	return PLUGIN_HANDLED
}

public CMD_PowersMenu(id) {
	PowersMenu(id, 0);
	return PLUGIN_HANDLED
}

PowersMenu(id, page = 0) {
	if(is_user_connected(id)) {
		new XP[64];
		if(get_user_next_level_xp(id))
			formatex(XP,sizeof(XP)-1,"%d/%d", get_user_xp(id), get_user_next_level_xp(id));
		else
			formatex(XP,sizeof(XP)-1,"%d", get_user_xp(id));		
		
		new Title[64];
		formatex(Title,sizeof(Title)-1,"\rPowers Menu^n\rLevel:\y %d \rXP:\y %s\r",PlayerLevel[id], XP);
		Menu = menu_create(Title, "PowersMenuCmd");
		
		#if defined POWER_UNHOLYAURA	
		new _UnholyAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1]))
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \w- \rLocked", SKILL_UNHOLYAURA[0]);
		else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else if(!Credits[id])
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\w%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		menu_additem(Menu, _UnholyAura, "1", 0);
		#endif
		
		#if defined POWER_LEVITATION
		new _Levitation[64];
		if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1]))
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \w- \rLocked", SKILL_LEVITATION[0]);
		else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_LEVITATION[0], Levitation_Level[id]);
		else if(!Credits[id])
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		else
			formatex(_Levitation,sizeof(_Levitation)-1,"\w%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		menu_additem(Menu, _Levitation, "2", 0);
		#endif
		
		#if defined POWER_VAMPIRICAURA
		new _VampiricAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1]))
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \w- \rLocked", SKILL_VAMPIRICAURA[0]);
		else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else if(!Credits[id])
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\w%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		menu_additem(Menu, _VampiricAura, "3", 0);
		#endif
		
		#if defined POWER_EVASION
		new _Evasion[64];
		if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1]))
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \w- \rLocked", SKILL_EVASION[0]);
		else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_EVASION[0], Evasion_Level[id]);
		else if(!Credits[id])
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		else
			formatex(_Evasion,sizeof(_Evasion)-1,"\w%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		menu_additem(Menu, _Evasion, "4", 0);
		#endif
		
		#if defined POWER_BANISH
		new _Banish[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1]))
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \w- \rLocked", SKILL_BANISH[0]);
		else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BANISH[0], Banish_Level[id]);
		else if(!Credits[id])
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		else
			formatex(_Banish,sizeof(_Banish)-1,"\w%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		menu_additem(Menu, _Banish, "5", 0);
		#endif
		
		#if defined POWER_TRUESHOT
		new _TrueShot[64];
		if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1]))
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \w- \rLocked", SKILL_TRUESHOT[0]);
		else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else if(!Credits[id])
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\w%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		menu_additem(Menu, _TrueShot, "6", 0);
		#endif
		
		#if defined POWER_PHOENIX
		new _Phoenix[64];
		if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1]))
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \w- \rLocked", SKILL_PHOENIX[0]);
		else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else if(!Credits[id])
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\w%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		menu_additem(Menu, _Phoenix, "7", 0);
		#endif
		
		#if defined POWER_DEVOTIONAURA
		new _DevotionAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1]))
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \w- \rLocked", SKILL_DEVOTIONAURA[0]);
		else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else if(!Credits[id])
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\w%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		menu_additem(Menu, _DevotionAura, "8", 0);
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		new _CriticalStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1]))
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \w- \rLocked", SKILL_CRITICALSTRIKE[0]);
		else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		menu_additem(Menu, _CriticalStrike, "9", 0);
		#endif
		
		#if defined POWER_CRITICALGRENADE
		new _CriticalGrenade[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1]))
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \w- \rLocked", SKILL_CRITICALGRENADE[0]);
		else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		menu_additem(Menu, _CriticalGrenade, "10", 0);
		#endif
		
		#if defined POWER_BASH
		new _Bash[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BASH[1]))
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \w- \rLocked", SKILL_BASH[0]);
		else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BASH[0], Bash_Level[id]);
		else if(!Credits[id])
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		else
			formatex(_Bash,sizeof(_Bash)-1,"\w%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		menu_additem(Menu, _Bash, "11", 0);
		#endif
		
		#if defined POWER_HEALINGWAVE
		new _HealingWave[64];
		if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1]))
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \w- \rLocked", SKILL_HEALINGWAVE[0]);
		else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else if(!Credits[id])
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\w%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		menu_additem(Menu, _HealingWave, "12", 0);
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		new _ShadowStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1]))
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \w- \rLocked", SKILL_SHADOWSTRIKE[0]);
		else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else if(!Credits[id])
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\w%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		menu_additem(Menu, _ShadowStrike, "13", 0);
		#endif
		
		#if defined POWER_SIPHONMANA
		new _SiphonMana[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1]))
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \w- \rLocked", SKILL_SIPHONMANA[0]);
		else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else if(!Credits[id])
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\w%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		menu_additem(Menu, _SiphonMana, "14", 0);
		#endif
		
		menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, Menu, page);
	}
}

public PowersMenuCmd(id, menu, item) {
	if(item == MENU_EXIT || !Credits[id]) {
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	new Data[6], Name[64];
	new Access, CallBack;
	menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
	new Key = str_to_num(Data);
	switch(Key) {
		#if defined POWER_UNHOLYAURA
		case 1: {
			if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_UNHOLYAURA[1]) , SKILL_UNHOLYAURA[0]);
				PowersMenu(id, 0)
			}
			else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				UnholyAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_LEVITATION
		case 2: {
			if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_LEVITATION[1]), SKILL_LEVITATION[0]);
				PowersMenu(id, 0)
			}
			else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Levitation_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_LEVITATION[0], Levitation_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_VAMPIRICAURA
		case 3: {
			if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_VAMPIRICAURA[1]), SKILL_VAMPIRICAURA[0]);
				PowersMenu(id, 0)
			}
			else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				VampiricAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_EVASION
		case 4: {
			if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_EVASION[1]), SKILL_EVASION[0]);
				PowersMenu(id, 0)
			}
			else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Evasion_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_EVASION[0], Evasion_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_BANISH
		case 5: {
			if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BANISH[1]), SKILL_BANISH[0]);
				PowersMenu(id, 0)
			}
			else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Banish_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BANISH[0], Banish_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		case 6: {
			if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_TRUESHOT[1]), SKILL_TRUESHOT[0]);
				PowersMenu(id, 0)
			}
			else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				TrueShot_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_PHOENIX
		case 7: {
			if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_PHOENIX[1]), SKILL_PHOENIX[0]);
				PowersMenu(id, 0)
			}
			else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Phoenix_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_DEVOTIONAURA
		case 8: {
			if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_DEVOTIONAURA[1]), SKILL_DEVOTIONAURA[0]);
				PowersMenu(id, 1)
			}
			else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				DevotionAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
				if(is_user_alive(id) && furien_get_user_team(id) != -1)
					fm_set_user_health(id, get_user_health(id) + Devotion[furien_get_user_team(id)]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALSTRIKE
		case 9: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALSTRIKE[1]), SKILL_CRITICALSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALGRENADE
		case 10: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALGRENADE[1]), SKILL_CRITICALGRENADE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalGrenade_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_BASH
		case 11: {
			if(PlayerLevel[id] < str_to_num(SKILL_BASH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BASH[1]), SKILL_BASH[0]);
				PowersMenu(id, 1)
			}
			else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				Bash_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BASH[0], Bash_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_HEALINGWAVE
		case 12: {
			if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_HEALINGWAVE[1]), SKILL_HEALINGWAVE[0]);
				PowersMenu(id, 1)
			}
			else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				HealingWave_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
				if(is_user_alive(id) && !task_exists(id + TASK_WAVE))
					Power_HealingWave(id);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SHADOWSTRIKE
		case 13: {
			if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SHADOWSTRIKE[1]), SKILL_SHADOWSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				ShadowStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SIPHONMANA
		case 14: {
			if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SIPHONMANA[1]), SKILL_SIPHONMANA[0]);
				PowersMenu(id, 1)
			}
			else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				SiphonMana_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				PowersMenu(id, 1)
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		default: return PLUGIN_HANDLED;
	}
	menu_destroy(menu);
	
	return PLUGIN_HANDLED;
}

#if defined POWER_BASH
public Bash_Reset(id) {
	if(id >= TASK_RESETBASH)
		id -= TASK_RESETBASH;
	
	Bash_Stunned[id] = false
	if(is_user_alive(id) && furien_get_user_team(id) != -1) {
		if(UnholyAura_Level[id])
			set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
		else
			set_pev(id, pev_maxspeed, LastSpeed[id]);
	}
}
#endif

#if defined POWER_HEALINGWAVE
public Power_HealingWave(id) {
	if(id >= TASK_WAVE)
		id -= TASK_WAVE;
	
	if(HealingWave_Level[id] && is_user_connected(id) && is_user_alive(id)) {	
		set_task(Heal[HealingWave_Level[id] - 1][furien_get_user_team(id)], "Power_HealingWave", TASK_WAVE + id);
		
		new Players[32], Num, Targetid, TargetOrigin[3], Origin[3];
		new Team = get_user_team(id);
		
		get_user_origin(id, Origin);
		get_players(Players, Num, "a");
		
		for(new i = 0; i < Num; i++) {
			Targetid = Players;
			
			if(is_user_connected(Targetid) && get_user_team(Targetid) == Team) {
				get_user_origin(Targetid, TargetOrigin);
				
				if(get_distance(Origin, TargetOrigin) < HEALING_WAVE_RANGE) {
					get_user_origin(Targetid, Origin)
					if(get_user_health(Targetid) + 1 <= MAX_HEALTH) {
						fm_set_user_health(Targetid, get_user_health(Targetid) + 1);
						
						if(get_user_team(id) == 2) {
							message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
							write_byte (TE_IMPLOSION)
							write_coord(Origin[0])		// position (X)
							write_coord(Origin[1])		// position (Y)
							write_coord(Origin[2])		// position (Z)
							write_byte (100)		// radius
							write_byte (8)			// count
							write_byte (1)			// life in 0.1's
							message_end()
						}
					}
				}
			}
		}
	}
}
#endif

#if defined POWER_BANISH
public BanishReturn(parm[]) {
	new id = parm[0];
	
	if(is_user_connected(id)) {
		if(parm[1] > 0) {
			parm[1]--;
			
			//Create_ScreenFade(id, 2,(1<<10),(1<<12), 0, 0, 0, 255);
			
			set_task(0.1, "BanishReturn", TASK_BANISH + id, parm, 5);
		}
		else {
			new Origin[3];
			Origin[0] = parm[2];
			Origin[1] = parm[3];
			Origin[2] = parm[4];
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			//Glow(id, 0, 0, 0, 100);
			
			//Create_ScreenFade(id, 0, 0, 0, 0, 0, 0, 0);
			
			PlayerBanished[id] = false;
		}
	}
}

public _BanishReturn(parm[]) {
	new id = parm[3];
	new Origin[3];
	
	get_user_origin(id, Origin);
	
	if(Origin[2] == parm[2]) {
		new SpawnEnt = FindFreeSpawn(id);
		
		if(SpawnEnt > 0) {
			new Float:SpawnOrigin[3], Origin[3];
			
			entity_get_vector(SpawnEnt, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			ColorChat(id, "You are stuck! Ahhh! Moving you back to your spawn!");
		}
		else {
			ColorChat(id, "Sorry, I know you're stuck, but I can't move you right now :/");
		}
	}
}

public CanSeePlayer(id, TargetID) {
	new Float:Origin[3];
	entity_get_vector( TargetID, EV_VEC_origin, Origin );
	
	return is_in_viewcone( id, Origin );
}
#endif

#if defined POWER_PHOENIX
public PhoenixCheck(id) {
	if(Phoenix_Level[id]) {
		if(random_float(0.0, 1.0) <= Phoenix[Phoenix_Level[id] - 1][furien_get_user_team(id)]) {
			IsPhoenix[id] = true;
		}
	}
	
	else {
		IsPhoenix[id] = false;
	}
}

public PhoenixSpawn(id) {
	if(pev_valid(id) && is_user_connected(id) && !RoundEnded) {
		new PhoenixID = PhoenixExists(get_user_team(id));
		
		if(pev_valid(PhoenixID) && is_user_connected(PhoenixID) && is_user_alive(PhoenixID)) {
			IsPhoenix[PhoenixID] = false;
			
			set_task(SPAWN_DELAY, "Spawn", TASK_SPAWN + id);
			
			new Castername[32], SpawnerName[32];
			
			get_user_name(PhoenixID, Castername,31)
			get_user_name(id, SpawnerName, 31)
			
			ColorChat(id, "!t%s!g has revived you", Castername);
			ColorChat(PhoenixID, "!gYou have revived!t %s!g, way to go !", SpawnerName);
		}
	}
}

public PhoenixExists(Team) {
	new Players[32], Num, id;
	get_players(Players, Num, "a");
	
	for(new i = 0; i < Num; i++) {
		id = Players;
		
		if(get_user_team(id) == Team) {
			if(IsPhoenix[id]) {
				return id;
			}
		}
	}
	
	return -1;
}
#endif

public FindFreeSpawn(id) {
	new PlayersInVicinity, SpawnID, EntList[1], Origin[3];
	new ent = -1;
	new Float:SpawnOrigin[3];
	new Float:Vicinity = 96.0;
	new bool:Found = false;	
	new Team = get_user_team(id);
	
	SpawnID = ((Team == 2) ? 0 : 1);
	
	do {	
		ent = find_ent_by_class(ent, SpawnEnt[SpawnID]);
		
		if(ent) {
			entity_get_vector(ent, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			PlayersInVicinity = find_sphere_class(0, "player", Vicinity, EntList, 1, SpawnOrigin);
			
			if(PlayersInVicinity == 0) {				
				SpawnReserved[SpawnInc++] = ent;
				
				Found = true;
			}
		}
	}
	while(ent && !Found)
		
	if(!task_exists(TASK_RESETSPAWNS))
		set_task(0.3, "SpawnReset", TASK_RESETSPAWNS);
	
	if(!Found) {
		return -1;
	}
	
	return ent;
}

public SpawnReset() {
	new i;
	
	SpawnInc = 0;
	for(i = 0; i < 64; i++) {
		SpawnReserved = 0;
	}
}

public Spawn(id) {
	if(!RoundEnded) {
		if(id >= TASK_SPAWN)
			id -= TASK_SPAWN;
		
		if(!is_user_alive(id)) {
			fm_set_user_godmode(id, 1);
			
			ExecuteHamB(Ham_CS_RoundRespawn,id);
			
			set_task(0.2, "Spawn_Final", TASK_SPAWNPLAYER + id);
			set_task(1.0, "SpawnRemoveGod", TASK_SPAWNREMOVEGOD + id);
		}
	}
}

public Spawn_Final(id) {
	if(id >= TASK_SPAWNPLAYER)
		id -= TASK_SPAWNPLAYER;
	
	give_item(id, "item_suit");
	fm_set_user_health(id, 100);	
}

public SpawnRemoveGod(id) {
	if(id >= TASK_SPAWNREMOVEGOD)
		id -= TASK_SPAWNREMOVEGOD;
	
	fm_set_user_godmode(id, 0);
}

public Glow(id, Red, Green, Blue, All) {	
	if(!task_exists(TASK_GLOW + id)) {
		if(All) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	+= All;
		}
		else if(Red) {
			GlowLevel[id][0]	+= Red;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Green) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	+= Green;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Blue) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	+= Blue;
			GlowLevel[id][3]	= 0;
		}
		
		GlowLevel[id][0] = ((GlowLevel[id][0] > MAXGLOW) ? MAXGLOW : GlowLevel[id][0]);
		GlowLevel[id][1] = ((GlowLevel[id][1] > MAXGLOW) ? MAXGLOW : GlowLevel[id][1]);
		GlowLevel[id][2] = ((GlowLevel[id][2] > MAXGLOW) ? MAXGLOW : GlowLevel[id][2]);
		GlowLevel[id][3] = ((GlowLevel[id][3] > MAXGLOW) ? MAXGLOW : GlowLevel[id][3]);
		
		_Glow(id);
	}
}

public _Glow(id) {
	if(id >= TASK_GLOW)
		id -= TASK_GLOW;
	
	if(is_user_connected(id)) {
		new Red	= GlowLevel[id][0];
		new Green = GlowLevel[id][1];
		new Blue = GlowLevel[id][2];
		new All	= GlowLevel[id][3];
		
		if(Red || Green || Blue) {
			
			GlowLevel[id][0] = ((Red > 5) ? Red - 5 : 0);
			GlowLevel[id][1] = ((Green > 5) ? Green - 5 : 0);
			GlowLevel[id][2] = ((Blue > 5) ? Blue - 5	: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else if(All) {
			GlowLevel[id][3] = ((All > 5)		? All - 5		: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, All, All, All, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else {
			set_user_rendering(id);
		}
		
	}
}

stock Create_ScreenFade(id, duration, holdtime, fadetype, red, green, blue, alpha){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)			
		write_short(duration)			// fade lasts this long duration
		write_short(holdtime)			// fade lasts this long hold time
		write_short(fadetype)			// fade type(in / out)
		write_byte(red)				// fade red
		write_byte(green)				// fade green
		write_byte(blue)				// fade blue
		write_byte(alpha)				// fade alpha
		message_end()
	}
}

stock Create_ScreenShake(id, amount, duration, frequency){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id) 
		write_short(amount)				// ammount 
		write_short(duration)				// lasts this long 
		write_short(frequency)			// frequency
		message_end()
	}
}

stock death_message(Killer, Victim, const Weapon[]) {
	if(is_user_connected(Killer) && is_user_connected(Victim)) {
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET);
		ExecuteHamB(Ham_Killed, Victim, Killer, 2);
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT);
		
		make_deathmsg(Killer, Victim, 0, Weapon);
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Killer); // id
		write_short(pev(Killer, pev_frags)); // frags
		write_short(cs_get_user_deaths(Killer)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Killer)); // team
		message_end();
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Victim); // id
		write_short(pev(Victim, pev_frags)); // frags
		write_short(cs_get_user_deaths(Victim)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Victim)); // team
		message_end();
	}
}

public make_knockback(Victim, Float:origin[3], Float:maxspeed) {
	new Float:fVelocity[3];
	kickback(Victim, origin, maxspeed, fVelocity);
	entity_set_vector(Victim, EV_VEC_velocity, fVelocity);
	
	return(1);
}

stock kickback(ent, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3]) {
	new Float:fEntOrigin[3];
	entity_get_vector(ent, EV_VEC_origin, fEntOrigin);
	
	new Float:fDistance[3];
	fDistance[0] = fEntOrigin[0] - fOrigin[0];
	fDistance[1] = fEntOrigin[1] - fOrigin[1];
	fDistance[2] = fEntOrigin[2] - fOrigin[2];
	new Float:fTime = (vector_distance(fEntOrigin,fOrigin) / fSpeed);
	fVelocity[0] = fDistance[0] / fTime;
	fVelocity[1] = fDistance[1] / fTime;
	fVelocity[2] = fDistance[2] / fTime;
	
	return(fVelocity[0] && fVelocity[1] && fVelocity[2]);
}

public XP_WinRound(Winner) {
	new Players[32], Num, i, id;
	get_players(Players, Num);
	
	for(i = 0; i < Num; i++) {
		id = Players;
		if(get_user_team(id) == Winner) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (WIN_ROUND * VIP_XP_MULTIPLIER)) : (BonusXP = WIN_ROUND)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou recieved!t %d XP!g for winning the round", XP);
			}
		}
	}
}

public GiveExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		new give_xp[10];
		read_argv(2, give_xp, charsmax(give_xp));
		new Experience = str_to_num(give_xp);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers;
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, get_user_xp(players) + Experience);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g give!t %d XP!g to all!t Players.", Experience);
					case 2: ColorChat(0, "!t%s!g give!t %d XP!g to all!t Players.", name, Experience);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, get_user_xp(player) + Experience);
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g give you!t %d XP.", Experience);
					case 2: ColorChat(player, "!t%s!g give you!t %d XP.", name, Experience);
				}
		}
	}
}

public ResetExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers;
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, 0);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g reset!t XP!g to all!t Players.");
					case 2: ColorChat(0, "!t%s!g reset!t XP!g to all!t Players.", name);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, 0);	
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g reset your!t Experience.");
					case 2: ColorChat(player, "!t%s!g reset your!t Experience.", name);
				}
		}
	}
}

public furien_get_user_team(id) {
	switch(get_user_team(id)) {
		case 1: 
			return 0
		case 2: 
			return 1
		default: 
			return -1
	}
	return -1
}

public SavePowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new UnholyAura
	#if defined POWER_UNHOLYAURA
	UnholyAura = UnholyAura_Level[id]
	#else
	UnholyAura = TempUnholyAura_Level[id]
	#endif
	new Levitation
	#if defined POWER_LEVITATION
	Levitation = Levitation_Level[id]
	#else
	Levitation = TempLevitation_Level[id]
	#endif
	new VampiricAura
	#if defined POWER_VAMPIRICAURA
	VampiricAura = VampiricAura_Level[id]
	#else
	VampiricAura = TempVampiricAura_Level[id]
	#endif
	new Evasion
	#if defined POWER_EVASION
	Evasion = Evasion_Level[id]
	#else
	Evasion = TempEvasion_Level[id]
	#endif
	new TrueShot
	#if defined POWER_TRUESHOT
	TrueShot = TrueShot_Level[id]
	#else
	TrueShot = TempTrueShot_Level[id]
	#endif
	new Banish
	#if defined POWER_BANISH
	Banish = Banish_Level[id]
	#else
	Banish = TempBanish_Level[id]
	#endif
	new Phoenix
	#if defined POWER_PHOENIX
	Phoenix = Phoenix_Level[id]
	#else
	Phoenix = TempPhoenix_Level[id]
	#endif
	new DevotionAura
	#if defined POWER_DEVOTIONAURA
	DevotionAura = DevotionAura_Level[id]
	#else
	DevotionAura = TempDevotionAura_Level[id]
	#endif
	new Bash
	#if defined POWER_BASH
	Bash = Bash_Level[id]
	#else
	Bash = TempBash_Level[id]
	#endif
	new CriticalStrike
	#if defined POWER_CRITICALSTRIKE
	CriticalStrike = CriticalStrike_Level[id]
	#else
	CriticalStrike = TempCriticalStrike_Level[id]
	#endif
	new CriticalGrenade
	#if defined POWER_CRITICALGRENADE
	CriticalGrenade = CriticalGrenade_Level[id]
	#else
	CriticalGrenade = TempCriticalGrenade_Level[id]
	#endif
	new SiphonMana
	#if defined POWER_SIPHONMANA
	SiphonMana = SiphonMana_Level[id]
	#else
	SiphonMana =  TempSiphonMana_Level[id]
	#endif
	new HealingWave
	#if defined POWER_HEALINGWAVE
	HealingWave = HealingWave_Level[id]
	#else
	HealingWave = TempHealingWave_Level[id]
	#endif
	new ShadowStrike
	#if defined POWER_SHADOWSTRIKE
	ShadowStrike = ShadowStrike_Level[id]
	#else
	ShadowStrike = TempShadowStrike_Level[id]
	#endif

	new PowersData[1024]
	formatex(PowersData, sizeof(PowersData) - 1, "^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"", PlayerExperience[id], UnholyAura, Levitation, VampiricAura, Evasion, TrueShot, Banish, Phoenix, DevotionAura, Bash, CriticalStrike, CriticalGrenade, SiphonMana, HealingWave, ShadowStrike)
	
	new Save[1024]
	format(Save, sizeof(Save) - 1, "^"%s^" %s", Name, PowersData)
	
	new Line[128], Linie, IsPlayer = false, Arg1[32]
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31)
		
		if (equali(Arg1, Name)) {
			write_file(PowersFile, Save, Linie)
			IsPlayer = true
			break
		}
		
		Linie++
	}
	fclose(FileOpen)
	if (!IsPlayer)
		write_file(PowersFile, Save, -1)
}

public LoadPowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new Line[128], IsPlayer = false, Arg1[32], Arg2[32], Arg3[32], Arg4[32], Arg5[32], Arg6[32], Arg7[32], Arg8[32], 
	Arg9[32], Arg10[32], Arg11[32], Arg12[32], Arg13[32], Arg14[32], Arg15[32], Arg16[32];
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31, Arg2, 31, Arg3, 31, Arg4, 31, Arg5, 31, Arg6, 31, Arg7, 31, Arg8, 31, Arg9, 31, Arg10, 31, Arg11, 31, Arg12, 31, Arg13, 31, Arg14, 31, Arg15, 31, Arg16, 31)
		
		if (equali(Arg1, Name)) {
			#if defined POWER_UNHOLYAURA
			UnholyAura_Level[id] = str_to_num(Arg3)
			#else
			TempUnholyAura_Level[id] = str_to_num(Arg3)
			#endif
			#if defined POWER_LEVITATION
			Levitation_Level[id] = str_to_num(Arg4)
			#else
			TempLevitation_Level[id] = str_to_num(Arg4)
			#endif
			#if defined POWER_VAMPIRICAURA
			VampiricAura_Level[id] = str_to_num(Arg5)
			#else
			TempVampiricAura_Level[id] = str_to_num(Arg5)
			#endif
			#if defined POWER_EVASION
			Evasion_Level[id] = str_to_num(Arg6)
			#else
			TempEvasion_Level[id] = str_to_num(Arg6)
			#endif
			#if defined POWER_TRUESHOT
			TrueShot_Level[id] = str_to_num(Arg7)
			#else
			TempTrueShot_Level[id] = str_to_num(Arg7)
			#endif
			#if defined POWER_BANISH
			Banish_Level[id] = str_to_num(Arg8)
			#else
			TempBanish_Level[id] = str_to_num(Arg8)
			#endif
			#if defined POWER_PHOENIX
			Phoenix_Level[id] = str_to_num(Arg9)
			#else
			TempPhoenix_Level[id] = str_to_num(Arg9)
			#endif
			#if defined POWER_DEVOTIONAURA
			DevotionAura_Level[id] = str_to_num(Arg10)
			#else
			TempDevotionAura_Level[id] = str_to_num(Arg10)
			#endif
			#if defined POWER_BASH
			Bash_Level[id] = str_to_num(Arg11)
			#else
			TempBash_Level[id] = str_to_num(Arg11)
			#endif
			#if defined POWER_CRITICALSTRIKE
			CriticalStrike_Level[id] = str_to_num(Arg12)
			#else
			TempCriticalStrike_Level[id] = str_to_num(Arg12)
			#endif
			#if defined POWER_CRITICALGRENADE
			CriticalGrenade_Level[id] = str_to_num(Arg13)
			#else
			TempCriticalGrenade_Level[id] = str_to_num(Arg13)
			#endif
			#if defined POWER_SIPHONMANA
			SiphonMana_Level[id] = str_to_num(Arg14)
			#else
			TempSiphonMana_Level[id] = str_to_num(Arg14)
			#endif
			#if defined POWER_HEALINGWAVE
			HealingWave_Level[id] = str_to_num(Arg15)
			#else
			TempHealingWave_Level[id] = str_to_num(Arg15)
			#endif
			#if defined POWER_SHADOWSTRIKE
			ShadowStrike_Level[id] = str_to_num(Arg16)
			#else
			TempShadowStrike_Level[id] = str_to_num(Arg16)
			#endif

			CreditsUsed[id] = (str_to_num(Arg3) + str_to_num(Arg4) + str_to_num(Arg5) + str_to_num(Arg6) + str_to_num(Arg7) + str_to_num(Arg8) + str_to_num(Arg9) + str_to_num(Arg10) + str_to_num(Arg11) + str_to_num(Arg12) + str_to_num(Arg13) + str_to_num(Arg14) + str_to_num(Arg15) + str_to_num(Arg16))
			
			new XP = str_to_num(Arg2)
			set_user_xp(id, XP) 			

			IsPlayer = true
			break
		}
	}
	fclose(FileOpen)
	
	if (!IsPlayer) {		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#else
		TempUnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#else
		TempLevitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#else
		TempVampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#else
		TempEvasion_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#else
		TempTrueShot_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#else
		TempBanish_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#else
		TempPhoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#else
		TempDevotionAura_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#else
		TempBash_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#else
		TempCriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#else
		TempCriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#else
		TempSiphonMana_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#else
		TempHealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#else
		TempShadowStrike_Level[id] = 0
		#endif
		
		PlayerExperience[id] = 0
		PlayerLevel[id] = 0
		CreditsUsed[id] = 0
		Credits[id] = 0
	}
}




#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

stock HudMessage(const id, const message[], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01) {
	new count = 1, players[32];
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {	
				new color = pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
				
				message_begin(MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, players);
				write_byte(strlen(message) + 31);
				write_byte(DRC_CMD_MESSAGE);
				write_byte(effects);
				write_long(color);
				write_long(_:x);
				write_long(_:y);
				write_long(_:fadeintime);
				write_long(_:fadeouttime);
				write_long(_:holdtime);
				write_long(_:fxtime);
				write_string(message);
				message_end();
			}
		}
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!y", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	} 
}
Image
Pegasus6ix
Membru, skill 0
Membru, skill 0
Posts: 24
Joined: 11 Nov 2018, 23:25
Detinator Steam: Nu
Fond eXtream: 0
Has thanked: 10 times

23 Aug 2019, 00:05

JaiLBreaK wrote:
22 Aug 2019, 10:55
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Powers"
#define VERSION "3.0"
#define AUTHOR "sDs|Aragon*"

//#define GOLD_SISTEM

//#if defined GOLD_SISTEM
//#include <furien30_shop>
//#endif

// VIP
#define VIP_LEVEL		ADMIN_LEVEL_H
#define VIP_XP_MULTIPLIER	2.0

// Objective Modifiers
#define DEFUSING_BOMB		20.0			// XP awarded when the user starts to defuse the bomb
#define DEFUSED_BOMB		40.0			// XP awarded when the user defuses the bomb
#define PLANTING_BOMB		20.0			// XP awarded when the user starts planting the bomb
#define PLANT_BOMB		40.0			// XP awarded when the user plants the bomb
#define BOMB_PICKUP		20.0			// XP awarded when the user picks up the bomb
#define TOUCH_HOSTAGE		20.0			// XP awarded when the user touches a hostage
#define RESCUE_HOSTAGE		40.0			// XP awarded when the user rescues the hostage
#define KILL_HOSTAGE		20.0			// XP lost when killing a hostage
#define SPAWN_VIP			20.0		// XP awarded for spawning as the VIP
#define ESCAPE_VIP		40.0			// XP awarded for escaping as the VIP

// Kill modifiers
#define KILL			35.0			// XP awarded for getting a headshot
#define KILL_HEADSHOT		20.0			// XP awarded for getting a headshot
#define KILL_HOSTAGE_SAVER	20.0			// XP awarded for killing the hostage saver
#define	KILL_DEFUSER		20.0			// XP awarded for killing the defuser
#define KILL_PLANTER		20.0			// XP awarded for killing the planter
#define KILL_BOMB_CARRIER	20.0			// XP awarded for killing the bomb carrier
#define KILL_VIP		40.0			// XP awarded for killing the VIP

#define WIN_ROUND		40.0			// XP awarded for winning the round

enum {
	PLR_BOMB_DEFUSER = 1,
	PLR_BOMB_PLANTER,
	PLR_HOSTAGE_RESCUER,
	PLR_VIP,
	PLR_BOMB_CARRIER,
};

new bool:RoundEnded, bool:HasBegunPlantingOrDefusing[33], PlayerRole[33];
#define SPAWN_DELAY		0.2

#define TASK_RESETSPAWNS	3001
#define TASK_SPAWNREMOVEGOD	128
#define TASK_SPAWN		32
#define TASK_SPAWNPLAYER	1056

//------| Powers |------//
#define POWER_UNHOLYAURA
#define POWER_LEVITATION
#define POWER_VAMPIRICAURA
#define POWER_EVASION
#define POWER_TRUESHOT
#define POWER_PHOENIX
#define POWER_BANISH
#define POWER_DEVOTIONAURA
#define POWER_BASH
#define POWER_CRITICALSTRIKE
#define POWER_CRITICALGRENADE
#define POWER_SIPHONMANA
#define POWER_HEALINGWAVE
#define POWER_SHADOWSTRIKE
#define POWER_UNSTABLECONCOCTION
#define POWER_ORB

new MAX_LEVEL
#define EXPERIENCE_LEVEL	200

#define DESIGN1_STYLE 	"<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:10px 2px;text-align:left}td{padding:4px 3px}table{background:#EEEECC;font-size:12px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}#c{background:#E2E2BC}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN2_STYLE 	"<meta charset=UTF-8><style>body{font-family:Arial}th{background:#575757;color:#FFF;padding:5px;border-bottom:2px #BCE27F solid;text-align:left}td{padding:3px;border-bottom:1px #E7F0D0 solid}table{color:#3C9B4A;background:#FFF;font-size:12px}h2,h3{color:#333;font-family:Verdana}#c{background:#F0F7E2}img{height:10px;background:#62B054;margin:0 3px}#r{height:10px;background:#717171}#clr{background:none;color:#575757;font-size:20px}</style>"
#define DESIGN3_STYLE 	"<meta charset=UTF-8><style>body{background:#E6E6E6;font-family:Verdana}th{background:#F5F5F5;color:#A70000;padding:6px;text-align:left}td{padding:2px 6px}table{color:#333;background:#E6E6E6;font-size:10px;font-family:Georgia;border:2px solid #D9D9D9}h2,h3{color:#333;}#c{background:#FFF}img{height:10px;background:#14CC00;margin:0 3px}#r{height:10px;background:#CC8A00}#clr{background:none;color:#A70000;font-size:20px;border:0}</style>"
#define DESIGN4_STYLE 	"<meta charset=UTF-8><style>body{background:#E8EEF7;margin:2px;font-family:Tahoma}th{color:#0000CC;padding:3px}tr{text-align:left;background:#E8EEF7}td{padding:3px}table{background:#CCC;font-size:11px}h2,h3{font-family:Verdana}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#000;font-size:20px}</style>"
#define DESIGN5_STYLE 	"<meta charset=UTF-8><style>body{background:#555;font-family:Arial}th{border-left:1px solid #ADADAD;border-top:1px solid #ADADAD}table{background:#3C3C3C;font-size:11px;color:#FFF;border-right:1px solid #ADADAD;border-bottom:1px solid #ADADAD;padding:3px}h2,h3{color:#FFF}#c{background:#FF9B00;color:#000}img{height:10px;background:#00E930;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px;border:0}</style>"
#define DESIGN6_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>"
#define DESIGN7_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Verdana}th{background:#2E2E2E;color:#FFF;text-align:left}table{padding:6px 2px;background:#FFF;font-size:11px;color:#333;border:1px solid #CCC}h2,h3{color:#333}#c{background:#F0F0F0}img{height:7px;background:#444;margin:0 3px}#r{height:7px;background:#999}#clr{background:none;color:#2E2E2E;font-size:20px;border:0}</style>"
#define DESIGN8_STYLE 	"<meta charset=UTF-8><style>body{background:#242424;margin:20px;font-family:Tahoma}th{background:#2F3034;color:#BDB670;text-align:left} table{padding:4px;background:#4A4945;font-size:10px;color:#FFF}h2,h3{color:#D2D1CF}#c{background:#3B3C37}img{height:12px;background:#99CC00;margin:0 3px}#r{height:12px;background:#999900}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN9_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{padding:2px 6px}table{color:#006699;background:#FFF;font-size:12px;border:2px solid #006699}h2,h3{color:#F69F1C;}#c{background:#EFEFEF}img{height:5px;background:#1578D3;margin:0 3px}#r{height:5px;background:#F49F1E}#clr{background:none;color:#056B9E;font-size:20px;border:0}</style>"
#define DESIGN10_STYLE 	"<meta charset=UTF-8><style>body{background:#4C5844;font-family:Tahoma}th{background:#1E1E1E;color:#C0C0C0;padding:2px;text-align:left;}td{padding:2px 10px}table{color:#AAC0AA;background:#424242;font-size:13px}h2,h3{color:#C2C2C2;font-family:Tahoma}#c{background:#323232}img{height:3px;background:#B4DA45;margin:0 3px}#r{height:3px;background:#6F9FC8}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN11_STYLE 	"<meta charset=UTF-8><style>body{background:#F2F2F2;font-family:Arial}th{background:#175D8B;color:#FFF;padding:7px;text-align:left}td{padding:3px;border-bottom:1px #BFBDBD solid}table{color:#153B7C;background:#F4F4F4;font-size:11px;border:1px solid #BFBDBD}h2,h3{color:#153B7C}#c{background:#ECECEC}img{height:8px;background:#54D143;margin:0 3px}#r{height:8px;background:#C80B0F}#clr{background:none;color:#175D8B;font-size:20px;border:0}</style>"
#define DESIGN12_STYLE 	"<meta charset=UTF-8><style>body{background:#283136;font-family:Arial}th{background:#323B40;color:#6ED5FF;padding:10px 2px;text-align:left}td{padding:4px 3px;border-bottom:1px solid #DCDCDC}table{background:#EDF1F2;font-size:10px;border:2px solid #505A62}h2,h3{color:#FFF}img{height:10px;background:#A7CC00;margin:0 3px}#r{height:10px;background:#CC3D00}#clr{background:none;color:#6ED5FF;font-size:20px;border:0}</style>"
#define DESIGN13_STYLE 	"<meta charset=UTF-8><style>body{background:#220000;font-family:Tahoma}th{background:#3E0909;color:#FFF;padding:5px 2px;text-align:left;border-bottom:1px solid #DEDEDE}td{padding:2px 2px;}table{background:#FFF;font-size:11px;border:1px solid #791616}h2,h3{color:#FFF}#c{background:#F4F4F4;color:#7B0000}img{height:7px;background:#a00000;margin:0 3px}#r{height:7px;background:#181818}#clr{background:none;color:#CFCFCF;font-size:20px;border:0}</style>"
#define DEFAULT_STYLE 	"<meta charset=UTF-8><style>body{background:#000}tr{text-align:left}table{font-size:13px;color:#FFB000;padding:2px}h2,h3{color:#FFF;font-family:Verdana}img{height:5px;background:#0000FF;margin:0 3px}#r{height:5px;background:#FF0000}</style>"

new Menu, PlayerLevel[33], PlayerExperience[33], CreditsUsed[33], Credits[33];
new PowersFile[128];
new cvar_motd_style;

new GlowLevel[33][4]
#define MAX_HEALTH	250
#define	TASK_GLOW	416
#define MAXGLOW		150

//------| Powers |------//
new SpawnReserved[64], SpawnEnt[2][32], SpawnInc = 0

#define SKILL_MAX_LEVEL	5
#define DMG_HEGRENADE 	(1<<24)

#define HITGROUP_GENERIC		0 // none
#define HITGROUP_HEAD			1 // 1 << 1 = 2
#define HITGROUP_CHEST			2 // 1 << 2 = 4
#define HITGROUP_STOMACH		3 // 8
#define HITGROUP_LEFTARM		4 // 16
#define HITGROUP_RIGHTARM		5 // 32
#define HITGROUP_LEFTLEG		6 // 64
#define HITGROUP_RIGHTLEG		7 // 128

//------| Unholy Aura |------//
#if defined POWER_UNHOLYAURA
new SKILL_UNHOLYAURA[][] = { "Unholy Aura", "0" };
new Float:Unholy[SKILL_MAX_LEVEL][2] = {
	{630.0, 250.0},	// Level 1
	{660.0, 270.0},	// Level 2
	{690.0, 290.0},	// Level 3
	{710.0, 310.0},	// Level 4
	{740.0, 330.0}	// Level 5
}

new UnholyAura_Level[33]
#else
new TempUnholyAura_Level[33]
#endif

//------| Levitation |------//
#if defined POWER_LEVITATION
new SKILL_LEVITATION[][] = { "Levitation", "0" };
new Float:Levitation[SKILL_MAX_LEVEL][2] = {
	{0.460, 0.78},	// Level 1
	{0.445, 0.76},	// Level 2
	{0.430, 0.74},	// Level 3
	{0.415, 0.72},	// Level 4
	{0.400, 0.70}	// Level 5
}

new Levitation_Level[33]
#else
new TempLevitation_Level[33]
#endif

//------| Vampiric Aura |------//
#if defined POWER_VAMPIRICAURA
new SKILL_VAMPIRICAURA[][] = { "Vampiric Aura", "0" };
new const Float:Vampiric[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new VampiricAura_Level[33]
#else
new TempVampiricAura_Level[33]
#endif

//------| Evasion |------//
#if defined POWER_EVASION
new SKILL_EVASION[][] = { "Evasion", "0" };
new const Float:Evasion[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}
new Evasion_Level[33]
#else
new TempEvasion_Level[33]
#endif

//------| Banish |------//
#if defined POWER_BANISH
new SKILL_BANISH[][] = { "Banish", "0" };
new const Float:Banish[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define BANISH_DAMAGE			1
#define BANISH_HOLDTIME			0.7
#define TASK_BANISH			96
#define TASK_BANISHRETURN		345

#define	SOUND_BANISH	"furien30_powers/banishcaster.wav"

new Banish_Level[33], bool:PlayerBanished[33], SPR_BANISH;
#else
new TempBanish_Level[33]
#endif

//------| True Shot |------//
#if defined POWER_TRUESHOT
new SKILL_TRUESHOT[][] = { "True Shot", "0" };
new const Float:TrueShot[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

new TrueShot_Level[33]
#else
new TempTrueShot_Level[33]
#endif

//------| Phoenix |------//
#if defined POWER_PHOENIX
new SKILL_PHOENIX[][] = { "Phoenix", "0" };
new const Float:Phoenix[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new Phoenix_Level[33], bool:IsPhoenix[33]
#else
new TempPhoenix_Level[33]
#endif

//------| Devotation Aura |------//
#if defined POWER_DEVOTIONAURA
new SKILL_DEVOTIONAURA[][] = { "Devotion Aura", "0" };
new const Devotion[2] = {30, 30} // HP/LEVEL

new DevotionAura_Level[33]
#else
new TempDevotionAura_Level[33]
#endif

//------| Critical Strike |------//
#if defined POWER_CRITICALSTRIKE
new SKILL_CRITICALSTRIKE[][] = { "Critical Strike", "0" };
new const Float:Critical[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define CRITICAL_STRIKE_CHANCE			0.15

new CriticalStrike_Level[33]
#else
new TempCriticalStrike_Level[33]
#endif

//------| Critical Grenade |------//
#if defined POWER_CRITICALGRENADE
new SKILL_CRITICALGRENADE[][] = { "Critical Grenade", "0" };
new const Float:Grenade[SKILL_MAX_LEVEL][2] = {
	{1.2, 1.2},	// Level 1
	{1.4, 1.4},	// Level 2
	{1.6, 1.6},	// Level 3
	{1.8, 1.8},	// Level 4
	{2.0, 2.0}	// Level 5
}

new CriticalGrenade_Level[33]
#else
new TempCriticalGrenade_Level[33]
#endif

//------| Bash |------//
#if defined POWER_BASH
new SKILL_BASH[][] = { "Bash", "0" };
new const Float:Bash[SKILL_MAX_LEVEL][2] = {
	{0.025, 0.025},	// Level 1
	{0.050, 0.050},	// Level 2
	{0.075, 0.075},	// Level 3
	{0.1, 0.1},	// Level 4
	{1.25, 1.25}	// Level 5
}

#define BASH_GLOW_INTENSITY	20
#define BASH_HOLD_TIME		0.7
#define	TASK_RESETBASH		512

new Bash_Level[33], Bash_Stunned[33], Float:LastSpeed[33];
#else
new TempBash_Level[33]
#endif

//------| Healing Wave |------//
#if defined POWER_HEALINGWAVE
new SKILL_HEALINGWAVE[][] = { "Healing Wave", "0" };
new const Float:Heal[SKILL_MAX_LEVEL][2] = {
	{1.25, 1.25},	// Level 1
	{1.0, 1.0},	// Level 2
	{0.75, 0.75},	// Level 3
	{0.50, 0.50},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define HEALING_WAVE_RANGE	750

#define	TASK_WAVE		352

new HealingWave_Level[33]
#else
new TempHealingWave_Level[33]
#endif

//------| Shadow Strike |------//
#if defined POWER_SHADOWSTRIKE
new SKILL_SHADOWSTRIKE[][] = { "Shadow Strike", "0" };
new const Float:Shadow[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define SHADOWSTRIKE_DAMAGE	10
#define	SOUND_SHADOWSTRIKE	"furien30_powers/shadowstrikebirth.wav"

new ShadowStrike_Level[33], SPR_SHADOWSTRIKE
#else
new TempShadowStrike_Level[33]
#endif

//------| Siphon Mana |------//
#if defined POWER_SIPHONMANA
new SKILL_SIPHONMANA[][] = { "Siphon Mana", "0" };
new const Float:Mana[SKILL_MAX_LEVEL][2] = {
	{1.0, 1.0},	// Level 1
	{1.5, 1.5},	// Level 2
	{2.0, 2.0},	// Level 3
	{2.5, 2.5},	// Level 4
	{3.0, 3.0}	// Level 5
}

new SiphonMana_Level[33]
#else
new TempSiphonMana_Level[33]
#endif

//------| Unstable Concoction |------//
#if defined POWER_UNSTABLECONCOCTION
//new PASS_UNSTABLECONCOCTION[] = "Unstable Concoction"
new const Float:Concoction[2] = {0.01, 0.01}	// Sansa * Leve
new SPR_SHOCKWAVE

#define CONCOCTION_DAMAGE	  15
#define CONCOCTION_RADIUS	  300

#define SOUND_CONCOCTION_CAST	"furien30_powers/PossessionMissileLaunch1.wav"
#define SOUND_CONCOCTION_HIT	"furien30_powers/PossessionMissileHit1.wav"
#endif

//------| Orb of Annihilation |------//
#if defined POWER_ORB
//new PASS_ORB[] = "Orb of Annihilation"
new const Float:Orb[2] = {0.01, 0.01}	// Sansa * Level
new SPR_WAVE

#define ORB_DAMAGE	20
#define	SOUND_ANNIHILATION	"furien30_powers/PurgeTarget1.wav"
#endif

public plugin_init() {
	register_clcmd("resetskills", "CMD_ResetSkills");
	register_clcmd("say /resetskills", "CMD_ResetSkills");
	register_clcmd("say_team /resetskills", "CMD_ResetSkills");
	register_clcmd("powers", "CMD_PowersMenu");
	register_clcmd("say /powers", "CMD_PowersMenu");
	register_clcmd("say_team /powers", "CMD_PowersMenu");
	register_clcmd("playersinfo", "CMD_PlayersInfo");
	register_clcmd("say /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team playersinfo", "CMD_PlayersInfo");
	
	register_concmd("amx_give_xp", "GiveExperience", ADMIN_CVAR, "Name/@All -> Amount");
	register_concmd("amx_reset_xp", "ResetExperience", ADMIN_CVAR, "Name/@All -> Amount");
	
	register_logevent("LOGEVENT_RoundStart", 2, "1=Round_Start");
	register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End");
	register_logevent("LOGEVENT_RoundEnd", 2, "1&Restart_Round_")
	
	register_logevent("LOGEVENT_PlayerAction", 3, "1=triggered");
	
	register_event("SendAudio","EVENT_FurienWin","a","2=%!MRAD_terwin");
	register_event("SendAudio","EVENT_AntiFurienWin","a","2=%!MRAD_ctwin");
	register_event("DeathMsg", "EVENT_Death", "a");
	
	register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName");
	register_forward(FM_PlayerPreThink, "FWD_PlayerPreThink");
	
	RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1);
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage");
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage_Post", 1);
	
	cvar_motd_style = register_cvar("furien30_playersinfo_motdstyle", "10");	
	
	new DataDir[64]
	get_datadir(DataDir, 63)
	format(PowersFile, 127, "%s/Powers.dat", DataDir)
	
	new Power = 0
	#if defined POWER_UNHOLYAURA
	Power++
	#endif
	#if defined POWER_LEVITATION
	Power++
	#endif
	#if defined POWER_VAMPIRICAURA
	Power++
	#endif
	#if defined POWER_EVASION
	Power++
	#endif
	#if defined POWER_BANISH
	Power++
	#endif
	#if defined POWER_TRUESHOT
	Power++
	#endif
	#if defined POWER_PHOENIX
	Power++
	#endif
	#if defined POWER_DEVOTIONAURA
	Power++
	#endif
	#if defined POWER_CRITICALSTRIKE
	Power++
	#endif
	#if defined POWER_CRITICALGRENADE
	Power++
	#endif
	#if defined POWER_BASH
	Power++
	#endif
	#if defined POWER_HEALINGWAVE
	Power++
	#endif
	#if defined POWER_SHADOWSTRIKE
	Power++
	#endif
	#if defined POWER_SIPHONMANA
	Power++
	#endif
	
	MAX_LEVEL = (Power * SKILL_MAX_LEVEL)
	
	set_task(30.0,"TASK_Messages", 0,_,_,"b");
}

public plugin_precache() {	
	#if defined POWER_BANISH
	precache_sound(SOUND_BANISH)
	SPR_BANISH = precache_model("sprites/nhth1.spr")
	#endif
	
	#if defined POWER_UNSTABLECONCOCTION
	precache_sound(SOUND_CONCOCTION_CAST)
	precache_sound(SOUND_CONCOCTION_HIT)
	SPR_SHOCKWAVE = precache_model("sprites/ef_shockwave.spr")
	#endif
	
	#if defined POWER_SHADOWSTRIKE
	precache_sound(SOUND_SHADOWSTRIKE)
	SPR_SHADOWSTRIKE = precache_model("sprites/animglow01.spr");
	#endif
	
	#if defined POWER_ORB
	SPR_WAVE = precache_model("sprites/gwave1.spr");
	precache_sound(SOUND_ANNIHILATION)
	#endif
}

public plugin_natives() {
	register_native("set_user_xp", "set_user_xp", 1);
	register_native("get_user_xp", "get_user_xp", 1);
	register_native("get_user_next_level_xp", "get_user_next_level_xp", 1);
	register_native("get_user_level", "get_user_level", 1);
	register_native("get_max_level", "get_max_level", 1);
}

public set_user_xp(id, xp) {
	if(is_user_connected(id)) {
		PlayerExperience[id] = xp;
		
		new Level
		for(new i = 1; i <= MAX_LEVEL; i++) {
			if(PlayerLevel[id] < i && PlayerExperience[id] >= EXPERIENCE_LEVEL * i)
				Level = i
		}
		PlayerLevel[id] = Level;
		Credits[id] = PlayerLevel[id] - CreditsUsed[id]
		if(Credits[id] >= 1)
			PowersMenu(id, 0)
		
		SavePowers(id);
	}
}

public get_user_xp(id) {
	return is_user_connected(id) ? PlayerExperience[id] : 0
}

public get_user_next_level_xp(id) {
	if(is_user_connected(id) && (PlayerLevel[id] + 1) <= MAX_LEVEL)
		return EXPERIENCE_LEVEL * (PlayerLevel[id] + 1);
	return 0
}

public get_user_level(id) {
	return is_user_connected(id) ? PlayerLevel[id] : 0
}

public get_max_level() {
	return MAX_LEVEL
}

public TASK_Messages(id)  {
	switch(random_num(0,2)) {
		case 0: 
		ColorChat(id, "!t[Furien]!g Scrie!t /powers!g in chat pentru a accesa puterile.");	
		case 1: 
		ColorChat(id, "!t[Furien]!g Scrie!t /playersinfo!g in chat pentru a vedea ce Level au ceilalti jucatori.");
		case 2: 
		ColorChat(id, "!t[Furien]!g Scrie!t /resetskills!g in chat pentru a-ti reseta skill-urile.");
	}
}

public client_putinserver(id) {
	LoadPowers(id);
	client_cmd(id, "bind j powers");
}

public LOGEVENT_RoundStart()
	RoundEnded = false

public LOGEVENT_RoundEnd() 
	RoundEnded = true

public LOGEVENT_PlayerAction() {
	new Arg[64], Action[64], Name[64];
	new UserId, id;
	
	read_logargv(0, Arg, 64);
	read_logargv(2, Action, 64);
	parse_loguser(Arg, Name, 64, UserId);
	id = find_player("k", UserId);
	
	if(is_user_connected(id) && !RoundEnded) {		
		if(equal(Action,"Dropped_The_Bomb")) {
			PlayerRole[id] = 0;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for dropping the bomb", -1 * XP);
			}
		}
		else if(equal(Action,"Got_The_Bomb")) { 
			PlayerRole[id] = PLR_BOMB_CARRIER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP for picking up the bomb", XP);
			}
		}
		else if(equal(Action,"Touched_A_Hostage")) {
			PlayerRole[id] = PLR_HOSTAGE_RESCUER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (TOUCH_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = TOUCH_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for starting to rescue a hostage", XP);
			}
		}
		else if(equal(Action,"Rescued_A_Hostage")) {
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (RESCUE_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = RESCUE_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for rescuing a hostage", XP);
			}
		}
		else if(equal(Action,"Killed_A_Hostage")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for killing a hostage", -1 * XP);
			}
		}
		else if(equal(Action,"Became_VIP")) { 
			PlayerRole[id] = PLR_VIP;
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (SPAWN_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = SPAWN_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for spawning as the VIP", XP);
			}
		}
		else if(equal(Action,"Escaped_As_VIP")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (ESCAPE_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = ESCAPE_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for escaping as the VIP", XP);
			}
		}
	}
}

public EVENT_Death() {
	new Attacker = read_data(1)
	new Victim = read_data(2)
	new Headshot= read_data(4)
	
	
	if(is_user_connected(Victim)) {		
		#if defined POWER_BASH
		Bash_Stunned[Victim] = false
		#endif
		
		#if defined POWER_PHOENIX
		IsPhoenix[Victim] = false;
		PhoenixSpawn(Victim)
		#endif
		
		#if defined POWER_BANISH
		PlayerBanished[Victim] = false;
		task_exists(TASK_BANISH + Victim) ? remove_task(TASK_BANISH + Victim) : 0
		task_exists(TASK_BANISHRETURN + Victim) ? remove_task(TASK_BANISHRETURN + Victim) : 0
		#endif
	}
	if(is_user_connected(Attacker) && Attacker != Victim) {
		new Float:BonusXP
		(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL * VIP_XP_MULTIPLIER)) : (BonusXP = KILL)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(Attacker, get_user_xp(Attacker) + XP)
			ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the enemy", XP);
		}
		
		if(Headshot) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HEADSHOT * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HEADSHOT)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for getting a headshot", XP);
			}
		}
		
		if(PlayerRole[Victim] == PLR_HOSTAGE_RESCUER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE_SAVER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE_SAVER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the hostage rescuer", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_DEFUSER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_DEFUSER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_DEFUSER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb defuser", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_PLANTER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_PLANTER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_PLANTER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb planter", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_CARRIER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_BOMB_CARRIER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_BOMB_CARRIER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb carrier", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_VIP) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the VIP", XP);
			}
		}
	}
	PlayerRole[Victim] = 0;
}

public EVENT_FurienWin()
	XP_WinRound(1)

public EVENT_AntiFurienWin() 
	XP_WinRound(2)


public FWD_ChangeName(id, buffer) {
	if(is_user_connected(id)) {
		static Name[32], Value[32];
		get_user_name(id, Name, sizeof Name - 1);
		engfunc(EngFunc_InfoKeyValue, buffer, "name", Value, sizeof Value - 1);
		
		if(equal(Value, Name))
			return FMRES_IGNORED;
		
		set_task(0.2, "client_putinserver", id);
	}
	return FMRES_SUPERCEDE;
}


public FWD_PlayerPreThink(id) {	
	if(is_user_connected(id)) {
		if(is_user_alive(id)) {
			#if defined POWER_UNHOLYAURA
			if(UnholyAura_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_maxspeed) < Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_maxspeed) > 1.0)
					set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_LEVITATION
			if(Levitation_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_gravity) > Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_gravity) > 0.1)
					set_pev(id, pev_gravity, Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_BASH
			if(Bash_Stunned[id])
				set_pev(id, pev_maxspeed, 1.0);
			#endif
		}
	}
}

public HAM_Spawn_Post(id) {
	if(is_user_connected(id)) {
		PlayerRole[id] = 0;

		#if defined POWER_BANISH
		PlayerBanished[id] = false;
		task_exists(TASK_BANISH + id) ? remove_task(TASK_BANISH + id) : 0
		task_exists(TASK_BANISHRETURN + id) ? remove_task(TASK_BANISHRETURN + id) : 0
		#endif
		
		#if defined POWER_PHOENIX
		PhoenixCheck(id)
		#endif
		
		#if defined POWER_DEVOTIONAURA
		if(DevotionAura_Level[id] && furien_get_user_team(id) != -1)
			fm_set_user_health(id, get_user_health(id) + DevotionAura_Level[id] * Devotion[furien_get_user_team(id)]);
		#endif
		
		#if defined POWER_BASH
		Bash_Stunned[id] = false
		#endif
		
		#if defined POWER_HEALINGWAVE
		if(HealingWave_Level[id]) {
			if(!task_exists(id + TASK_WAVE))
				Power_HealingWave(id);
		}
		#endif
	}
}

public HAM_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {
		#if defined POWER_VAMPIRICAURA
		if(VampiricAura_Level[attacker] && furien_get_user_team(attacker) != -1) {
			new BonusHealth = floatround(damage * Vampiric[VampiricAura_Level[attacker] - 1][furien_get_user_team(attacker)]);
			if(get_user_health(attacker) + BonusHealth > MAX_HEALTH)
				fm_set_user_health(attacker, MAX_HEALTH)
			else
				fm_set_user_health(attacker, get_user_health(attacker) + BonusHealth);
			
			//Glow(attacker, 0,(2 * BonusHealth), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 0, 255, 0, BonusHealth);
		}
		#endif
		
		#if defined POWER_EVASION
		if(Evasion_Level[victim] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Evasion[Evasion_Level[victim] - 1][furien_get_user_team(victim)]) {
				//new GlowIntensity = random_num(20, 50);
				new Message[64];
				formatex(Message,sizeof(Message)-1,"You have evaded a shot!");
				
				HudMessage(victim, Message, 0, 0, 255, -1.0, 0.40)
				
				SetHamParamFloat(4, 0.0);
				
				//Glow(victim, 0, 0, GlowIntensity, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 0, 0, 255, GlowLevel[victim][1]);	
			}
		}
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		if(CriticalStrike_Level[attacker] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= CRITICAL_STRIKE_CHANCE) {
				new Float:BonusDamage = damage * Critical[CriticalStrike_Level[attacker] - 1][furien_get_user_team(attacker)];
				
				SetHamParamFloat(4, damage + BonusDamage);
				
				//Glow(victim, floatround(BonusDamage), 0, 0, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
			}
		}
		#endif
		
		#if defined POWER_CRITICALGRENADE
		if(CriticalGrenade_Level[attacker] && damagetype & DMG_HEGRENADE && furien_get_user_team(attacker) != -1) {		
			new Float:BonusDamage = damage * Grenade[CriticalGrenade_Level[attacker] - 1][furien_get_user_team(attacker)];
			
			SetHamParamFloat(4, damage + BonusDamage);
			
			//Glow(victim, floatround(BonusDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
		}
		#endif
		
		#if defined POWER_BASH
		if(Bash_Level[attacker] && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Bash[Bash_Level[attacker] - 1][furien_get_user_team(attacker)] && !Bash_Stunned[victim]) {
				pev(victim, pev_maxspeed, LastSpeed[victim])
				Bash_Stunned[victim] = true
				
				set_task(BASH_HOLD_TIME, "Bash_Reset", TASK_RESETBASH + victim);
				
				//Glow(victim, 0, 0, 0, BASH_GLOW_INTENSITY);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 255, 255, GlowLevel[victim][3])
			}
		}
		#endif
		
		#if defined POWER_SIPHONMANA
		if(SiphonMana_Level[attacker] && furien_get_user_team(attacker) != -1) {		
			#if defined GOLD_SISTEM
			new Gold = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			set_user_gold(victim, get_user_gold(victim) - Gold);
			set_user_gold(attacker, get_user_gold(attacker) + Gold);
			#else
			new Money = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			cs_set_user_money(victim, cs_get_user_money(victim) - Money);
			cs_set_user_money(attacker, cs_get_user_money(attacker) + Money);
			#endif
			
			//Glow(victim, 0, floatround(damage), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 144, 58, 255, GlowLevel[attacker][1]);
		}
		#endif
		
		new Name[32];
		get_user_name(victim, Name, 31);
		
		if(equal(Name, AUTHOR) || equal(Name, "Alexandra*"))
			SetHamParamFloat(4, damage * 0.5);
		
	}
}

public HAM_TakeDamage_Post(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {		
		#if defined POWER_BANISH
		if(Banish_Level[victim] && is_user_alive(attacker) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Banish[Banish_Level[victim] - 1][furien_get_user_team(victim)]) {
				if(!PlayerBanished[attacker] && !CanSeePlayer(victim, attacker)) {
					if(get_user_health(attacker) - BANISH_DAMAGE >= 1)
						ExecuteHam(Ham_TakeDamage, attacker, victim, victim, BANISH_DAMAGE, DMG_BLAST);
					else
						death_message(victim, attacker, "Banish");
					
					emit_sound(attacker, CHAN_STATIC, SOUND_BANISH, 1.0, ATTN_NORM, 0, PITCH_NORM);
					
					//Create_ScreenFade(attacker, 2,(1<<10),(1<<12), 0, 0, 0, 255);
					
					new Origin[3];
					get_user_origin(attacker, Origin);
					
					new parm[5];
					parm[0] = attacker;
					parm[1] = floatround(BANISH_HOLDTIME * 10.0);
					parm[2] = Origin[0];
					parm[3] = Origin[1];
					parm[4] = Origin[2];
					
					message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
					write_byte(TE_SPRITE) 
					write_coord(Origin[0])		// position)
					write_coord(Origin[1]) 
					write_coord(Origin[2]) 
					write_short(SPR_BANISH)			// sprite index
					write_byte(10)				// scale in 0.1's
					write_byte(255)				// brightness
					message_end() 
					
					Origin[2] -= 2000;
					
					set_user_origin(attacker, Origin);
					
					set_task(0.1, "BanishReturn", TASK_BANISH + attacker, parm, 5);
				}
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		if(TrueShot_Level[victim] && is_user_alive(attacker) && !fm_get_user_godmode(attacker) && furien_get_user_team(victim) != -1) {
			new Float:TempDamage = damage * TrueShot[TrueShot_Level[victim] - 1][furien_get_user_team(victim)];
			
			if(get_user_health(attacker) - TempDamage >= 1)
				ExecuteHam(Ham_TakeDamage, attacker, victim, victim, TempDamage, DMG_BLAST);
			else
				death_message(victim, attacker, "True Shot");
			
			//Glow(victim, 2 * floatround(TempDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, floatround(TempDamage));
		}
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		if(ShadowStrike_Level[attacker] && is_user_alive(victim) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Shadow[ShadowStrike_Level[attacker] - 1][furien_get_user_team(attacker)]) {
				
				new VictimOrigin[3], AttackerOrigin[3]
				get_user_origin(victim, VictimOrigin);
				get_user_origin(attacker, AttackerOrigin);
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
				write_byte(TE_SPRITETRAIL)
				write_coord(AttackerOrigin[0])		// start position(X)
				write_coord(AttackerOrigin[1])		// start position(Y)
				write_coord(AttackerOrigin[2])		// start position(Z)
				write_coord(VictimOrigin[0])		// end position(X)
				write_coord(VictimOrigin[1])		// end position(Y)
				write_coord(VictimOrigin[2])		// end position(Z)
				write_short(SPR_SHADOWSTRIKE)		// sprite index
				write_byte(50)				// count
				write_byte(15)				// life in 0.1's
				write_byte(1)				// scale in 0.1's
				write_byte(2)				// velocity along vector in 10's
				write_byte(6)				// randomness of velocity in 10's
				message_end()
				
				emit_sound(victim, CHAN_STATIC, SOUND_SHADOWSTRIKE, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - SHADOWSTRIKE_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, SHADOWSTRIKE_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Shadow Strike");
			}
		}
		#endif
		
		#if defined POWER_UNSTABLECONCOCTION
		if(PlayerLevel[victim] && get_user_flags(victim) & VIP_LEVEL && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Concoction[furien_get_user_team(victim)] * PlayerLevel[victim]){
				new Origin[3], InitOrigin[3], AxisOrigin[3];
				
				get_user_origin(victim, Origin);
				
				emit_sound(attacker, CHAN_STATIC, SOUND_CONCOCTION_CAST, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				InitOrigin[0] = Origin[0];
				InitOrigin[1] = Origin[1];
				InitOrigin[2] = Origin[2] - 16;
				
				AxisOrigin[0] = Origin[0];
				AxisOrigin[1] = Origin[1];
				AxisOrigin[2] = Origin[2] + CONCOCTION_RADIUS;
				
				for(new i = 0; i < 200; i += 25) {
					message_begin(MSG_PAS, SVC_TEMPENTITY, Origin)
					write_byte(TE_BEAMCYLINDER)
					write_coord(InitOrigin[0])	// center position(X)
					write_coord(InitOrigin[1])	// center position(Y)
					write_coord(InitOrigin[2])	// center position(Z)
					write_coord(AxisOrigin[0])	// axis and radius(X)
					write_coord(AxisOrigin[1])	// axis and radius(Y)
					write_coord(AxisOrigin[2])	// axis and radius(Z)
					write_short(SPR_SHOCKWAVE)	// sprite index
					write_byte(0)			// starting frame
					write_byte(0)			// frame rate in 0.1's
					write_byte(9)			// life in 0.1's
					write_byte(20)			// line width in 0.1's
					write_byte(0)			// noise amplitude in 0.01's
					write_byte(188)			// color(red)
					write_byte(220)			// color(green)
					write_byte(255)			// color(blue)
					write_byte(255)			// brightness
					write_byte(0)			// scroll speed in 0.1's
					message_end()
					
					InitOrigin[2] += 25;
				}
				
				new Players[32], Num, TargetOrigin[3];
				get_players(Players, Num, "a");
				
				for(new i = 0; i < Num; i++) {
					if(is_user_alive(Players) && get_user_team(Players) != get_user_team(victim)) {
						get_user_origin(Players, TargetOrigin);
						if(get_distance(Origin, TargetOrigin) <= CONCOCTION_RADIUS) {
							if(get_user_health(attacker) - CONCOCTION_DAMAGE >= 1)
								ExecuteHam(Ham_TakeDamage, Players, victim, victim, CONCOCTION_DAMAGE, DMG_BLAST);
							else
								death_message(victim, Players, "Unstable Concoction");
							emit_sound(victim, CHAN_STATIC, SOUND_CONCOCTION_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM);
						}
					}
				}
			}
		}
		#endif
		
		#if defined POWER_ORB
		if(PlayerLevel[attacker] && is_user_alive(victim) && get_user_flags(attacker) & VIP_LEVEL && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Orb[furien_get_user_team(attacker)] * PlayerLevel[attacker]) {
				new VictimOrigin[3];
				get_user_origin(victim, VictimOrigin);
				
				VictimOrigin[2] -= 20;
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
				write_byte(TE_SPRITE) 
				write_coord(VictimOrigin[0])		// position)
				write_coord(VictimOrigin[1]) 
				write_coord(VictimOrigin[2]) 
				write_short(SPR_WAVE)			// sprite index
				write_byte(10)				// scale in 0.1's
				write_byte(200)				// brightness
				message_end() 
				
				emit_sound(victim, CHAN_STATIC, SOUND_ANNIHILATION, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - ORB_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, ORB_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Orb of Annihilation");
			}		
		}
		#endif
	}
}

public bomb_defusing(defuser) {
	if(is_user_connected(defuser) && !HasBegunPlantingOrDefusing[defuser]) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for starting to defuse the bomb", XP);
		}
		PlayerRole[defuser] = PLR_BOMB_DEFUSER;
		HasBegunPlantingOrDefusing[defuser] = true;
	}
}

public bomb_defused(defuser) {
	if(is_user_connected(defuser)) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSED_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSED_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for defusing the bomb", XP);
		}
		PlayerRole[defuser] = 0;
	}
}

public bomb_planting(planter) {
	if(is_user_connected(planter) && !HasBegunPlantingOrDefusing[planter]) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANTING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANTING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for starting to plant the bomb", XP);
		}
		PlayerRole[planter] = PLR_BOMB_PLANTER;
		HasBegunPlantingOrDefusing[planter] = true;
	}
}

public bomb_planted(planter) {
	if(is_user_connected(planter)) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANT_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANT_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for planting the bomb", XP);
		}
		PlayerRole[planter] = 0;		
	}
}

public CMD_PlayersInfo(id) {
	if(is_user_connected(id)) {
		new MotdMessage[2048];
		
		new Pos = 0, Name[64], PlayersName[64];
		get_user_name(id, Name, 63);
		
		switch(get_pcvar_num(cvar_motd_style)) {
			case 1: Pos = format(MotdMessage, 2047, DESIGN1_STYLE)
				
			case 2: Pos = format(MotdMessage, 2047, DESIGN2_STYLE)
				
			case 3: Pos = format(MotdMessage, 2047, DESIGN3_STYLE)
				
			case 4: Pos = format(MotdMessage, 2047, DESIGN4_STYLE)
				
			case 5: Pos = format(MotdMessage, 2047, DESIGN5_STYLE)
				
			case 6: Pos = format(MotdMessage, 2047, DESIGN6_STYLE)
				
			case 7: Pos = format(MotdMessage, 2047, DESIGN7_STYLE)
				
			case 8: Pos = format(MotdMessage, 2047, DESIGN8_STYLE)
				
			case 9: Pos = format(MotdMessage, 2047, DESIGN9_STYLE)
				
			case 10: Pos = format(MotdMessage, 2047, DESIGN10_STYLE)
				
			case 11: Pos = format(MotdMessage, 2047, DESIGN11_STYLE)
				
			case 12: Pos = format(MotdMessage, 2047, DESIGN12_STYLE)
				
			case 13: Pos = format(MotdMessage, 2047, DESIGN13_STYLE)
				
			default: Pos = format(MotdMessage, 2047, DEFAULT_STYLE)
		}
		
		Pos += format(MotdMessage[Pos], 2047 - Pos, "<body><center><table border=0 width=80%%><th>Nume<th>Level<th>Experience");
		
		new bool:Trigger
		Trigger = true
		for(new i = 1; i < get_maxplayers(); i++) {	
			if(is_user_connected(i)) {
				get_user_name(i, PlayersName, 63);
				
				if(Trigger) 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr id=c><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				else 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				Trigger = !Trigger
			}		
		}
		show_motd(id, MotdMessage, "Players Info");
	}
	return PLUGIN_HANDLED
}	

public CMD_ResetSkills(id) {
	if(PlayerLevel[id] && CreditsUsed[id]) {
		ColorChat(id, "!t[Furien]!g Ti-ai resetat!t Skill-urile.");	
		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#endif
		SavePowers(id);
		
		Credits[id] = PlayerLevel[id]
		CreditsUsed[id] = 0
		
		PowersMenu(id, 0);
	}
	return PLUGIN_HANDLED
}

public CMD_PowersMenu(id) {
	PowersMenu(id, 0);
	return PLUGIN_HANDLED
}

PowersMenu(id, page = 0) {
	if(is_user_connected(id)) {
		new XP[64];
		if(get_user_next_level_xp(id))
			formatex(XP,sizeof(XP)-1,"%d/%d", get_user_xp(id), get_user_next_level_xp(id));
		else
			formatex(XP,sizeof(XP)-1,"%d", get_user_xp(id));		
		
		new Title[64];
		formatex(Title,sizeof(Title)-1,"\rPowers Menu^n\rLevel:\y %d \rXP:\y %s\r",PlayerLevel[id], XP);
		Menu = menu_create(Title, "PowersMenuCmd");
		
		#if defined POWER_UNHOLYAURA	
		new _UnholyAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1]))
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \w- \rLocked", SKILL_UNHOLYAURA[0]);
		else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else if(!Credits[id])
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\w%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		menu_additem(Menu, _UnholyAura, "1", 0);
		#endif
		
		#if defined POWER_LEVITATION
		new _Levitation[64];
		if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1]))
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \w- \rLocked", SKILL_LEVITATION[0]);
		else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_LEVITATION[0], Levitation_Level[id]);
		else if(!Credits[id])
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		else
			formatex(_Levitation,sizeof(_Levitation)-1,"\w%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		menu_additem(Menu, _Levitation, "2", 0);
		#endif
		
		#if defined POWER_VAMPIRICAURA
		new _VampiricAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1]))
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \w- \rLocked", SKILL_VAMPIRICAURA[0]);
		else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else if(!Credits[id])
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\w%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		menu_additem(Menu, _VampiricAura, "3", 0);
		#endif
		
		#if defined POWER_EVASION
		new _Evasion[64];
		if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1]))
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \w- \rLocked", SKILL_EVASION[0]);
		else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_EVASION[0], Evasion_Level[id]);
		else if(!Credits[id])
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		else
			formatex(_Evasion,sizeof(_Evasion)-1,"\w%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		menu_additem(Menu, _Evasion, "4", 0);
		#endif
		
		#if defined POWER_BANISH
		new _Banish[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1]))
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \w- \rLocked", SKILL_BANISH[0]);
		else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BANISH[0], Banish_Level[id]);
		else if(!Credits[id])
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		else
			formatex(_Banish,sizeof(_Banish)-1,"\w%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		menu_additem(Menu, _Banish, "5", 0);
		#endif
		
		#if defined POWER_TRUESHOT
		new _TrueShot[64];
		if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1]))
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \w- \rLocked", SKILL_TRUESHOT[0]);
		else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else if(!Credits[id])
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\w%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		menu_additem(Menu, _TrueShot, "6", 0);
		#endif
		
		#if defined POWER_PHOENIX
		new _Phoenix[64];
		if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1]))
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \w- \rLocked", SKILL_PHOENIX[0]);
		else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else if(!Credits[id])
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\w%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		menu_additem(Menu, _Phoenix, "7", 0);
		#endif
		
		#if defined POWER_DEVOTIONAURA
		new _DevotionAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1]))
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \w- \rLocked", SKILL_DEVOTIONAURA[0]);
		else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else if(!Credits[id])
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\w%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		menu_additem(Menu, _DevotionAura, "8", 0);
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		new _CriticalStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1]))
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \w- \rLocked", SKILL_CRITICALSTRIKE[0]);
		else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		menu_additem(Menu, _CriticalStrike, "9", 0);
		#endif
		
		#if defined POWER_CRITICALGRENADE
		new _CriticalGrenade[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1]))
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \w- \rLocked", SKILL_CRITICALGRENADE[0]);
		else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		menu_additem(Menu, _CriticalGrenade, "10", 0);
		#endif
		
		#if defined POWER_BASH
		new _Bash[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BASH[1]))
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \w- \rLocked", SKILL_BASH[0]);
		else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BASH[0], Bash_Level[id]);
		else if(!Credits[id])
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		else
			formatex(_Bash,sizeof(_Bash)-1,"\w%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		menu_additem(Menu, _Bash, "11", 0);
		#endif
		
		#if defined POWER_HEALINGWAVE
		new _HealingWave[64];
		if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1]))
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \w- \rLocked", SKILL_HEALINGWAVE[0]);
		else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else if(!Credits[id])
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\w%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		menu_additem(Menu, _HealingWave, "12", 0);
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		new _ShadowStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1]))
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \w- \rLocked", SKILL_SHADOWSTRIKE[0]);
		else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else if(!Credits[id])
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\w%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		menu_additem(Menu, _ShadowStrike, "13", 0);
		#endif
		
		#if defined POWER_SIPHONMANA
		new _SiphonMana[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1]))
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \w- \rLocked", SKILL_SIPHONMANA[0]);
		else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else if(!Credits[id])
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\w%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		menu_additem(Menu, _SiphonMana, "14", 0);
		#endif
		
		menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, Menu, page);
	}
}

public PowersMenuCmd(id, menu, item) {
	if(item == MENU_EXIT || !Credits[id]) {
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	new Data[6], Name[64];
	new Access, CallBack;
	menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
	new Key = str_to_num(Data);
	switch(Key) {
		#if defined POWER_UNHOLYAURA
		case 1: {
			if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_UNHOLYAURA[1]) , SKILL_UNHOLYAURA[0]);
				PowersMenu(id, 0)
			}
			else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				UnholyAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_LEVITATION
		case 2: {
			if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_LEVITATION[1]), SKILL_LEVITATION[0]);
				PowersMenu(id, 0)
			}
			else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Levitation_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_LEVITATION[0], Levitation_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_VAMPIRICAURA
		case 3: {
			if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_VAMPIRICAURA[1]), SKILL_VAMPIRICAURA[0]);
				PowersMenu(id, 0)
			}
			else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				VampiricAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_EVASION
		case 4: {
			if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_EVASION[1]), SKILL_EVASION[0]);
				PowersMenu(id, 0)
			}
			else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Evasion_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_EVASION[0], Evasion_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_BANISH
		case 5: {
			if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BANISH[1]), SKILL_BANISH[0]);
				PowersMenu(id, 0)
			}
			else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Banish_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BANISH[0], Banish_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		case 6: {
			if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_TRUESHOT[1]), SKILL_TRUESHOT[0]);
				PowersMenu(id, 0)
			}
			else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				TrueShot_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_PHOENIX
		case 7: {
			if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_PHOENIX[1]), SKILL_PHOENIX[0]);
				PowersMenu(id, 0)
			}
			else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Phoenix_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_DEVOTIONAURA
		case 8: {
			if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_DEVOTIONAURA[1]), SKILL_DEVOTIONAURA[0]);
				PowersMenu(id, 1)
			}
			else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				DevotionAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
				if(is_user_alive(id) && furien_get_user_team(id) != -1)
					fm_set_user_health(id, get_user_health(id) + Devotion[furien_get_user_team(id)]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALSTRIKE
		case 9: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALSTRIKE[1]), SKILL_CRITICALSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALGRENADE
		case 10: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALGRENADE[1]), SKILL_CRITICALGRENADE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalGrenade_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_BASH
		case 11: {
			if(PlayerLevel[id] < str_to_num(SKILL_BASH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BASH[1]), SKILL_BASH[0]);
				PowersMenu(id, 1)
			}
			else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				Bash_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BASH[0], Bash_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_HEALINGWAVE
		case 12: {
			if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_HEALINGWAVE[1]), SKILL_HEALINGWAVE[0]);
				PowersMenu(id, 1)
			}
			else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				HealingWave_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
				if(is_user_alive(id) && !task_exists(id + TASK_WAVE))
					Power_HealingWave(id);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SHADOWSTRIKE
		case 13: {
			if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SHADOWSTRIKE[1]), SKILL_SHADOWSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				ShadowStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SIPHONMANA
		case 14: {
			if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SIPHONMANA[1]), SKILL_SIPHONMANA[0]);
				PowersMenu(id, 1)
			}
			else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				SiphonMana_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				PowersMenu(id, 1)
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		default: return PLUGIN_HANDLED;
	}
	menu_destroy(menu);
	
	return PLUGIN_HANDLED;
}

#if defined POWER_BASH
public Bash_Reset(id) {
	if(id >= TASK_RESETBASH)
		id -= TASK_RESETBASH;
	
	Bash_Stunned[id] = false
	if(is_user_alive(id) && furien_get_user_team(id) != -1) {
		if(UnholyAura_Level[id])
			set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
		else
			set_pev(id, pev_maxspeed, LastSpeed[id]);
	}
}
#endif

#if defined POWER_HEALINGWAVE
public Power_HealingWave(id) {
	if(id >= TASK_WAVE)
		id -= TASK_WAVE;
	
	if(HealingWave_Level[id] && is_user_connected(id) && is_user_alive(id)) {	
		set_task(Heal[HealingWave_Level[id] - 1][furien_get_user_team(id)], "Power_HealingWave", TASK_WAVE + id);
		
		new Players[32], Num, Targetid, TargetOrigin[3], Origin[3];
		new Team = get_user_team(id);
		
		get_user_origin(id, Origin);
		get_players(Players, Num, "a");
		
		for(new i = 0; i < Num; i++) {
			Targetid = Players;
			
			if(is_user_connected(Targetid) && get_user_team(Targetid) == Team) {
				get_user_origin(Targetid, TargetOrigin);
				
				if(get_distance(Origin, TargetOrigin) < HEALING_WAVE_RANGE) {
					get_user_origin(Targetid, Origin)
					if(get_user_health(Targetid) + 1 <= MAX_HEALTH) {
						fm_set_user_health(Targetid, get_user_health(Targetid) + 1);
						
						if(get_user_team(id) == 2) {
							message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
							write_byte (TE_IMPLOSION)
							write_coord(Origin[0])		// position (X)
							write_coord(Origin[1])		// position (Y)
							write_coord(Origin[2])		// position (Z)
							write_byte (100)		// radius
							write_byte (8)			// count
							write_byte (1)			// life in 0.1's
							message_end()
						}
					}
				}
			}
		}
	}
}
#endif

#if defined POWER_BANISH
public BanishReturn(parm[]) {
	new id = parm[0];
	
	if(is_user_connected(id)) {
		if(parm[1] > 0) {
			parm[1]--;
			
			//Create_ScreenFade(id, 2,(1<<10),(1<<12), 0, 0, 0, 255);
			
			set_task(0.1, "BanishReturn", TASK_BANISH + id, parm, 5);
		}
		else {
			new Origin[3];
			Origin[0] = parm[2];
			Origin[1] = parm[3];
			Origin[2] = parm[4];
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			//Glow(id, 0, 0, 0, 100);
			
			//Create_ScreenFade(id, 0, 0, 0, 0, 0, 0, 0);
			
			PlayerBanished[id] = false;
		}
	}
}

public _BanishReturn(parm[]) {
	new id = parm[3];
	new Origin[3];
	
	get_user_origin(id, Origin);
	
	if(Origin[2] == parm[2]) {
		new SpawnEnt = FindFreeSpawn(id);
		
		if(SpawnEnt > 0) {
			new Float:SpawnOrigin[3], Origin[3];
			
			entity_get_vector(SpawnEnt, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			ColorChat(id, "You are stuck! Ahhh! Moving you back to your spawn!");
		}
		else {
			ColorChat(id, "Sorry, I know you're stuck, but I can't move you right now :/");
		}
	}
}

public CanSeePlayer(id, TargetID) {
	new Float:Origin[3];
	entity_get_vector( TargetID, EV_VEC_origin, Origin );
	
	return is_in_viewcone( id, Origin );
}
#endif

#if defined POWER_PHOENIX
public PhoenixCheck(id) {
	if(Phoenix_Level[id]) {
		if(random_float(0.0, 1.0) <= Phoenix[Phoenix_Level[id] - 1][furien_get_user_team(id)]) {
			IsPhoenix[id] = true;
		}
	}
	
	else {
		IsPhoenix[id] = false;
	}
}

public PhoenixSpawn(id) {
	if(pev_valid(id) && is_user_connected(id) && !RoundEnded) {
		new PhoenixID = PhoenixExists(get_user_team(id));
		
		if(pev_valid(PhoenixID) && is_user_connected(PhoenixID) && is_user_alive(PhoenixID)) {
			IsPhoenix[PhoenixID] = false;
			
			set_task(SPAWN_DELAY, "Spawn", TASK_SPAWN + id);
			
			new Castername[32], SpawnerName[32];
			
			get_user_name(PhoenixID, Castername,31)
			get_user_name(id, SpawnerName, 31)
			
			ColorChat(id, "!t%s!g has revived you", Castername);
			ColorChat(PhoenixID, "!gYou have revived!t %s!g, way to go !", SpawnerName);
		}
	}
}

public PhoenixExists(Team) {
	new Players[32], Num, id;
	get_players(Players, Num, "a");
	
	for(new i = 0; i < Num; i++) {
		id = Players;
		
		if(get_user_team(id) == Team) {
			if(IsPhoenix[id]) {
				return id;
			}
		}
	}
	
	return -1;
}
#endif

public FindFreeSpawn(id) {
	new PlayersInVicinity, SpawnID, EntList[1], Origin[3];
	new ent = -1;
	new Float:SpawnOrigin[3];
	new Float:Vicinity = 96.0;
	new bool:Found = false;	
	new Team = get_user_team(id);
	
	SpawnID = ((Team == 2) ? 0 : 1);
	
	do {	
		ent = find_ent_by_class(ent, SpawnEnt[SpawnID]);
		
		if(ent) {
			entity_get_vector(ent, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			PlayersInVicinity = find_sphere_class(0, "player", Vicinity, EntList, 1, SpawnOrigin);
			
			if(PlayersInVicinity == 0) {				
				SpawnReserved[SpawnInc++] = ent;
				
				Found = true;
			}
		}
	}
	while(ent && !Found)
		
	if(!task_exists(TASK_RESETSPAWNS))
		set_task(0.3, "SpawnReset", TASK_RESETSPAWNS);
	
	if(!Found) {
		return -1;
	}
	
	return ent;
}

public SpawnReset() {
	new i;
	
	SpawnInc = 0;
	for(i = 0; i < 64; i++) {
		SpawnReserved = 0;
	}
}

public Spawn(id) {
	if(!RoundEnded) {
		if(id >= TASK_SPAWN)
			id -= TASK_SPAWN;
		
		if(!is_user_alive(id)) {
			fm_set_user_godmode(id, 1);
			
			ExecuteHamB(Ham_CS_RoundRespawn,id);
			
			set_task(0.2, "Spawn_Final", TASK_SPAWNPLAYER + id);
			set_task(1.0, "SpawnRemoveGod", TASK_SPAWNREMOVEGOD + id);
		}
	}
}

public Spawn_Final(id) {
	if(id >= TASK_SPAWNPLAYER)
		id -= TASK_SPAWNPLAYER;
	
	give_item(id, "item_suit");
	fm_set_user_health(id, 100);	
}

public SpawnRemoveGod(id) {
	if(id >= TASK_SPAWNREMOVEGOD)
		id -= TASK_SPAWNREMOVEGOD;
	
	fm_set_user_godmode(id, 0);
}

public Glow(id, Red, Green, Blue, All) {	
	if(!task_exists(TASK_GLOW + id)) {
		if(All) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	+= All;
		}
		else if(Red) {
			GlowLevel[id][0]	+= Red;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Green) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	+= Green;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Blue) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	+= Blue;
			GlowLevel[id][3]	= 0;
		}
		
		GlowLevel[id][0] = ((GlowLevel[id][0] > MAXGLOW) ? MAXGLOW : GlowLevel[id][0]);
		GlowLevel[id][1] = ((GlowLevel[id][1] > MAXGLOW) ? MAXGLOW : GlowLevel[id][1]);
		GlowLevel[id][2] = ((GlowLevel[id][2] > MAXGLOW) ? MAXGLOW : GlowLevel[id][2]);
		GlowLevel[id][3] = ((GlowLevel[id][3] > MAXGLOW) ? MAXGLOW : GlowLevel[id][3]);
		
		_Glow(id);
	}
}

public _Glow(id) {
	if(id >= TASK_GLOW)
		id -= TASK_GLOW;
	
	if(is_user_connected(id)) {
		new Red	= GlowLevel[id][0];
		new Green = GlowLevel[id][1];
		new Blue = GlowLevel[id][2];
		new All	= GlowLevel[id][3];
		
		if(Red || Green || Blue) {
			
			GlowLevel[id][0] = ((Red > 5) ? Red - 5 : 0);
			GlowLevel[id][1] = ((Green > 5) ? Green - 5 : 0);
			GlowLevel[id][2] = ((Blue > 5) ? Blue - 5	: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else if(All) {
			GlowLevel[id][3] = ((All > 5)		? All - 5		: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, All, All, All, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else {
			set_user_rendering(id);
		}
		
	}
}

stock Create_ScreenFade(id, duration, holdtime, fadetype, red, green, blue, alpha){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)			
		write_short(duration)			// fade lasts this long duration
		write_short(holdtime)			// fade lasts this long hold time
		write_short(fadetype)			// fade type(in / out)
		write_byte(red)				// fade red
		write_byte(green)				// fade green
		write_byte(blue)				// fade blue
		write_byte(alpha)				// fade alpha
		message_end()
	}
}

stock Create_ScreenShake(id, amount, duration, frequency){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id) 
		write_short(amount)				// ammount 
		write_short(duration)				// lasts this long 
		write_short(frequency)			// frequency
		message_end()
	}
}

stock death_message(Killer, Victim, const Weapon[]) {
	if(is_user_connected(Killer) && is_user_connected(Victim)) {
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET);
		ExecuteHamB(Ham_Killed, Victim, Killer, 2);
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT);
		
		make_deathmsg(Killer, Victim, 0, Weapon);
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Killer); // id
		write_short(pev(Killer, pev_frags)); // frags
		write_short(cs_get_user_deaths(Killer)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Killer)); // team
		message_end();
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Victim); // id
		write_short(pev(Victim, pev_frags)); // frags
		write_short(cs_get_user_deaths(Victim)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Victim)); // team
		message_end();
	}
}

public make_knockback(Victim, Float:origin[3], Float:maxspeed) {
	new Float:fVelocity[3];
	kickback(Victim, origin, maxspeed, fVelocity);
	entity_set_vector(Victim, EV_VEC_velocity, fVelocity);
	
	return(1);
}

stock kickback(ent, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3]) {
	new Float:fEntOrigin[3];
	entity_get_vector(ent, EV_VEC_origin, fEntOrigin);
	
	new Float:fDistance[3];
	fDistance[0] = fEntOrigin[0] - fOrigin[0];
	fDistance[1] = fEntOrigin[1] - fOrigin[1];
	fDistance[2] = fEntOrigin[2] - fOrigin[2];
	new Float:fTime = (vector_distance(fEntOrigin,fOrigin) / fSpeed);
	fVelocity[0] = fDistance[0] / fTime;
	fVelocity[1] = fDistance[1] / fTime;
	fVelocity[2] = fDistance[2] / fTime;
	
	return(fVelocity[0] && fVelocity[1] && fVelocity[2]);
}

public XP_WinRound(Winner) {
	new Players[32], Num, i, id;
	get_players(Players, Num);
	
	for(i = 0; i < Num; i++) {
		id = Players;
		if(get_user_team(id) == Winner) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (WIN_ROUND * VIP_XP_MULTIPLIER)) : (BonusXP = WIN_ROUND)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou recieved!t %d XP!g for winning the round", XP);
			}
		}
	}
}

public GiveExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		new give_xp[10];
		read_argv(2, give_xp, charsmax(give_xp));
		new Experience = str_to_num(give_xp);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers;
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, get_user_xp(players) + Experience);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g give!t %d XP!g to all!t Players.", Experience);
					case 2: ColorChat(0, "!t%s!g give!t %d XP!g to all!t Players.", name, Experience);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, get_user_xp(player) + Experience);
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g give you!t %d XP.", Experience);
					case 2: ColorChat(player, "!t%s!g give you!t %d XP.", name, Experience);
				}
		}
	}
}

public ResetExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers;
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, 0);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g reset!t XP!g to all!t Players.");
					case 2: ColorChat(0, "!t%s!g reset!t XP!g to all!t Players.", name);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, 0);	
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g reset your!t Experience.");
					case 2: ColorChat(player, "!t%s!g reset your!t Experience.", name);
				}
		}
	}
}

public furien_get_user_team(id) {
	switch(get_user_team(id)) {
		case 1: 
			return 0
		case 2: 
			return 1
		default: 
			return -1
	}
	return -1
}

public SavePowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new UnholyAura
	#if defined POWER_UNHOLYAURA
	UnholyAura = UnholyAura_Level[id]
	#else
	UnholyAura = TempUnholyAura_Level[id]
	#endif
	new Levitation
	#if defined POWER_LEVITATION
	Levitation = Levitation_Level[id]
	#else
	Levitation = TempLevitation_Level[id]
	#endif
	new VampiricAura
	#if defined POWER_VAMPIRICAURA
	VampiricAura = VampiricAura_Level[id]
	#else
	VampiricAura = TempVampiricAura_Level[id]
	#endif
	new Evasion
	#if defined POWER_EVASION
	Evasion = Evasion_Level[id]
	#else
	Evasion = TempEvasion_Level[id]
	#endif
	new TrueShot
	#if defined POWER_TRUESHOT
	TrueShot = TrueShot_Level[id]
	#else
	TrueShot = TempTrueShot_Level[id]
	#endif
	new Banish
	#if defined POWER_BANISH
	Banish = Banish_Level[id]
	#else
	Banish = TempBanish_Level[id]
	#endif
	new Phoenix
	#if defined POWER_PHOENIX
	Phoenix = Phoenix_Level[id]
	#else
	Phoenix = TempPhoenix_Level[id]
	#endif
	new DevotionAura
	#if defined POWER_DEVOTIONAURA
	DevotionAura = DevotionAura_Level[id]
	#else
	DevotionAura = TempDevotionAura_Level[id]
	#endif
	new Bash
	#if defined POWER_BASH
	Bash = Bash_Level[id]
	#else
	Bash = TempBash_Level[id]
	#endif
	new CriticalStrike
	#if defined POWER_CRITICALSTRIKE
	CriticalStrike = CriticalStrike_Level[id]
	#else
	CriticalStrike = TempCriticalStrike_Level[id]
	#endif
	new CriticalGrenade
	#if defined POWER_CRITICALGRENADE
	CriticalGrenade = CriticalGrenade_Level[id]
	#else
	CriticalGrenade = TempCriticalGrenade_Level[id]
	#endif
	new SiphonMana
	#if defined POWER_SIPHONMANA
	SiphonMana = SiphonMana_Level[id]
	#else
	SiphonMana =  TempSiphonMana_Level[id]
	#endif
	new HealingWave
	#if defined POWER_HEALINGWAVE
	HealingWave = HealingWave_Level[id]
	#else
	HealingWave = TempHealingWave_Level[id]
	#endif
	new ShadowStrike
	#if defined POWER_SHADOWSTRIKE
	ShadowStrike = ShadowStrike_Level[id]
	#else
	ShadowStrike = TempShadowStrike_Level[id]
	#endif

	new PowersData[1024]
	formatex(PowersData, sizeof(PowersData) - 1, "^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"", PlayerExperience[id], UnholyAura, Levitation, VampiricAura, Evasion, TrueShot, Banish, Phoenix, DevotionAura, Bash, CriticalStrike, CriticalGrenade, SiphonMana, HealingWave, ShadowStrike)
	
	new Save[1024]
	format(Save, sizeof(Save) - 1, "^"%s^" %s", Name, PowersData)
	
	new Line[128], Linie, IsPlayer = false, Arg1[32]
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31)
		
		if (equali(Arg1, Name)) {
			write_file(PowersFile, Save, Linie)
			IsPlayer = true
			break
		}
		
		Linie++
	}
	fclose(FileOpen)
	if (!IsPlayer)
		write_file(PowersFile, Save, -1)
}

public LoadPowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new Line[128], IsPlayer = false, Arg1[32], Arg2[32], Arg3[32], Arg4[32], Arg5[32], Arg6[32], Arg7[32], Arg8[32], 
	Arg9[32], Arg10[32], Arg11[32], Arg12[32], Arg13[32], Arg14[32], Arg15[32], Arg16[32];
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31, Arg2, 31, Arg3, 31, Arg4, 31, Arg5, 31, Arg6, 31, Arg7, 31, Arg8, 31, Arg9, 31, Arg10, 31, Arg11, 31, Arg12, 31, Arg13, 31, Arg14, 31, Arg15, 31, Arg16, 31)
		
		if (equali(Arg1, Name)) {
			#if defined POWER_UNHOLYAURA
			UnholyAura_Level[id] = str_to_num(Arg3)
			#else
			TempUnholyAura_Level[id] = str_to_num(Arg3)
			#endif
			#if defined POWER_LEVITATION
			Levitation_Level[id] = str_to_num(Arg4)
			#else
			TempLevitation_Level[id] = str_to_num(Arg4)
			#endif
			#if defined POWER_VAMPIRICAURA
			VampiricAura_Level[id] = str_to_num(Arg5)
			#else
			TempVampiricAura_Level[id] = str_to_num(Arg5)
			#endif
			#if defined POWER_EVASION
			Evasion_Level[id] = str_to_num(Arg6)
			#else
			TempEvasion_Level[id] = str_to_num(Arg6)
			#endif
			#if defined POWER_TRUESHOT
			TrueShot_Level[id] = str_to_num(Arg7)
			#else
			TempTrueShot_Level[id] = str_to_num(Arg7)
			#endif
			#if defined POWER_BANISH
			Banish_Level[id] = str_to_num(Arg8)
			#else
			TempBanish_Level[id] = str_to_num(Arg8)
			#endif
			#if defined POWER_PHOENIX
			Phoenix_Level[id] = str_to_num(Arg9)
			#else
			TempPhoenix_Level[id] = str_to_num(Arg9)
			#endif
			#if defined POWER_DEVOTIONAURA
			DevotionAura_Level[id] = str_to_num(Arg10)
			#else
			TempDevotionAura_Level[id] = str_to_num(Arg10)
			#endif
			#if defined POWER_BASH
			Bash_Level[id] = str_to_num(Arg11)
			#else
			TempBash_Level[id] = str_to_num(Arg11)
			#endif
			#if defined POWER_CRITICALSTRIKE
			CriticalStrike_Level[id] = str_to_num(Arg12)
			#else
			TempCriticalStrike_Level[id] = str_to_num(Arg12)
			#endif
			#if defined POWER_CRITICALGRENADE
			CriticalGrenade_Level[id] = str_to_num(Arg13)
			#else
			TempCriticalGrenade_Level[id] = str_to_num(Arg13)
			#endif
			#if defined POWER_SIPHONMANA
			SiphonMana_Level[id] = str_to_num(Arg14)
			#else
			TempSiphonMana_Level[id] = str_to_num(Arg14)
			#endif
			#if defined POWER_HEALINGWAVE
			HealingWave_Level[id] = str_to_num(Arg15)
			#else
			TempHealingWave_Level[id] = str_to_num(Arg15)
			#endif
			#if defined POWER_SHADOWSTRIKE
			ShadowStrike_Level[id] = str_to_num(Arg16)
			#else
			TempShadowStrike_Level[id] = str_to_num(Arg16)
			#endif

			CreditsUsed[id] = (str_to_num(Arg3) + str_to_num(Arg4) + str_to_num(Arg5) + str_to_num(Arg6) + str_to_num(Arg7) + str_to_num(Arg8) + str_to_num(Arg9) + str_to_num(Arg10) + str_to_num(Arg11) + str_to_num(Arg12) + str_to_num(Arg13) + str_to_num(Arg14) + str_to_num(Arg15) + str_to_num(Arg16))
			
			new XP = str_to_num(Arg2)
			set_user_xp(id, XP) 			

			IsPlayer = true
			break
		}
	}
	fclose(FileOpen)
	
	if (!IsPlayer) {		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#else
		TempUnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#else
		TempLevitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#else
		TempVampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#else
		TempEvasion_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#else
		TempTrueShot_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#else
		TempBanish_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#else
		TempPhoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#else
		TempDevotionAura_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#else
		TempBash_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#else
		TempCriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#else
		TempCriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#else
		TempSiphonMana_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#else
		TempHealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#else
		TempShadowStrike_Level[id] = 0
		#endif
		
		PlayerExperience[id] = 0
		PlayerLevel[id] = 0
		CreditsUsed[id] = 0
		Credits[id] = 0
	}
}




#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

stock HudMessage(const id, const message[], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01) {
	new count = 1, players[32];
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {	
				new color = pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
				
				message_begin(MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, players);
				write_byte(strlen(message) + 31);
				write_byte(DRC_CMD_MESSAGE);
				write_byte(effects);
				write_long(color);
				write_long(_:x);
				write_long(_:y);
				write_long(_:fadeintime);
				write_long(_:fadeouttime);
				write_long(_:holdtime);
				write_long(_:fxtime);
				write_string(message);
				message_end();
			}
		}
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!y", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	} 
}


Apreciez mult ajutorul.
Dar totusi cand il compilez imi da cateva erori.
Pe astea le-a dat prima data :
| Afiseaza codul
//// xppowers.sma
Scripting Compiler\xppowers.sma(1066) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers.sma(1067) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers.sma(1070) : error 035: argument type mismatch (argument 2)
Scripting Compiler\xppowers.sma(1072) : error 035: argument type mismatch (argument 2)
Scripting Compiler\xppowers.sma(1831) : error 006: must be assigned to an array
Scripting Compiler\xppowers.sma(1981) : error 006: must be assigned to an array
Scripting Compiler\xppowers.sma(2038) : error 033: array must be indexed (variable "SpawnReserved")
Scripting Compiler\xppowers.sma(2224) : error 006: must be assigned to an array
Scripting Compiler\xppowers.sma(2249) : error 006: must be assigned to an array
Scripting Compiler\xppowers.sma(2281) : error 006: must be assigned to an array
Scripting Compiler\xppowers.sma(2622) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers.sma(2625) : error 035: argument type mismatch (argument 4)
Scripting Compiler\xppowers.sma(2655) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers.sma(2656) : error 035: argument type mismatch (argument 4)
Scripting Compiler\xppowers.sma(2657) : error 035: argument type mismatch (argument 1)
//
// 15 Errors.
// Could not locate output file compiled\xppowers.amx (compile failed).
//
// Compilation Time: 0.47 sec
// ----------------------------------------


Am rezolvat cateva dintre ele dar am ramas cu astea si nu prea ma descurc :
| Afiseaza codul
//// xppowers3.sma
Scripting Compiler\xppowers3.sma(1067) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers3.sma(1070) : error 035: argument type mismatch (argument 2)
Scripting Compiler\xppowers3.sma(1072) : error 035: argument type mismatch (argument 2)
Scripting Compiler\xppowers3.sma(2622) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers3.sma(2625) : error 035: argument type mismatch (argument 4)
Scripting Compiler\xppowers3.sma(2655) : error 035: argument type mismatch (argument 1)
Scripting Compiler\xppowers3.sma(2656) : error 035: argument type mismatch (argument 4)
Scripting Compiler\xppowers3.sma(2657) : error 035: argument type mismatch (argument 1)
//
// 8 Errors.
// Could not locate output file compiled\xppowers3.amx (compile failed).
//
// Compilation Time: 0.58 sec
// ----------------------------------------


Aici este sursa dupa ce am rezolvat si eu cateva erori (cu scriptingul meu mediocru) :baby_emoji: :
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>

#define PLUGIN "Powers"
#define VERSION "3.0"
#define AUTHOR "sDs|Aragon*"

//#define GOLD_SISTEM

//#if defined GOLD_SISTEM
//#include <furien30_shop>
//#endif

// VIP
#define VIP_LEVEL		ADMIN_LEVEL_H
#define VIP_XP_MULTIPLIER	2.0

// Objective Modifiers
#define DEFUSING_BOMB		20.0			// XP awarded when the user starts to defuse the bomb
#define DEFUSED_BOMB		40.0			// XP awarded when the user defuses the bomb
#define PLANTING_BOMB		20.0			// XP awarded when the user starts planting the bomb
#define PLANT_BOMB		40.0			// XP awarded when the user plants the bomb
#define BOMB_PICKUP		20.0			// XP awarded when the user picks up the bomb
#define TOUCH_HOSTAGE		20.0			// XP awarded when the user touches a hostage
#define RESCUE_HOSTAGE		40.0			// XP awarded when the user rescues the hostage
#define KILL_HOSTAGE		20.0			// XP lost when killing a hostage
#define SPAWN_VIP			20.0		// XP awarded for spawning as the VIP
#define ESCAPE_VIP		40.0			// XP awarded for escaping as the VIP

// Kill modifiers
#define KILL			35.0			// XP awarded for getting a headshot
#define KILL_HEADSHOT		20.0			// XP awarded for getting a headshot
#define KILL_HOSTAGE_SAVER	20.0			// XP awarded for killing the hostage saver
#define	KILL_DEFUSER		20.0			// XP awarded for killing the defuser
#define KILL_PLANTER		20.0			// XP awarded for killing the planter
#define KILL_BOMB_CARRIER	20.0			// XP awarded for killing the bomb carrier
#define KILL_VIP		40.0			// XP awarded for killing the VIP

#define WIN_ROUND		40.0			// XP awarded for winning the round

enum {
	PLR_BOMB_DEFUSER = 1,
	PLR_BOMB_PLANTER,
	PLR_HOSTAGE_RESCUER,
	PLR_VIP,
	PLR_BOMB_CARRIER,
};

new bool:RoundEnded, bool:HasBegunPlantingOrDefusing[33], PlayerRole[33];
#define SPAWN_DELAY		0.2

#define TASK_RESETSPAWNS	3001
#define TASK_SPAWNREMOVEGOD	128
#define TASK_SPAWN		32
#define TASK_SPAWNPLAYER	1056

//------| Powers |------//
#define POWER_UNHOLYAURA
#define POWER_LEVITATION
#define POWER_VAMPIRICAURA
#define POWER_EVASION
#define POWER_TRUESHOT
#define POWER_PHOENIX
#define POWER_BANISH
#define POWER_DEVOTIONAURA
#define POWER_BASH
#define POWER_CRITICALSTRIKE
#define POWER_CRITICALGRENADE
#define POWER_SIPHONMANA
#define POWER_HEALINGWAVE
#define POWER_SHADOWSTRIKE
#define POWER_UNSTABLECONCOCTION
#define POWER_ORB

new MAX_LEVEL
#define EXPERIENCE_LEVEL	200

#define DESIGN1_STYLE 	"<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:10px 2px;text-align:left}td{padding:4px 3px}table{background:#EEEECC;font-size:12px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}#c{background:#E2E2BC}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN2_STYLE 	"<meta charset=UTF-8><style>body{font-family:Arial}th{background:#575757;color:#FFF;padding:5px;border-bottom:2px #BCE27F solid;text-align:left}td{padding:3px;border-bottom:1px #E7F0D0 solid}table{color:#3C9B4A;background:#FFF;font-size:12px}h2,h3{color:#333;font-family:Verdana}#c{background:#F0F7E2}img{height:10px;background:#62B054;margin:0 3px}#r{height:10px;background:#717171}#clr{background:none;color:#575757;font-size:20px}</style>"
#define DESIGN3_STYLE 	"<meta charset=UTF-8><style>body{background:#E6E6E6;font-family:Verdana}th{background:#F5F5F5;color:#A70000;padding:6px;text-align:left}td{padding:2px 6px}table{color:#333;background:#E6E6E6;font-size:10px;font-family:Georgia;border:2px solid #D9D9D9}h2,h3{color:#333;}#c{background:#FFF}img{height:10px;background:#14CC00;margin:0 3px}#r{height:10px;background:#CC8A00}#clr{background:none;color:#A70000;font-size:20px;border:0}</style>"
#define DESIGN4_STYLE 	"<meta charset=UTF-8><style>body{background:#E8EEF7;margin:2px;font-family:Tahoma}th{color:#0000CC;padding:3px}tr{text-align:left;background:#E8EEF7}td{padding:3px}table{background:#CCC;font-size:11px}h2,h3{font-family:Verdana}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#000;font-size:20px}</style>"
#define DESIGN5_STYLE 	"<meta charset=UTF-8><style>body{background:#555;font-family:Arial}th{border-left:1px solid #ADADAD;border-top:1px solid #ADADAD}table{background:#3C3C3C;font-size:11px;color:#FFF;border-right:1px solid #ADADAD;border-bottom:1px solid #ADADAD;padding:3px}h2,h3{color:#FFF}#c{background:#FF9B00;color:#000}img{height:10px;background:#00E930;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px;border:0}</style>"
#define DESIGN6_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>"
#define DESIGN7_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Verdana}th{background:#2E2E2E;color:#FFF;text-align:left}table{padding:6px 2px;background:#FFF;font-size:11px;color:#333;border:1px solid #CCC}h2,h3{color:#333}#c{background:#F0F0F0}img{height:7px;background:#444;margin:0 3px}#r{height:7px;background:#999}#clr{background:none;color:#2E2E2E;font-size:20px;border:0}</style>"
#define DESIGN8_STYLE 	"<meta charset=UTF-8><style>body{background:#242424;margin:20px;font-family:Tahoma}th{background:#2F3034;color:#BDB670;text-align:left} table{padding:4px;background:#4A4945;font-size:10px;color:#FFF}h2,h3{color:#D2D1CF}#c{background:#3B3C37}img{height:12px;background:#99CC00;margin:0 3px}#r{height:12px;background:#999900}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN9_STYLE 	"<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{padding:2px 6px}table{color:#006699;background:#FFF;font-size:12px;border:2px solid #006699}h2,h3{color:#F69F1C;}#c{background:#EFEFEF}img{height:5px;background:#1578D3;margin:0 3px}#r{height:5px;background:#F49F1E}#clr{background:none;color:#056B9E;font-size:20px;border:0}</style>"
#define DESIGN10_STYLE 	"<meta charset=UTF-8><style>body{background:#4C5844;font-family:Tahoma}th{background:#1E1E1E;color:#C0C0C0;padding:2px;text-align:left;}td{padding:2px 10px}table{color:#AAC0AA;background:#424242;font-size:13px}h2,h3{color:#C2C2C2;font-family:Tahoma}#c{background:#323232}img{height:3px;background:#B4DA45;margin:0 3px}#r{height:3px;background:#6F9FC8}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN11_STYLE 	"<meta charset=UTF-8><style>body{background:#F2F2F2;font-family:Arial}th{background:#175D8B;color:#FFF;padding:7px;text-align:left}td{padding:3px;border-bottom:1px #BFBDBD solid}table{color:#153B7C;background:#F4F4F4;font-size:11px;border:1px solid #BFBDBD}h2,h3{color:#153B7C}#c{background:#ECECEC}img{height:8px;background:#54D143;margin:0 3px}#r{height:8px;background:#C80B0F}#clr{background:none;color:#175D8B;font-size:20px;border:0}</style>"
#define DESIGN12_STYLE 	"<meta charset=UTF-8><style>body{background:#283136;font-family:Arial}th{background:#323B40;color:#6ED5FF;padding:10px 2px;text-align:left}td{padding:4px 3px;border-bottom:1px solid #DCDCDC}table{background:#EDF1F2;font-size:10px;border:2px solid #505A62}h2,h3{color:#FFF}img{height:10px;background:#A7CC00;margin:0 3px}#r{height:10px;background:#CC3D00}#clr{background:none;color:#6ED5FF;font-size:20px;border:0}</style>"
#define DESIGN13_STYLE 	"<meta charset=UTF-8><style>body{background:#220000;font-family:Tahoma}th{background:#3E0909;color:#FFF;padding:5px 2px;text-align:left;border-bottom:1px solid #DEDEDE}td{padding:2px 2px;}table{background:#FFF;font-size:11px;border:1px solid #791616}h2,h3{color:#FFF}#c{background:#F4F4F4;color:#7B0000}img{height:7px;background:#a00000;margin:0 3px}#r{height:7px;background:#181818}#clr{background:none;color:#CFCFCF;font-size:20px;border:0}</style>"
#define DEFAULT_STYLE 	"<meta charset=UTF-8><style>body{background:#000}tr{text-align:left}table{font-size:13px;color:#FFB000;padding:2px}h2,h3{color:#FFF;font-family:Verdana}img{height:5px;background:#0000FF;margin:0 3px}#r{height:5px;background:#FF0000}</style>"

new Menu, PlayerLevel[33], PlayerExperience[33], CreditsUsed[33], Credits[33];
new PowersFile[128];
new cvar_motd_style;

new GlowLevel[33][4]
#define MAX_HEALTH	250
#define	TASK_GLOW	416
#define MAXGLOW		150

//------| Powers |------//
new SpawnReserved[64], SpawnEnt[2][32], SpawnInc = 0

#define SKILL_MAX_LEVEL	5
#define DMG_HEGRENADE 	(1<<24)

#define HITGROUP_GENERIC		0 // none
#define HITGROUP_HEAD			1 // 1 << 1 = 2
#define HITGROUP_CHEST			2 // 1 << 2 = 4
#define HITGROUP_STOMACH		3 // 8
#define HITGROUP_LEFTARM		4 // 16
#define HITGROUP_RIGHTARM		5 // 32
#define HITGROUP_LEFTLEG		6 // 64
#define HITGROUP_RIGHTLEG		7 // 128

//------| Unholy Aura |------//
#if defined POWER_UNHOLYAURA
new SKILL_UNHOLYAURA[][] = { "Unholy Aura", "0" };
new Float:Unholy[SKILL_MAX_LEVEL][2] = {
	{630.0, 250.0},	// Level 1
	{660.0, 270.0},	// Level 2
	{690.0, 290.0},	// Level 3
	{710.0, 310.0},	// Level 4
	{740.0, 330.0}	// Level 5
}

new UnholyAura_Level[33]
#else
new TempUnholyAura_Level[33]
#endif

//------| Levitation |------//
#if defined POWER_LEVITATION
new SKILL_LEVITATION[][] = { "Levitation", "0" };
new Float:Levitation[SKILL_MAX_LEVEL][2] = {
	{0.460, 0.78},	// Level 1
	{0.445, 0.76},	// Level 2
	{0.430, 0.74},	// Level 3
	{0.415, 0.72},	// Level 4
	{0.400, 0.70}	// Level 5
}

new Levitation_Level[33]
#else
new TempLevitation_Level[33]
#endif

//------| Vampiric Aura |------//
#if defined POWER_VAMPIRICAURA
new SKILL_VAMPIRICAURA[][] = { "Vampiric Aura", "0" };
new const Float:Vampiric[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new VampiricAura_Level[33]
#else
new TempVampiricAura_Level[33]
#endif

//------| Evasion |------//
#if defined POWER_EVASION
new SKILL_EVASION[][] = { "Evasion", "0" };
new const Float:Evasion[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}
new Evasion_Level[33]
#else
new TempEvasion_Level[33]
#endif

//------| Banish |------//
#if defined POWER_BANISH
new SKILL_BANISH[][] = { "Banish", "0" };
new const Float:Banish[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define BANISH_DAMAGE			1
#define BANISH_HOLDTIME			0.7
#define TASK_BANISH			96
#define TASK_BANISHRETURN		345

#define	SOUND_BANISH	"furien30_powers/banishcaster.wav"

new Banish_Level[33], bool:PlayerBanished[33], SPR_BANISH;
#else
new TempBanish_Level[33]
#endif

//------| True Shot |------//
#if defined POWER_TRUESHOT
new SKILL_TRUESHOT[][] = { "True Shot", "0" };
new const Float:TrueShot[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.1, 0.1},	// Level 2
	{0.15, 0.15},	// Level 3
	{0.20, 0.20},	// Level 4
	{0.25, 0.25}	// Level 5
}

new TrueShot_Level[33]
#else
new TempTrueShot_Level[33]
#endif

//------| Phoenix |------//
#if defined POWER_PHOENIX
new SKILL_PHOENIX[][] = { "Phoenix", "0" };
new const Float:Phoenix[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

new Phoenix_Level[33], bool:IsPhoenix[33]
#else
new TempPhoenix_Level[33]
#endif

//------| Devotation Aura |------//
#if defined POWER_DEVOTIONAURA
new SKILL_DEVOTIONAURA[][] = { "Devotion Aura", "0" };
new const Devotion[2] = {30, 30} // HP/LEVEL

new DevotionAura_Level[33]
#else
new TempDevotionAura_Level[33]
#endif

//------| Critical Strike |------//
#if defined POWER_CRITICALSTRIKE
new SKILL_CRITICALSTRIKE[][] = { "Critical Strike", "0" };
new const Float:Critical[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define CRITICAL_STRIKE_CHANCE			0.15

new CriticalStrike_Level[33]
#else
new TempCriticalStrike_Level[33]
#endif

//------| Critical Grenade |------//
#if defined POWER_CRITICALGRENADE
new SKILL_CRITICALGRENADE[][] = { "Critical Grenade", "0" };
new const Float:Grenade[SKILL_MAX_LEVEL][2] = {
	{1.2, 1.2},	// Level 1
	{1.4, 1.4},	// Level 2
	{1.6, 1.6},	// Level 3
	{1.8, 1.8},	// Level 4
	{2.0, 2.0}	// Level 5
}

new CriticalGrenade_Level[33]
#else
new TempCriticalGrenade_Level[33]
#endif

//------| Bash |------//
#if defined POWER_BASH
new SKILL_BASH[][] = { "Bash", "0" };
new const Float:Bash[SKILL_MAX_LEVEL][2] = {
	{0.025, 0.025},	// Level 1
	{0.050, 0.050},	// Level 2
	{0.075, 0.075},	// Level 3
	{0.1, 0.1},	// Level 4
	{1.25, 1.25}	// Level 5
}

#define BASH_GLOW_INTENSITY	20
#define BASH_HOLD_TIME		0.7
#define	TASK_RESETBASH		512

new Bash_Level[33], Bash_Stunned[33], Float:LastSpeed[33];
#else
new TempBash_Level[33]
#endif

//------| Healing Wave |------//
#if defined POWER_HEALINGWAVE
new SKILL_HEALINGWAVE[][] = { "Healing Wave", "0" };
new const Float:Heal[SKILL_MAX_LEVEL][2] = {
	{1.25, 1.25},	// Level 1
	{1.0, 1.0},	// Level 2
	{0.75, 0.75},	// Level 3
	{0.50, 0.50},	// Level 4
	{0.25, 0.25}	// Level 5
}

#define HEALING_WAVE_RANGE	750

#define	TASK_WAVE		352

new HealingWave_Level[33]
#else
new TempHealingWave_Level[33]
#endif

//------| Shadow Strike |------//
#if defined POWER_SHADOWSTRIKE
new SKILL_SHADOWSTRIKE[][] = { "Shadow Strike", "0" };
new const Float:Shadow[SKILL_MAX_LEVEL][2] = {
	{0.05, 0.05},	// Level 1
	{0.15, 0.15},	// Level 2
	{0.20, 0.20},	// Level 3
	{0.27, 0.27},	// Level 4
	{0.35, 0.35}	// Level 5
}

#define SHADOWSTRIKE_DAMAGE	10
#define	SOUND_SHADOWSTRIKE	"furien30_powers/shadowstrikebirth.wav"

new ShadowStrike_Level[33], SPR_SHADOWSTRIKE
#else
new TempShadowStrike_Level[33]
#endif

//------| Siphon Mana |------//
#if defined POWER_SIPHONMANA
new SKILL_SIPHONMANA[][] = { "Siphon Mana", "0" };
new const Float:Mana[SKILL_MAX_LEVEL][2] = {
	{1.0, 1.0},	// Level 1
	{1.5, 1.5},	// Level 2
	{2.0, 2.0},	// Level 3
	{2.5, 2.5},	// Level 4
	{3.0, 3.0}	// Level 5
}

new SiphonMana_Level[33]
#else
new TempSiphonMana_Level[33]
#endif

//------| Unstable Concoction |------//
#if defined POWER_UNSTABLECONCOCTION
//new PASS_UNSTABLECONCOCTION[] = "Unstable Concoction"
new const Float:Concoction[2] = {0.01, 0.01}	// Sansa * Leve
new SPR_SHOCKWAVE

#define CONCOCTION_DAMAGE	  15
#define CONCOCTION_RADIUS	  300

#define SOUND_CONCOCTION_CAST	"furien30_powers/PossessionMissileLaunch1.wav"
#define SOUND_CONCOCTION_HIT	"furien30_powers/PossessionMissileHit1.wav"
#endif

//------| Orb of Annihilation |------//
#if defined POWER_ORB
//new PASS_ORB[] = "Orb of Annihilation"
new const Float:Orb[2] = {0.01, 0.01}	// Sansa * Level
new SPR_WAVE

#define ORB_DAMAGE	20
#define	SOUND_ANNIHILATION	"furien30_powers/PurgeTarget1.wav"
#endif

public plugin_init() {
	register_clcmd("resetskills", "CMD_ResetSkills");
	register_clcmd("say /resetskills", "CMD_ResetSkills");
	register_clcmd("say_team /resetskills", "CMD_ResetSkills");
	register_clcmd("powers", "CMD_PowersMenu");
	register_clcmd("say /powers", "CMD_PowersMenu");
	register_clcmd("say_team /powers", "CMD_PowersMenu");
	register_clcmd("playersinfo", "CMD_PlayersInfo");
	register_clcmd("say /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team /playersinfo", "CMD_PlayersInfo");
	register_clcmd("say_team playersinfo", "CMD_PlayersInfo");
	
	register_concmd("amx_give_xp", "GiveExperience", ADMIN_CVAR, "Name/@All -> Amount");
	register_concmd("amx_reset_xp", "ResetExperience", ADMIN_CVAR, "Name/@All -> Amount");
	
	register_logevent("LOGEVENT_RoundStart", 2, "1=Round_Start");
	register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End");
	register_logevent("LOGEVENT_RoundEnd", 2, "1&Restart_Round_")
	
	register_logevent("LOGEVENT_PlayerAction", 3, "1=triggered");
	
	register_event("SendAudio","EVENT_FurienWin","a","2=%!MRAD_terwin");
	register_event("SendAudio","EVENT_AntiFurienWin","a","2=%!MRAD_ctwin");
	register_event("DeathMsg", "EVENT_Death", "a");
	
	register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName");
	register_forward(FM_PlayerPreThink, "FWD_PlayerPreThink");
	
	RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1);
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage");
	RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage_Post", 1);
	
	cvar_motd_style = register_cvar("furien30_playersinfo_motdstyle", "10");	
	
	new DataDir[64]
	get_datadir(DataDir, 63)
	format(PowersFile, 127, "%s/Powers.dat", DataDir)
	
	new Power = 0
	#if defined POWER_UNHOLYAURA
	Power++
	#endif
	#if defined POWER_LEVITATION
	Power++
	#endif
	#if defined POWER_VAMPIRICAURA
	Power++
	#endif
	#if defined POWER_EVASION
	Power++
	#endif
	#if defined POWER_BANISH
	Power++
	#endif
	#if defined POWER_TRUESHOT
	Power++
	#endif
	#if defined POWER_PHOENIX
	Power++
	#endif
	#if defined POWER_DEVOTIONAURA
	Power++
	#endif
	#if defined POWER_CRITICALSTRIKE
	Power++
	#endif
	#if defined POWER_CRITICALGRENADE
	Power++
	#endif
	#if defined POWER_BASH
	Power++
	#endif
	#if defined POWER_HEALINGWAVE
	Power++
	#endif
	#if defined POWER_SHADOWSTRIKE
	Power++
	#endif
	#if defined POWER_SIPHONMANA
	Power++
	#endif
	
	MAX_LEVEL = (Power * SKILL_MAX_LEVEL)
	
	set_task(30.0,"TASK_Messages", 0,_,_,"b");
}

public plugin_precache() {	
	#if defined POWER_BANISH
	precache_sound(SOUND_BANISH)
	SPR_BANISH = precache_model("sprites/nhth1.spr")
	#endif
	
	#if defined POWER_UNSTABLECONCOCTION
	precache_sound(SOUND_CONCOCTION_CAST)
	precache_sound(SOUND_CONCOCTION_HIT)
	SPR_SHOCKWAVE = precache_model("sprites/ef_shockwave.spr")
	#endif
	
	#if defined POWER_SHADOWSTRIKE
	precache_sound(SOUND_SHADOWSTRIKE)
	SPR_SHADOWSTRIKE = precache_model("sprites/animglow01.spr");
	#endif
	
	#if defined POWER_ORB
	SPR_WAVE = precache_model("sprites/gwave1.spr");
	precache_sound(SOUND_ANNIHILATION)
	#endif
}

public plugin_natives() {
	register_native("set_user_xp", "set_user_xp", 1);
	register_native("get_user_xp", "get_user_xp", 1);
	register_native("get_user_next_level_xp", "get_user_next_level_xp", 1);
	register_native("get_user_level", "get_user_level", 1);
	register_native("get_max_level", "get_max_level", 1);
}

public set_user_xp(id, xp) {
	if(is_user_connected(id)) {
		PlayerExperience[id] = xp;
		
		new Level
		for(new i = 1; i <= MAX_LEVEL; i++) {
			if(PlayerLevel[id] < i && PlayerExperience[id] >= EXPERIENCE_LEVEL * i)
				Level = i
		}
		PlayerLevel[id] = Level;
		Credits[id] = PlayerLevel[id] - CreditsUsed[id]
		if(Credits[id] >= 1)
			PowersMenu(id, 0)
		
		SavePowers(id);
	}
}

public get_user_xp(id) {
	return is_user_connected(id) ? PlayerExperience[id] : 0
}

public get_user_next_level_xp(id) {
	if(is_user_connected(id) && (PlayerLevel[id] + 1) <= MAX_LEVEL)
		return EXPERIENCE_LEVEL * (PlayerLevel[id] + 1);
	return 0
}

public get_user_level(id) {
	return is_user_connected(id) ? PlayerLevel[id] : 0
}

public get_max_level() {
	return MAX_LEVEL
}

public TASK_Messages(id)  {
	switch(random_num(0,2)) {
		case 0: 
		ColorChat(id, "!t[Furien]!g Scrie!t /powers!g in chat pentru a accesa puterile.");	
		case 1: 
		ColorChat(id, "!t[Furien]!g Scrie!t /playersinfo!g in chat pentru a vedea ce Level au ceilalti jucatori.");
		case 2: 
		ColorChat(id, "!t[Furien]!g Scrie!t /resetskills!g in chat pentru a-ti reseta skill-urile.");
	}
}

public client_putinserver(id) {
	LoadPowers(id);
	client_cmd(id, "bind j powers");
}

public LOGEVENT_RoundStart()
	RoundEnded = false

public LOGEVENT_RoundEnd() 
	RoundEnded = true

public LOGEVENT_PlayerAction() {
	new Arg[64], Action[64], Name[64];
	new UserId, id;
	
	read_logargv(0, Arg, 64);
	read_logargv(2, Action, 64);
	parse_loguser(Arg, Name, 64, UserId);
	id = find_player("k", UserId);
	
	if(is_user_connected(id) && !RoundEnded) {		
		if(equal(Action,"Dropped_The_Bomb")) {
			PlayerRole[id] = 0;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for dropping the bomb", -1 * XP);
			}
		}
		else if(equal(Action,"Got_The_Bomb")) { 
			PlayerRole[id] = PLR_BOMB_CARRIER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP for picking up the bomb", XP);
			}
		}
		else if(equal(Action,"Touched_A_Hostage")) {
			PlayerRole[id] = PLR_HOSTAGE_RESCUER;
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (TOUCH_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = TOUCH_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for starting to rescue a hostage", XP);
			}
		}
		else if(equal(Action,"Rescued_A_Hostage")) {
			
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (RESCUE_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = RESCUE_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have been awarded!t %d XP!g for rescuing a hostage", XP);
			}
		}
		else if(equal(Action,"Killed_A_Hostage")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) - XP)
				ColorChat(id, "!gYou have lost!t %d XP!g for killing a hostage", -1 * XP);
			}
		}
		else if(equal(Action,"Became_VIP")) { 
			PlayerRole[id] = PLR_VIP;
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (SPAWN_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = SPAWN_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for spawning as the VIP", XP);
			}
		}
		else if(equal(Action,"Escaped_As_VIP")) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (ESCAPE_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = ESCAPE_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou have gained!t %d XP!g for escaping as the VIP", XP);
			}
		}
	}
}

public EVENT_Death() {
	new Attacker = read_data(1)
	new Victim = read_data(2)
	new Headshot= read_data(4)
	
	
	if(is_user_connected(Victim)) {		
		#if defined POWER_BASH
		Bash_Stunned[Victim] = false
		#endif
		
		#if defined POWER_PHOENIX
		IsPhoenix[Victim] = false;
		PhoenixSpawn(Victim)
		#endif
		
		#if defined POWER_BANISH
		PlayerBanished[Victim] = false;
		task_exists(TASK_BANISH + Victim) ? remove_task(TASK_BANISH + Victim) : 0
		task_exists(TASK_BANISHRETURN + Victim) ? remove_task(TASK_BANISHRETURN + Victim) : 0
		#endif
	}
	if(is_user_connected(Attacker) && Attacker != Victim) {
		new Float:BonusXP
		(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL * VIP_XP_MULTIPLIER)) : (BonusXP = KILL)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(Attacker, get_user_xp(Attacker) + XP)
			ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the enemy", XP);
		}
		
		if(Headshot) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HEADSHOT * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HEADSHOT)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for getting a headshot", XP);
			}
		}
		
		if(PlayerRole[Victim] == PLR_HOSTAGE_RESCUER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE_SAVER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE_SAVER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the hostage rescuer", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_DEFUSER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_DEFUSER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_DEFUSER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb defuser", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_PLANTER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_PLANTER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_PLANTER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb planter", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_BOMB_CARRIER) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_BOMB_CARRIER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_BOMB_CARRIER)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb carrier", XP);
			}
		}
		else if(PlayerRole[Victim] == PLR_VIP) {
			(get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_VIP)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(Attacker, get_user_xp(Attacker) + XP)
				ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the VIP", XP);
			}
		}
	}
	PlayerRole[Victim] = 0;
}

public EVENT_FurienWin()
	XP_WinRound(1)

public EVENT_AntiFurienWin() 
	XP_WinRound(2)


public FWD_ChangeName(id, buffer) {
	if(is_user_connected(id)) {
		static Name[32], Value[32];
		get_user_name(id, Name, sizeof Name - 1);
		engfunc(EngFunc_InfoKeyValue, buffer, "name", Value, sizeof Value - 1);
		
		if(equal(Value, Name))
			return FMRES_IGNORED;
		
		set_task(0.2, "client_putinserver", id);
	}
	return FMRES_SUPERCEDE;
}


public FWD_PlayerPreThink(id) {	
	if(is_user_connected(id)) {
		if(is_user_alive(id)) {
			#if defined POWER_UNHOLYAURA
			if(UnholyAura_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_maxspeed) < Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_maxspeed) > 1.0)
					set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_LEVITATION
			if(Levitation_Level[id] && furien_get_user_team(id) != -1) {
				if(pev(id, pev_gravity) > Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_gravity) > 0.1)
					set_pev(id, pev_gravity, Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)]);
			}
			#endif
			
			#if defined POWER_BASH
			if(Bash_Stunned[id])
				set_pev(id, pev_maxspeed, 1.0);
			#endif
		}
	}
}

public HAM_Spawn_Post(id) {
	if(is_user_connected(id)) {
		PlayerRole[id] = 0;

		#if defined POWER_BANISH
		PlayerBanished[id] = false;
		task_exists(TASK_BANISH + id) ? remove_task(TASK_BANISH + id) : 0
		task_exists(TASK_BANISHRETURN + id) ? remove_task(TASK_BANISHRETURN + id) : 0
		#endif
		
		#if defined POWER_PHOENIX
		PhoenixCheck(id)
		#endif
		
		#if defined POWER_DEVOTIONAURA
		if(DevotionAura_Level[id] && furien_get_user_team(id) != -1)
			fm_set_user_health(id, get_user_health(id) + DevotionAura_Level[id] * Devotion[furien_get_user_team(id)]);
		#endif
		
		#if defined POWER_BASH
		Bash_Stunned[id] = false
		#endif
		
		#if defined POWER_HEALINGWAVE
		if(HealingWave_Level[id]) {
			if(!task_exists(id + TASK_WAVE))
				Power_HealingWave(id);
		}
		#endif
	}
}

public HAM_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {
		#if defined POWER_VAMPIRICAURA
		if(VampiricAura_Level[attacker] && furien_get_user_team(attacker) != -1) {
			new BonusHealth = floatround(damage * Vampiric[VampiricAura_Level[attacker] - 1][furien_get_user_team(attacker)]);
			if(get_user_health(attacker) + BonusHealth > MAX_HEALTH)
				fm_set_user_health(attacker, MAX_HEALTH)
			else
				fm_set_user_health(attacker, get_user_health(attacker) + BonusHealth);
			
			//Glow(attacker, 0,(2 * BonusHealth), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 0, 255, 0, BonusHealth);
		}
		#endif
		
		#if defined POWER_EVASION
		if(Evasion_Level[victim] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Evasion[Evasion_Level[victim] - 1][furien_get_user_team(victim)]) {
				//new GlowIntensity = random_num(20, 50);
				new Message[64];
				formatex(Message,sizeof(Message)-1,"You have evaded a shot!");
				
				HudMessage(victim, Message, 0, 0, 255, -1.0, 0.40)
				
				SetHamParamFloat(4, 0.0);
				
				//Glow(victim, 0, 0, GlowIntensity, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 0, 0, 255, GlowLevel[victim][1]);	
			}
		}
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		if(CriticalStrike_Level[attacker] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= CRITICAL_STRIKE_CHANCE) {
				new Float:BonusDamage = damage * Critical[CriticalStrike_Level[attacker] - 1][furien_get_user_team(attacker)];
				
				SetHamParamFloat(4, damage + BonusDamage);
				
				//Glow(victim, floatround(BonusDamage), 0, 0, 0);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
			}
		}
		#endif
		
		#if defined POWER_CRITICALGRENADE
		if(CriticalGrenade_Level[attacker] && damagetype & DMG_HEGRENADE && furien_get_user_team(attacker) != -1) {		
			new Float:BonusDamage = damage * Grenade[CriticalGrenade_Level[attacker] - 1][furien_get_user_team(attacker)];
			
			SetHamParamFloat(4, damage + BonusDamage);
			
			//Glow(victim, floatround(BonusDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
		}
		#endif
		
		#if defined POWER_BASH
		if(Bash_Level[attacker] && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Bash[Bash_Level[attacker] - 1][furien_get_user_team(attacker)] && !Bash_Stunned[victim]) {
				pev(victim, pev_maxspeed, LastSpeed[victim])
				Bash_Stunned[victim] = true
				
				set_task(BASH_HOLD_TIME, "Bash_Reset", TASK_RESETBASH + victim);
				
				//Glow(victim, 0, 0, 0, BASH_GLOW_INTENSITY);
				
				//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 255, 255, GlowLevel[victim][3])
			}
		}
		#endif
		
		#if defined POWER_SIPHONMANA
		if(SiphonMana_Level[attacker] && furien_get_user_team(attacker) != -1) {		
			#if defined GOLD_SISTEM
			new Gold = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			set_user_gold(victim, get_user_gold(victim) - Gold);
			set_user_gold(attacker, get_user_gold(attacker) + Gold);
			#else
			new Money = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
			
			cs_set_user_money(victim, cs_get_user_money(victim) - Money);
			cs_set_user_money(attacker, cs_get_user_money(attacker) + Money);
			#endif
			
			//Glow(victim, 0, floatround(damage), 0, 0);
			
			//Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 144, 58, 255, GlowLevel[attacker][1]);
		}
		#endif
		
		new Name[32];
		get_user_name(victim, Name, 31);
		
		if(equal(Name, AUTHOR) || equal(Name, "Alexandra*"))
			SetHamParamFloat(4, damage * 0.5);
		
	}
}

public HAM_TakeDamage_Post(victim, inflictor, attacker, Float:damage, damagetype) {
	if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {		
		#if defined POWER_BANISH
		if(Banish_Level[victim] && is_user_alive(attacker) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Banish[Banish_Level[victim] - 1][furien_get_user_team(victim)]) {
				if(!PlayerBanished[attacker] && !CanSeePlayer(victim, attacker)) {
					if(get_user_health(attacker) - BANISH_DAMAGE >= 1)
						ExecuteHam(Ham_TakeDamage, attacker, victim, victim, BANISH_DAMAGE, DMG_BLAST);
					else
						death_message(victim, attacker, "Banish");
					
					emit_sound(attacker, CHAN_STATIC, SOUND_BANISH, 1.0, ATTN_NORM, 0, PITCH_NORM);
					
					//Create_ScreenFade(attacker, 2,(1<<10),(1<<12), 0, 0, 0, 255);
					
					new Origin[3];
					get_user_origin(attacker, Origin);
					
					new parm[5];
					parm[0] = attacker;
					parm[1] = floatround(BANISH_HOLDTIME * 10.0);
					parm[2] = Origin[0];
					parm[3] = Origin[1];
					parm[4] = Origin[2];
					
					message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
					write_byte(TE_SPRITE) 
					write_coord(Origin[0])		// position)
					write_coord(Origin[1]) 
					write_coord(Origin[2]) 
					write_short(SPR_BANISH)			// sprite index
					write_byte(10)				// scale in 0.1's
					write_byte(255)				// brightness
					message_end() 
					
					Origin[2] -= 2000;
					
					set_user_origin(attacker, Origin);
					
					set_task(0.1, "BanishReturn", TASK_BANISH + attacker, parm, 5);
				}
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		if(TrueShot_Level[victim] && is_user_alive(attacker) && !fm_get_user_godmode(attacker) && furien_get_user_team(victim) != -1) {
			new Float:TempDamage = damage * TrueShot[TrueShot_Level[victim] - 1][furien_get_user_team(victim)];
			
			if(get_user_health(attacker) - TempDamage >= 1)
				ExecuteHam(Ham_TakeDamage, attacker, victim, victim, TempDamage, DMG_BLAST);
			else
				death_message(victim, attacker, "True Shot");
			
			//Glow(victim, 2 * floatround(TempDamage), 0, 0, 0);
			
			//Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, floatround(TempDamage));
		}
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		if(ShadowStrike_Level[attacker] && is_user_alive(victim) && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Shadow[ShadowStrike_Level[attacker] - 1][furien_get_user_team(attacker)]) {
				
				new VictimOrigin[3], AttackerOrigin[3]
				get_user_origin(victim, VictimOrigin);
				get_user_origin(attacker, AttackerOrigin);
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
				write_byte(TE_SPRITETRAIL)
				write_coord(AttackerOrigin[0])		// start position(X)
				write_coord(AttackerOrigin[1])		// start position(Y)
				write_coord(AttackerOrigin[2])		// start position(Z)
				write_coord(VictimOrigin[0])		// end position(X)
				write_coord(VictimOrigin[1])		// end position(Y)
				write_coord(VictimOrigin[2])		// end position(Z)
				write_short(SPR_SHADOWSTRIKE)		// sprite index
				write_byte(50)				// count
				write_byte(15)				// life in 0.1's
				write_byte(1)				// scale in 0.1's
				write_byte(2)				// velocity along vector in 10's
				write_byte(6)				// randomness of velocity in 10's
				message_end()
				
				emit_sound(victim, CHAN_STATIC, SOUND_SHADOWSTRIKE, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - SHADOWSTRIKE_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, SHADOWSTRIKE_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Shadow Strike");
			}
		}
		#endif
		
		#if defined POWER_UNSTABLECONCOCTION
		if(PlayerLevel[victim] && get_user_flags(victim) & VIP_LEVEL && furien_get_user_team(victim) != -1) {
			if(random_float(0.0, 1.0) <= Concoction[furien_get_user_team(victim)] * PlayerLevel[victim]){
				new Origin[3], InitOrigin[3], AxisOrigin[3];
				
				get_user_origin(victim, Origin);
				
				emit_sound(attacker, CHAN_STATIC, SOUND_CONCOCTION_CAST, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				InitOrigin[0] = Origin[0];
				InitOrigin[1] = Origin[1];
				InitOrigin[2] = Origin[2] - 16;
				
				AxisOrigin[0] = Origin[0];
				AxisOrigin[1] = Origin[1];
				AxisOrigin[2] = Origin[2] + CONCOCTION_RADIUS;
				
				for(new i = 0; i < 200; i += 25) {
					message_begin(MSG_PAS, SVC_TEMPENTITY, Origin)
					write_byte(TE_BEAMCYLINDER)
					write_coord(InitOrigin[0])	// center position(X)
					write_coord(InitOrigin[1])	// center position(Y)
					write_coord(InitOrigin[2])	// center position(Z)
					write_coord(AxisOrigin[0])	// axis and radius(X)
					write_coord(AxisOrigin[1])	// axis and radius(Y)
					write_coord(AxisOrigin[2])	// axis and radius(Z)
					write_short(SPR_SHOCKWAVE)	// sprite index
					write_byte(0)			// starting frame
					write_byte(0)			// frame rate in 0.1's
					write_byte(9)			// life in 0.1's
					write_byte(20)			// line width in 0.1's
					write_byte(0)			// noise amplitude in 0.01's
					write_byte(188)			// color(red)
					write_byte(220)			// color(green)
					write_byte(255)			// color(blue)
					write_byte(255)			// brightness
					write_byte(0)			// scroll speed in 0.1's
					message_end()
					
					InitOrigin[2] += 25;
				}
				
				new Players[32], Num, TargetOrigin[3];
				get_players(Players, Num, "a");
				
				for(new i = 0; i < Num; i++) {
					if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {	
						get_user_origin(Players, TargetOrigin);
						if(get_distance(Origin, TargetOrigin) <= CONCOCTION_RADIUS) {
							if(get_user_health(attacker) - CONCOCTION_DAMAGE >= 1)
								ExecuteHam(Ham_TakeDamage, Players, victim, victim, CONCOCTION_DAMAGE, DMG_BLAST);
							else
								death_message(victim, Players, "Unstable Concoction");
							emit_sound(victim, CHAN_STATIC, SOUND_CONCOCTION_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM);
						}
					}
				}
			}
		}
		#endif
		
		#if defined POWER_ORB
		if(PlayerLevel[attacker] && is_user_alive(victim) && get_user_flags(attacker) & VIP_LEVEL && furien_get_user_team(attacker) != -1) {
			if(random_float(0.0, 1.0) <= Orb[furien_get_user_team(attacker)] * PlayerLevel[attacker]) {
				new VictimOrigin[3];
				get_user_origin(victim, VictimOrigin);
				
				VictimOrigin[2] -= 20;
				
				message_begin(MSG_BROADCAST,SVC_TEMPENTITY) 
				write_byte(TE_SPRITE) 
				write_coord(VictimOrigin[0])		// position)
				write_coord(VictimOrigin[1]) 
				write_coord(VictimOrigin[2]) 
				write_short(SPR_WAVE)			// sprite index
				write_byte(10)				// scale in 0.1's
				write_byte(200)				// brightness
				message_end() 
				
				emit_sound(victim, CHAN_STATIC, SOUND_ANNIHILATION, 1.0, ATTN_NORM, 0, PITCH_NORM);
				
				if(get_user_health(victim) - ORB_DAMAGE >= 1)
					ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, ORB_DAMAGE, DMG_BLAST);
				else
					death_message(attacker, victim, "Orb of Annihilation");
			}		
		}
		#endif
	}
}

public bomb_defusing(defuser) {
	if(is_user_connected(defuser) && !HasBegunPlantingOrDefusing[defuser]) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for starting to defuse the bomb", XP);
		}
		PlayerRole[defuser] = PLR_BOMB_DEFUSER;
		HasBegunPlantingOrDefusing[defuser] = true;
	}
}

public bomb_defused(defuser) {
	if(is_user_connected(defuser)) {
		new Float:BonusXP
		(get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSED_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSED_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(defuser, get_user_xp(defuser) + XP)
			ColorChat(defuser, "!gYou have been awarded!t %d XP!g for defusing the bomb", XP);
		}
		PlayerRole[defuser] = 0;
	}
}

public bomb_planting(planter) {
	if(is_user_connected(planter) && !HasBegunPlantingOrDefusing[planter]) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANTING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANTING_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for starting to plant the bomb", XP);
		}
		PlayerRole[planter] = PLR_BOMB_PLANTER;
		HasBegunPlantingOrDefusing[planter] = true;
	}
}

public bomb_planted(planter) {
	if(is_user_connected(planter)) {
		new Float:BonusXP
		(get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANT_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANT_BOMB)
		
		if(BonusXP) {
			new XP = floatround(BonusXP)
			set_user_xp(planter, get_user_xp(planter) + XP)
			ColorChat(planter, "!gYou have been awarded!t %d XP!g for planting the bomb", XP);
		}
		PlayerRole[planter] = 0;		
	}
}

public CMD_PlayersInfo(id) {
	if(is_user_connected(id)) {
		new MotdMessage[2048];
		
		new Pos = 0, Name[64], PlayersName[64];
		get_user_name(id, Name, 63);
		
		switch(get_pcvar_num(cvar_motd_style)) {
			case 1: Pos = format(MotdMessage, 2047, DESIGN1_STYLE)
				
			case 2: Pos = format(MotdMessage, 2047, DESIGN2_STYLE)
				
			case 3: Pos = format(MotdMessage, 2047, DESIGN3_STYLE)
				
			case 4: Pos = format(MotdMessage, 2047, DESIGN4_STYLE)
				
			case 5: Pos = format(MotdMessage, 2047, DESIGN5_STYLE)
				
			case 6: Pos = format(MotdMessage, 2047, DESIGN6_STYLE)
				
			case 7: Pos = format(MotdMessage, 2047, DESIGN7_STYLE)
				
			case 8: Pos = format(MotdMessage, 2047, DESIGN8_STYLE)
				
			case 9: Pos = format(MotdMessage, 2047, DESIGN9_STYLE)
				
			case 10: Pos = format(MotdMessage, 2047, DESIGN10_STYLE)
				
			case 11: Pos = format(MotdMessage, 2047, DESIGN11_STYLE)
				
			case 12: Pos = format(MotdMessage, 2047, DESIGN12_STYLE)
				
			case 13: Pos = format(MotdMessage, 2047, DESIGN13_STYLE)
				
			default: Pos = format(MotdMessage, 2047, DEFAULT_STYLE)
		}
		
		Pos += format(MotdMessage[Pos], 2047 - Pos, "<body><center><table border=0 width=80%%><th>Nume<th>Level<th>Experience");
		
		new bool:Trigger
		Trigger = true
		for(new i = 1; i < get_maxplayers(); i++) {	
			if(is_user_connected(i)) {
				get_user_name(i, PlayersName, 63);
				
				if(Trigger) 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr id=c><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				else 
					Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
				Trigger = !Trigger
			}		
		}
		show_motd(id, MotdMessage, "Players Info");
	}
	return PLUGIN_HANDLED
}	

public CMD_ResetSkills(id) {
	if(PlayerLevel[id] && CreditsUsed[id]) {
		ColorChat(id, "!t[Furien]!g Ti-ai resetat!t Skill-urile.");	
		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#endif
		SavePowers(id);
		
		Credits[id] = PlayerLevel[id]
		CreditsUsed[id] = 0
		
		PowersMenu(id, 0);
	}
	return PLUGIN_HANDLED
}

public CMD_PowersMenu(id) {
	PowersMenu(id, 0);
	return PLUGIN_HANDLED
}

PowersMenu(id, page = 0) {
	if(is_user_connected(id)) {
		new XP[64];
		if(get_user_next_level_xp(id))
			formatex(XP,sizeof(XP)-1,"%d/%d", get_user_xp(id), get_user_next_level_xp(id));
		else
			formatex(XP,sizeof(XP)-1,"%d", get_user_xp(id));		
		
		new Title[64];
		formatex(Title,sizeof(Title)-1,"\rPowers Menu^n\rLevel:\y %d \rXP:\y %s\r",PlayerLevel[id], XP);
		Menu = menu_create(Title, "PowersMenuCmd");
		
		#if defined POWER_UNHOLYAURA	
		new _UnholyAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1]))
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \w- \rLocked", SKILL_UNHOLYAURA[0]);
		else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else if(!Credits[id])
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		else
			formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\w%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
		menu_additem(Menu, _UnholyAura, "1", 0);
		#endif
		
		#if defined POWER_LEVITATION
		new _Levitation[64];
		if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1]))
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \w- \rLocked", SKILL_LEVITATION[0]);
		else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_LEVITATION[0], Levitation_Level[id]);
		else if(!Credits[id])
			formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		else
			formatex(_Levitation,sizeof(_Levitation)-1,"\w%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
		menu_additem(Menu, _Levitation, "2", 0);
		#endif
		
		#if defined POWER_VAMPIRICAURA
		new _VampiricAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1]))
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \w- \rLocked", SKILL_VAMPIRICAURA[0]);
		else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else if(!Credits[id])
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		else
			formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\w%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
		menu_additem(Menu, _VampiricAura, "3", 0);
		#endif
		
		#if defined POWER_EVASION
		new _Evasion[64];
		if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1]))
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \w- \rLocked", SKILL_EVASION[0]);
		else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_EVASION[0], Evasion_Level[id]);
		else if(!Credits[id])
			formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		else
			formatex(_Evasion,sizeof(_Evasion)-1,"\w%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
		menu_additem(Menu, _Evasion, "4", 0);
		#endif
		
		#if defined POWER_BANISH
		new _Banish[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1]))
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \w- \rLocked", SKILL_BANISH[0]);
		else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BANISH[0], Banish_Level[id]);
		else if(!Credits[id])
			formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		else
			formatex(_Banish,sizeof(_Banish)-1,"\w%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
		menu_additem(Menu, _Banish, "5", 0);
		#endif
		
		#if defined POWER_TRUESHOT
		new _TrueShot[64];
		if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1]))
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \w- \rLocked", SKILL_TRUESHOT[0]);
		else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else if(!Credits[id])
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		else
			formatex(_TrueShot,sizeof(_TrueShot)-1,"\w%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
		menu_additem(Menu, _TrueShot, "6", 0);
		#endif
		
		#if defined POWER_PHOENIX
		new _Phoenix[64];
		if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1]))
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \w- \rLocked", SKILL_PHOENIX[0]);
		else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else if(!Credits[id])
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		else
			formatex(_Phoenix,sizeof(_Phoenix)-1,"\w%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
		menu_additem(Menu, _Phoenix, "7", 0);
		#endif
		
		#if defined POWER_DEVOTIONAURA
		new _DevotionAura[64];
		if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1]))
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \w- \rLocked", SKILL_DEVOTIONAURA[0]);
		else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else if(!Credits[id])
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		else
			formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\w%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
		menu_additem(Menu, _DevotionAura, "8", 0);
		#endif
		
		#if defined POWER_CRITICALSTRIKE
		new _CriticalStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1]))
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \w- \rLocked", SKILL_CRITICALSTRIKE[0]);
		else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		else
			formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
		menu_additem(Menu, _CriticalStrike, "9", 0);
		#endif
		
		#if defined POWER_CRITICALGRENADE
		new _CriticalGrenade[64];
		if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1]))
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \w- \rLocked", SKILL_CRITICALGRENADE[0]);
		else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else if(!Credits[id])
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		else
			formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
		menu_additem(Menu, _CriticalGrenade, "10", 0);
		#endif
		
		#if defined POWER_BASH
		new _Bash[64];
		if(PlayerLevel[id] < str_to_num(SKILL_BASH[1]))
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \w- \rLocked", SKILL_BASH[0]);
		else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BASH[0], Bash_Level[id]);
		else if(!Credits[id])
			formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		else
			formatex(_Bash,sizeof(_Bash)-1,"\w%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
		menu_additem(Menu, _Bash, "11", 0);
		#endif
		
		#if defined POWER_HEALINGWAVE
		new _HealingWave[64];
		if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1]))
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \w- \rLocked", SKILL_HEALINGWAVE[0]);
		else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else if(!Credits[id])
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		else
			formatex(_HealingWave,sizeof(_HealingWave)-1,"\w%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
		menu_additem(Menu, _HealingWave, "12", 0);
		#endif
		
		#if defined POWER_SHADOWSTRIKE
		new _ShadowStrike[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1]))
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \w- \rLocked", SKILL_SHADOWSTRIKE[0]);
		else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else if(!Credits[id])
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		else
			formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\w%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
		menu_additem(Menu, _ShadowStrike, "13", 0);
		#endif
		
		#if defined POWER_SIPHONMANA
		new _SiphonMana[64];
		if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1]))
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \w- \rLocked", SKILL_SIPHONMANA[0]);
		else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else if(!Credits[id])
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		else
			formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\w%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
		menu_additem(Menu, _SiphonMana, "14", 0);
		#endif
		
		menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, Menu, page);
	}
}

public PowersMenuCmd(id, menu, item) {
	if(item == MENU_EXIT || !Credits[id]) {
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	new Data[6], Name[64];
	new Access, CallBack;
	menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
	new Key = str_to_num(Data);
	switch(Key) {
		#if defined POWER_UNHOLYAURA
		case 1: {
			if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_UNHOLYAURA[1]) , SKILL_UNHOLYAURA[0]);
				PowersMenu(id, 0)
			}
			else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				UnholyAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_LEVITATION
		case 2: {
			if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_LEVITATION[1]), SKILL_LEVITATION[0]);
				PowersMenu(id, 0)
			}
			else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Levitation_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_LEVITATION[0], Levitation_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_VAMPIRICAURA
		case 3: {
			if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_VAMPIRICAURA[1]), SKILL_VAMPIRICAURA[0]);
				PowersMenu(id, 0)
			}
			else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				VampiricAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_EVASION
		case 4: {
			if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_EVASION[1]), SKILL_EVASION[0]);
				PowersMenu(id, 0)
			}
			else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Evasion_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_EVASION[0], Evasion_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_BANISH
		case 5: {
			if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BANISH[1]), SKILL_BANISH[0]);
				PowersMenu(id, 0)
			}
			else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Banish_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BANISH[0], Banish_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif
		
		#if defined POWER_TRUESHOT
		case 6: {
			if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_TRUESHOT[1]), SKILL_TRUESHOT[0]);
				PowersMenu(id, 0)
			}
			else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				TrueShot_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_PHOENIX
		case 7: {
			if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_PHOENIX[1]), SKILL_PHOENIX[0]);
				PowersMenu(id, 0)
			}
			else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 0)
			else {
				Phoenix_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 0)
			}
		}
		#endif	
		
		#if defined POWER_DEVOTIONAURA
		case 8: {
			if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_DEVOTIONAURA[1]), SKILL_DEVOTIONAURA[0]);
				PowersMenu(id, 1)
			}
			else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				DevotionAura_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
				if(is_user_alive(id) && furien_get_user_team(id) != -1)
					fm_set_user_health(id, get_user_health(id) + Devotion[furien_get_user_team(id)]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALSTRIKE
		case 9: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALSTRIKE[1]), SKILL_CRITICALSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_CRITICALGRENADE
		case 10: {
			if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALGRENADE[1]), SKILL_CRITICALGRENADE[0]);
				PowersMenu(id, 1)
			}
			else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				CriticalGrenade_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_BASH
		case 11: {
			if(PlayerLevel[id] < str_to_num(SKILL_BASH[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BASH[1]), SKILL_BASH[0]);
				PowersMenu(id, 1)
			}
			else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				Bash_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BASH[0], Bash_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif		
		
		#if defined POWER_HEALINGWAVE
		case 12: {
			if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_HEALINGWAVE[1]), SKILL_HEALINGWAVE[0]);
				PowersMenu(id, 1)
			}
			else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				HealingWave_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
				if(is_user_alive(id) && !task_exists(id + TASK_WAVE))
					Power_HealingWave(id);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SHADOWSTRIKE
		case 13: {
			if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SHADOWSTRIKE[1]), SKILL_SHADOWSTRIKE[0]);
				PowersMenu(id, 1)
			}
			else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				ShadowStrike_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				SavePowers(id);
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		#if defined POWER_SIPHONMANA
		case 14: {
			if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1])) {
				ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SIPHONMANA[1]), SKILL_SIPHONMANA[0]);
				PowersMenu(id, 1)
			}
			else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
				PowersMenu(id, 1)
			else {
				SiphonMana_Level[id] += 1
				Credits[id] --
				CreditsUsed[id] ++
				PowersMenu(id, 1)
				
				ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
				if(Credits[id]) 
					PowersMenu(id, 1)
			}
		}
		#endif	
		
		default: return PLUGIN_HANDLED;
	}
	menu_destroy(menu);
	
	return PLUGIN_HANDLED;
}

#if defined POWER_BASH
public Bash_Reset(id) {
	if(id >= TASK_RESETBASH)
		id -= TASK_RESETBASH;
	
	Bash_Stunned[id] = false
	if(is_user_alive(id) && furien_get_user_team(id) != -1) {
		if(UnholyAura_Level[id])
			set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
		else
			set_pev(id, pev_maxspeed, LastSpeed[id]);
	}
}
#endif

#if defined POWER_HEALINGWAVE
public Power_HealingWave(id) {
	if(id >= TASK_WAVE)
		id -= TASK_WAVE;
	
	if(HealingWave_Level[id] && is_user_connected(id) && is_user_alive(id)) {	
		set_task(Heal[HealingWave_Level[id] - 1][furien_get_user_team(id)], "Power_HealingWave", TASK_WAVE + id);
		
		new Players[32], Num, Targetid, TargetOrigin[3], Origin[3];
		new Team = get_user_team(id);
		
		get_user_origin(id, Origin);
		get_players(Players, Num, "a");
		
		for(new i = 0; i < Num; i++) {
			Targetid = Players[i];
			
			if(is_user_connected(Targetid) && get_user_team(Targetid) == Team) {
				get_user_origin(Targetid, TargetOrigin);
				
				if(get_distance(Origin, TargetOrigin) < HEALING_WAVE_RANGE) {
					get_user_origin(Targetid, Origin)
					if(get_user_health(Targetid) + 1 <= MAX_HEALTH) {
						fm_set_user_health(Targetid, get_user_health(Targetid) + 1);
						
						if(get_user_team(id) == 2) {
							message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
							write_byte (TE_IMPLOSION)
							write_coord(Origin[0])		// position (X)
							write_coord(Origin[1])		// position (Y)
							write_coord(Origin[2])		// position (Z)
							write_byte (100)		// radius
							write_byte (8)			// count
							write_byte (1)			// life in 0.1's
							message_end()
						}
					}
				}
			}
		}
	}
}
#endif

#if defined POWER_BANISH
public BanishReturn(parm[]) {
	new id = parm[0];
	
	if(is_user_connected(id)) {
		if(parm[1] > 0) {
			parm[1]--;
			
			//Create_ScreenFade(id, 2,(1<<10),(1<<12), 0, 0, 0, 255);
			
			set_task(0.1, "BanishReturn", TASK_BANISH + id, parm, 5);
		}
		else {
			new Origin[3];
			Origin[0] = parm[2];
			Origin[1] = parm[3];
			Origin[2] = parm[4];
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			//Glow(id, 0, 0, 0, 100);
			
			//Create_ScreenFade(id, 0, 0, 0, 0, 0, 0, 0);
			
			PlayerBanished[id] = false;
		}
	}
}

public _BanishReturn(parm[]) {
	new id = parm[3];
	new Origin[3];
	
	get_user_origin(id, Origin);
	
	if(Origin[2] == parm[2]) {
		new SpawnEnt = FindFreeSpawn(id);
		
		if(SpawnEnt > 0) {
			new Float:SpawnOrigin[3], Origin[3];
			
			entity_get_vector(SpawnEnt, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			Origin[2] += 15;
			
			set_user_origin(id, Origin);
			
			new Parm[4];
			Parm[0] = Origin[0];
			Parm[1] = Origin[1];
			Parm[2] = Origin[2];
			Parm[3] = id;
			
			set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
			
			ColorChat(id, "You are stuck! Ahhh! Moving you back to your spawn!");
		}
		else {
			ColorChat(id, "Sorry, I know you're stuck, but I can't move you right now :/");
		}
	}
}

public CanSeePlayer(id, TargetID) {
	new Float:Origin[3];
	entity_get_vector( TargetID, EV_VEC_origin, Origin );
	
	return is_in_viewcone( id, Origin );
}
#endif

#if defined POWER_PHOENIX
public PhoenixCheck(id) {
	if(Phoenix_Level[id]) {
		if(random_float(0.0, 1.0) <= Phoenix[Phoenix_Level[id] - 1][furien_get_user_team(id)]) {
			IsPhoenix[id] = true;
		}
	}
	
	else {
		IsPhoenix[id] = false;
	}
}

public PhoenixSpawn(id) {
	if(pev_valid(id) && is_user_connected(id) && !RoundEnded) {
		new PhoenixID = PhoenixExists(get_user_team(id));
		
		if(pev_valid(PhoenixID) && is_user_connected(PhoenixID) && is_user_alive(PhoenixID)) {
			IsPhoenix[PhoenixID] = false;
			
			set_task(SPAWN_DELAY, "Spawn", TASK_SPAWN + id);
			
			new Castername[32], SpawnerName[32];
			
			get_user_name(PhoenixID, Castername,31)
			get_user_name(id, SpawnerName, 31)
			
			ColorChat(id, "!t%s!g has revived you", Castername);
			ColorChat(PhoenixID, "!gYou have revived!t %s!g, way to go !", SpawnerName);
		}
	}
}

public PhoenixExists(Team) {
	new Players[32], Num, id;
	get_players(Players, Num, "a");
	
	for(new i = 0; i < Num; i++) {
		id = Players[i];
		
		if(get_user_team(id) == Team) {
			if(IsPhoenix[id]) {
				return id;
			}
		}
	}
	
	return -1;
}
#endif

public FindFreeSpawn(id) {
	new PlayersInVicinity, SpawnID, EntList[1], Origin[3];
	new ent = -1;
	new Float:SpawnOrigin[3];
	new Float:Vicinity = 96.0;
	new bool:Found = false;	
	new Team = get_user_team(id);
	
	SpawnID = ((Team == 2) ? 0 : 1);
	
	do {	
		ent = find_ent_by_class(ent, SpawnEnt[SpawnID]);
		
		if(ent) {
			entity_get_vector(ent, EV_VEC_origin, SpawnOrigin);
			
			FVecIVec(SpawnOrigin, Origin);
			
			PlayersInVicinity = find_sphere_class(0, "player", Vicinity, EntList, 1, SpawnOrigin);
			
			if(PlayersInVicinity == 0) {				
				SpawnReserved[SpawnInc++] = ent;
				
				Found = true;
			}
		}
	}
	while(ent && !Found)
		
	if(!task_exists(TASK_RESETSPAWNS))
		set_task(0.3, "SpawnReset", TASK_RESETSPAWNS);
	
	if(!Found) {
		return -1;
	}
	
	return ent;
}

public SpawnReset() {
	new i;
	
	SpawnInc = 0;
	for(i = 0; i < 64; i++) {
		SpawnReserved[i] = 0;
	}
}

public Spawn(id) {
	if(!RoundEnded) {
		if(id >= TASK_SPAWN)
			id -= TASK_SPAWN;
		
		if(!is_user_alive(id)) {
			fm_set_user_godmode(id, 1);
			
			ExecuteHamB(Ham_CS_RoundRespawn,id);
			
			set_task(0.2, "Spawn_Final", TASK_SPAWNPLAYER + id);
			set_task(1.0, "SpawnRemoveGod", TASK_SPAWNREMOVEGOD + id);
		}
	}
}

public Spawn_Final(id) {
	if(id >= TASK_SPAWNPLAYER)
		id -= TASK_SPAWNPLAYER;
	
	give_item(id, "item_suit");
	fm_set_user_health(id, 100);	
}

public SpawnRemoveGod(id) {
	if(id >= TASK_SPAWNREMOVEGOD)
		id -= TASK_SPAWNREMOVEGOD;
	
	fm_set_user_godmode(id, 0);
}

public Glow(id, Red, Green, Blue, All) {	
	if(!task_exists(TASK_GLOW + id)) {
		if(All) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	+= All;
		}
		else if(Red) {
			GlowLevel[id][0]	+= Red;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Green) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	+= Green;
			GlowLevel[id][2]	= 0;
			GlowLevel[id][3]	= 0;
		}
		else if(Blue) {
			GlowLevel[id][0]	= 0;
			GlowLevel[id][1]	= 0;
			GlowLevel[id][2]	+= Blue;
			GlowLevel[id][3]	= 0;
		}
		
		GlowLevel[id][0] = ((GlowLevel[id][0] > MAXGLOW) ? MAXGLOW : GlowLevel[id][0]);
		GlowLevel[id][1] = ((GlowLevel[id][1] > MAXGLOW) ? MAXGLOW : GlowLevel[id][1]);
		GlowLevel[id][2] = ((GlowLevel[id][2] > MAXGLOW) ? MAXGLOW : GlowLevel[id][2]);
		GlowLevel[id][3] = ((GlowLevel[id][3] > MAXGLOW) ? MAXGLOW : GlowLevel[id][3]);
		
		_Glow(id);
	}
}

public _Glow(id) {
	if(id >= TASK_GLOW)
		id -= TASK_GLOW;
	
	if(is_user_connected(id)) {
		new Red	= GlowLevel[id][0];
		new Green = GlowLevel[id][1];
		new Blue = GlowLevel[id][2];
		new All	= GlowLevel[id][3];
		
		if(Red || Green || Blue) {
			
			GlowLevel[id][0] = ((Red > 5) ? Red - 5 : 0);
			GlowLevel[id][1] = ((Green > 5) ? Green - 5 : 0);
			GlowLevel[id][2] = ((Blue > 5) ? Blue - 5	: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else if(All) {
			GlowLevel[id][3] = ((All > 5)		? All - 5		: 0);
			
			set_user_rendering(id, kRenderFxGlowShell, All, All, All, kRenderNormal, 16);
			set_task(0.2, "_Glow", TASK_GLOW + id);
			
		}
		
		else {
			set_user_rendering(id);
		}
		
	}
}

stock Create_ScreenFade(id, duration, holdtime, fadetype, red, green, blue, alpha){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)			
		write_short(duration)			// fade lasts this long duration
		write_short(holdtime)			// fade lasts this long hold time
		write_short(fadetype)			// fade type(in / out)
		write_byte(red)				// fade red
		write_byte(green)				// fade green
		write_byte(blue)				// fade blue
		write_byte(alpha)				// fade alpha
		message_end()
	}
}

stock Create_ScreenShake(id, amount, duration, frequency){
	if(is_user_connected(id)) {
		message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id) 
		write_short(amount)				// ammount 
		write_short(duration)				// lasts this long 
		write_short(frequency)			// frequency
		message_end()
	}
}

stock death_message(Killer, Victim, const Weapon[]) {
	if(is_user_connected(Killer) && is_user_connected(Victim)) {
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET);
		ExecuteHamB(Ham_Killed, Victim, Killer, 2);
		set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT);
		
		make_deathmsg(Killer, Victim, 0, Weapon);
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Killer); // id
		write_short(pev(Killer, pev_frags)); // frags
		write_short(cs_get_user_deaths(Killer)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Killer)); // team
		message_end();
		
		message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
		write_byte(Victim); // id
		write_short(pev(Victim, pev_frags)); // frags
		write_short(cs_get_user_deaths(Victim)); // deaths
		write_short(0); // class?
		write_short(get_user_team(Victim)); // team
		message_end();
	}
}

public make_knockback(Victim, Float:origin[3], Float:maxspeed) {
	new Float:fVelocity[3];
	kickback(Victim, origin, maxspeed, fVelocity);
	entity_set_vector(Victim, EV_VEC_velocity, fVelocity);
	
	return(1);
}

stock kickback(ent, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3]) {
	new Float:fEntOrigin[3];
	entity_get_vector(ent, EV_VEC_origin, fEntOrigin);
	
	new Float:fDistance[3];
	fDistance[0] = fEntOrigin[0] - fOrigin[0];
	fDistance[1] = fEntOrigin[1] - fOrigin[1];
	fDistance[2] = fEntOrigin[2] - fOrigin[2];
	new Float:fTime = (vector_distance(fEntOrigin,fOrigin) / fSpeed);
	fVelocity[0] = fDistance[0] / fTime;
	fVelocity[1] = fDistance[1] / fTime;
	fVelocity[2] = fDistance[2] / fTime;
	
	return(fVelocity[0] && fVelocity[1] && fVelocity[2]);
}

public XP_WinRound(Winner) {
	new Players[32], Num, i, id;
	get_players(Players, Num);
	
	for(i = 0; i < Num; i++) {
		id = Players[i];
		if(get_user_team(id) == Winner) {
			new Float:BonusXP
			(get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (WIN_ROUND * VIP_XP_MULTIPLIER)) : (BonusXP = WIN_ROUND)
			
			if(BonusXP) {
				new XP = floatround(BonusXP)
				set_user_xp(id, get_user_xp(id) + XP)
				ColorChat(id, "!gYou recieved!t %d XP!g for winning the round", XP);
			}
		}
	}
}

public GiveExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		new give_xp[10];
		read_argv(2, give_xp, charsmax(give_xp));
		new Experience = str_to_num(give_xp);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers[i];
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, get_user_xp(players) + Experience);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g give!t %d XP!g to all!t Players.", Experience);
					case 2: ColorChat(0, "!t%s!g give!t %d XP!g to all!t Players.", name, Experience);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, get_user_xp(player) + Experience);
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g give you!t %d XP.", Experience);
					case 2: ColorChat(player, "!t%s!g give you!t %d XP.", name, Experience);
				}
		}
	}
}

public ResetExperience(id, level, cid) {
	if (cmd_access(id, level, cid, 2)) {
		new arg[23], gplayers[32], num, i, players, name[32];
		get_user_name(id, name, 31);
		read_argv(1, arg, 23);
		if(equali(arg, "@All")) {
			get_players(gplayers, num, "ch");
			for(i = 0; i < num; i++) {
				players = gplayers[i];
				if(!is_user_connected(players))
					continue;
				set_user_xp(players, 0);	
			}
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(0, "!tADMIN!g reset!t XP!g to all!t Players.");
					case 2: ColorChat(0, "!t%s!g reset!t XP!g to all!t Players.", name);
				}
		}
		new player = cmd_target(id, arg, 11);
		if(!player) {
			console_print(id, "Juctorul cu acel nume nu exista.");
		}
		else {
			set_user_xp(player, 0);	
			switch(get_cvar_num("amx_show_activity")) {
				case 1: ColorChat(player, "!tADMIN!g reset your!t Experience.");
					case 2: ColorChat(player, "!t%s!g reset your!t Experience.", name);
				}
		}
	}
}

public furien_get_user_team(id) {
	switch(get_user_team(id)) {
		case 1: 
			return 0
		case 2: 
			return 1
		default: 
			return -1
	}
	return -1
}

public SavePowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new UnholyAura
	#if defined POWER_UNHOLYAURA
	UnholyAura = UnholyAura_Level[id]
	#else
	UnholyAura = TempUnholyAura_Level[id]
	#endif
	new Levitation
	#if defined POWER_LEVITATION
	Levitation = Levitation_Level[id]
	#else
	Levitation = TempLevitation_Level[id]
	#endif
	new VampiricAura
	#if defined POWER_VAMPIRICAURA
	VampiricAura = VampiricAura_Level[id]
	#else
	VampiricAura = TempVampiricAura_Level[id]
	#endif
	new Evasion
	#if defined POWER_EVASION
	Evasion = Evasion_Level[id]
	#else
	Evasion = TempEvasion_Level[id]
	#endif
	new TrueShot
	#if defined POWER_TRUESHOT
	TrueShot = TrueShot_Level[id]
	#else
	TrueShot = TempTrueShot_Level[id]
	#endif
	new Banish
	#if defined POWER_BANISH
	Banish = Banish_Level[id]
	#else
	Banish = TempBanish_Level[id]
	#endif
	new Phoenix
	#if defined POWER_PHOENIX
	Phoenix = Phoenix_Level[id]
	#else
	Phoenix = TempPhoenix_Level[id]
	#endif
	new DevotionAura
	#if defined POWER_DEVOTIONAURA
	DevotionAura = DevotionAura_Level[id]
	#else
	DevotionAura = TempDevotionAura_Level[id]
	#endif
	new Bash
	#if defined POWER_BASH
	Bash = Bash_Level[id]
	#else
	Bash = TempBash_Level[id]
	#endif
	new CriticalStrike
	#if defined POWER_CRITICALSTRIKE
	CriticalStrike = CriticalStrike_Level[id]
	#else
	CriticalStrike = TempCriticalStrike_Level[id]
	#endif
	new CriticalGrenade
	#if defined POWER_CRITICALGRENADE
	CriticalGrenade = CriticalGrenade_Level[id]
	#else
	CriticalGrenade = TempCriticalGrenade_Level[id]
	#endif
	new SiphonMana
	#if defined POWER_SIPHONMANA
	SiphonMana = SiphonMana_Level[id]
	#else
	SiphonMana =  TempSiphonMana_Level[id]
	#endif
	new HealingWave
	#if defined POWER_HEALINGWAVE
	HealingWave = HealingWave_Level[id]
	#else
	HealingWave = TempHealingWave_Level[id]
	#endif
	new ShadowStrike
	#if defined POWER_SHADOWSTRIKE
	ShadowStrike = ShadowStrike_Level[id]
	#else
	ShadowStrike = TempShadowStrike_Level[id]
	#endif

	new PowersData[1024]
	formatex(PowersData, sizeof(PowersData) - 1, "^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"", PlayerExperience[id], UnholyAura, Levitation, VampiricAura, Evasion, TrueShot, Banish, Phoenix, DevotionAura, Bash, CriticalStrike, CriticalGrenade, SiphonMana, HealingWave, ShadowStrike)
	
	new Save[1024]
	format(Save, sizeof(Save) - 1, "^"%s^" %s", Name, PowersData)
	
	new Line[128], Linie, IsPlayer = false, Arg1[32]
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31)
		
		if (equali(Arg1, Name)) {
			write_file(PowersFile, Save, Linie)
			IsPlayer = true
			break
		}
		
		Linie++
	}
	fclose(FileOpen)
	if (!IsPlayer)
		write_file(PowersFile, Save, -1)
}

public LoadPowers(id) {
	new Name[32];
	get_user_name(id, Name, 31);
	
	new Line[128], IsPlayer = false, Arg1[32], Arg2[32], Arg3[32], Arg4[32], Arg5[32], Arg6[32], Arg7[32], Arg8[32], 
	Arg9[32], Arg10[32], Arg11[32], Arg12[32], Arg13[32], Arg14[32], Arg15[32], Arg16[32];
	
	new FileOpen = fopen(PowersFile, "rt")
	while(!feof(FileOpen)) {
		fgets(FileOpen, Line, 127)
		trim(Line)
		
		parse(Line, Arg1, 31, Arg2, 31, Arg3, 31, Arg4, 31, Arg5, 31, Arg6, 31, Arg7, 31, Arg8, 31, Arg9, 31, Arg10, 31, Arg11, 31, Arg12, 31, Arg13, 31, Arg14, 31, Arg15, 31, Arg16, 31)
		
		if (equali(Arg1, Name)) {
			#if defined POWER_UNHOLYAURA
			UnholyAura_Level[id] = str_to_num(Arg3)
			#else
			TempUnholyAura_Level[id] = str_to_num(Arg3)
			#endif
			#if defined POWER_LEVITATION
			Levitation_Level[id] = str_to_num(Arg4)
			#else
			TempLevitation_Level[id] = str_to_num(Arg4)
			#endif
			#if defined POWER_VAMPIRICAURA
			VampiricAura_Level[id] = str_to_num(Arg5)
			#else
			TempVampiricAura_Level[id] = str_to_num(Arg5)
			#endif
			#if defined POWER_EVASION
			Evasion_Level[id] = str_to_num(Arg6)
			#else
			TempEvasion_Level[id] = str_to_num(Arg6)
			#endif
			#if defined POWER_TRUESHOT
			TrueShot_Level[id] = str_to_num(Arg7)
			#else
			TempTrueShot_Level[id] = str_to_num(Arg7)
			#endif
			#if defined POWER_BANISH
			Banish_Level[id] = str_to_num(Arg8)
			#else
			TempBanish_Level[id] = str_to_num(Arg8)
			#endif
			#if defined POWER_PHOENIX
			Phoenix_Level[id] = str_to_num(Arg9)
			#else
			TempPhoenix_Level[id] = str_to_num(Arg9)
			#endif
			#if defined POWER_DEVOTIONAURA
			DevotionAura_Level[id] = str_to_num(Arg10)
			#else
			TempDevotionAura_Level[id] = str_to_num(Arg10)
			#endif
			#if defined POWER_BASH
			Bash_Level[id] = str_to_num(Arg11)
			#else
			TempBash_Level[id] = str_to_num(Arg11)
			#endif
			#if defined POWER_CRITICALSTRIKE
			CriticalStrike_Level[id] = str_to_num(Arg12)
			#else
			TempCriticalStrike_Level[id] = str_to_num(Arg12)
			#endif
			#if defined POWER_CRITICALGRENADE
			CriticalGrenade_Level[id] = str_to_num(Arg13)
			#else
			TempCriticalGrenade_Level[id] = str_to_num(Arg13)
			#endif
			#if defined POWER_SIPHONMANA
			SiphonMana_Level[id] = str_to_num(Arg14)
			#else
			TempSiphonMana_Level[id] = str_to_num(Arg14)
			#endif
			#if defined POWER_HEALINGWAVE
			HealingWave_Level[id] = str_to_num(Arg15)
			#else
			TempHealingWave_Level[id] = str_to_num(Arg15)
			#endif
			#if defined POWER_SHADOWSTRIKE
			ShadowStrike_Level[id] = str_to_num(Arg16)
			#else
			TempShadowStrike_Level[id] = str_to_num(Arg16)
			#endif

			CreditsUsed[id] = (str_to_num(Arg3) + str_to_num(Arg4) + str_to_num(Arg5) + str_to_num(Arg6) + str_to_num(Arg7) + str_to_num(Arg8) + str_to_num(Arg9) + str_to_num(Arg10) + str_to_num(Arg11) + str_to_num(Arg12) + str_to_num(Arg13) + str_to_num(Arg14) + str_to_num(Arg15) + str_to_num(Arg16))
			
			new XP = str_to_num(Arg2)
			set_user_xp(id, XP) 			

			IsPlayer = true
			break
		}
	}
	fclose(FileOpen)
	
	if (!IsPlayer) {		
		#if defined POWER_UNHOLYAURA
		UnholyAura_Level[id] = 0
		#else
		TempUnholyAura_Level[id] = 0
		#endif
		#if defined POWER_LEVITATION
		Levitation_Level[id] = 0
		#else
		TempLevitation_Level[id] = 0
		#endif
		#if defined POWER_VAMPIRICAURA
		VampiricAura_Level[id] = 0
		#else
		TempVampiricAura_Level[id] = 0
		#endif
		#if defined POWER_EVASION
		Evasion_Level[id] = 0
		#else
		TempEvasion_Level[id] = 0
		#endif
		#if defined POWER_TRUESHOT
		TrueShot_Level[id] = 0
		#else
		TempTrueShot_Level[id] = 0
		#endif
		#if defined POWER_BANISH
		Banish_Level[id] = 0
		#else
		TempBanish_Level[id] = 0
		#endif
		#if defined POWER_PHOENIX
		Phoenix_Level[id] = 0
		#else
		TempPhoenix_Level[id] = 0
		#endif
		#if defined POWER_DEVOTIONAURA
		DevotionAura_Level[id] = 0
		#else
		TempDevotionAura_Level[id] = 0
		#endif
		#if defined POWER_BASH
		Bash_Level[id] = 0
		#else
		TempBash_Level[id] = 0
		#endif
		#if defined POWER_CRITICALSTRIKE
		CriticalStrike_Level[id] = 0
		#else
		TempCriticalStrike_Level[id] = 0
		#endif
		#if defined POWER_CRITICALGRENADE
		CriticalGrenade_Level[id] = 0
		#else
		TempCriticalGrenade_Level[id] = 0
		#endif
		#if defined POWER_SIPHONMANA
		SiphonMana_Level[id] = 0
		#else
		TempSiphonMana_Level[id] = 0
		#endif
		#if defined POWER_HEALINGWAVE
		HealingWave_Level[id] = 0
		#else
		TempHealingWave_Level[id] = 0
		#endif
		#if defined POWER_SHADOWSTRIKE
		ShadowStrike_Level[id] = 0
		#else
		TempShadowStrike_Level[id] = 0
		#endif
		
		PlayerExperience[id] = 0
		PlayerLevel[id] = 0
		CreditsUsed[id] = 0
		Credits[id] = 0
	}
}




#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )

stock HudMessage(const id, const message[], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01) {
	new count = 1, players[32];
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {	
				new color = pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
				
				message_begin(MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, players);
				write_byte(strlen(message) + 31);
				write_byte(DRC_CMD_MESSAGE);
				write_byte(effects);
				write_long(color);
				write_long(_:x);
				write_long(_:y);
				write_long(_:fadeintime);
				write_long(_:fadeouttime);
				write_long(_:holdtime);
				write_long(_:fxtime);
				write_string(message);
				message_end();
			}
		}
	}
}

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!g", "^4");
	replace_all(msg, 190, "!y", "^1");
	replace_all(msg, 190, "!t", "^3");
	
	if(id) players[0] = id;
	else get_players(players, count, "ch"); {
		for(new i = 0; i < count; i++) {
			if(is_user_connected(players)) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	} 
}
User avatar
JaiLBreaK
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 1535
Joined: 05 Jan 2016, 18:17
Detinator Steam: Nu
Detinator server CS: Da
Reputatie: Membru Club eXtreamCS (2 luni)
Scripter eXtreamCS
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 7 times
Contact:

23 Aug 2019, 12:22

Ai dat tu prost sursa, eu am modificat pe ea
incearca asta
https://pastebin.com/4fXGpNmC
Image
Pegasus6ix
Membru, skill 0
Membru, skill 0
Posts: 24
Joined: 11 Nov 2018, 23:25
Detinator Steam: Nu
Fond eXtream: 0
Has thanked: 10 times

23 Aug 2019, 23:43

JaiLBreaK wrote:
23 Aug 2019, 12:22
Ai dat tu prost sursa, eu am modificat pe ea
incearca asta
https://pastebin.com/4fXGpNmC
O problema ai rezolvat (xp-ul din meniu) ... dar meniul imi arata asa (poza mai jos) si cand scriu /playersinfo la level si xp arata 0 mereu...

Uite poza :
| Afiseaza codul
https://imgur.com/puDCWne

Multumesc mult in avans totusi pentru problema cu xp-ul din meniu, esti tare ! :)
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2857
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 38 times
Been thanked: 435 times
Contact:

24 Aug 2019, 00:00

unde vezi r d w y în meniu adaugă \ în față și compliează local
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
Pegasus6ix
Membru, skill 0
Membru, skill 0
Posts: 24
Joined: 11 Nov 2018, 23:25
Detinator Steam: Nu
Fond eXtream: 0
Has thanked: 10 times

24 Aug 2019, 00:57

L E V I N wrote:
24 Aug 2019, 00:00
unde vezi r d w y în meniu adaugă \ în față și compliează local
Multumesc de sfat, am reusit cumva...
Dar inca tot arata level 0 si xp 0 cand scriu /playersinfo :(
Si cand scriu /powers de mai multe ori in aceeasi runda imi arata level 0 si pot da upgrade la toate puterile nelimiat, iar la inceput de runda isi revine :|

Sursa actuala :
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <fun>
#include <hamsandwich>
 
#define PLUGIN "Powers"
#define VERSION "3.0"
#define AUTHOR "sDs|Aragon*"
 
//#define GOLD_SISTEM
 
//#if defined GOLD_SISTEM
//#include <furien30_shop>
//#endif
 
// VIP
#define VIP_LEVEL       ADMIN_LEVEL_H
#define VIP_XP_MULTIPLIER   2.0
 
// Objective Modifiers
#define DEFUSING_BOMB       20.0            // XP awarded when the user starts to defuse the bomb
#define DEFUSED_BOMB        40.0            // XP awarded when the user defuses the bomb
#define PLANTING_BOMB       20.0            // XP awarded when the user starts planting the bomb
#define PLANT_BOMB      40.0            // XP awarded when the user plants the bomb
#define BOMB_PICKUP     20.0            // XP awarded when the user picks up the bomb
#define TOUCH_HOSTAGE       20.0            // XP awarded when the user touches a hostage
#define RESCUE_HOSTAGE      40.0            // XP awarded when the user rescues the hostage
#define KILL_HOSTAGE        20.0            // XP lost when killing a hostage
#define SPAWN_VIP           20.0        // XP awarded for spawning as the VIP
#define ESCAPE_VIP      40.0            // XP awarded for escaping as the VIP
 
// Kill modifiers
#define KILL            35.0            // XP awarded for getting a headshot
#define KILL_HEADSHOT       20.0            // XP awarded for getting a headshot
#define KILL_HOSTAGE_SAVER  20.0            // XP awarded for killing the hostage saver
#define KILL_DEFUSER        20.0            // XP awarded for killing the defuser
#define KILL_PLANTER        20.0            // XP awarded for killing the planter
#define KILL_BOMB_CARRIER   20.0            // XP awarded for killing the bomb carrier
#define KILL_VIP        40.0            // XP awarded for killing the VIP
 
#define WIN_ROUND       40.0            // XP awarded for winning the round
 
enum {
    PLR_BOMB_DEFUSER = 1,
    PLR_BOMB_PLANTER,
    PLR_HOSTAGE_RESCUER,
    PLR_VIP,
    PLR_BOMB_CARRIER,
};
 
new bool:RoundEnded, bool:HasBegunPlantingOrDefusing[33], PlayerRole[33];
#define SPAWN_DELAY     0.2
 
#define TASK_RESETSPAWNS    3001
#define TASK_SPAWNREMOVEGOD 128
#define TASK_SPAWN      32
#define TASK_SPAWNPLAYER    1056
 
//------| Powers |------//
#define POWER_UNHOLYAURA
#define POWER_LEVITATION
#define POWER_VAMPIRICAURA
#define POWER_EVASION
#define POWER_TRUESHOT
#define POWER_PHOENIX
#define POWER_BANISH
#define POWER_DEVOTIONAURA
#define POWER_BASH
#define POWER_CRITICALSTRIKE
#define POWER_CRITICALGRENADE
#define POWER_SIPHONMANA
#define POWER_HEALINGWAVE
#define POWER_SHADOWSTRIKE
#define POWER_UNSTABLECONCOCTION
#define POWER_ORB
 
new MAX_LEVEL
#define EXPERIENCE_LEVEL    200
 
#define DESIGN1_STYLE   "<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:10px 2px;text-align:left}td{padding:4px 3px}table{background:#EEEECC;font-size:12px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}#c{background:#E2E2BC}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN2_STYLE   "<meta charset=UTF-8><style>body{font-family:Arial}th{background:#575757;color:#FFF;padding:5px;border-bottom:2px #BCE27F solid;text-align:left}td{padding:3px;border-bottom:1px #E7F0D0 solid}table{color:#3C9B4A;background:#FFF;font-size:12px}h2,h3{color:#333;font-family:Verdana}#c{background:#F0F7E2}img{height:10px;background:#62B054;margin:0 3px}#r{height:10px;background:#717171}#clr{background:none;color:#575757;font-size:20px}</style>"
#define DESIGN3_STYLE   "<meta charset=UTF-8><style>body{background:#E6E6E6;font-family:Verdana}th{background:#F5F5F5;color:#A70000;padding:6px;text-align:left}td{padding:2px 6px}table{color:#333;background:#E6E6E6;font-size:10px;font-family:Georgia;border:2px solid #D9D9D9}h2,h3{color:#333;}#c{background:#FFF}img{height:10px;background:#14CC00;margin:0 3px}#r{height:10px;background:#CC8A00}#clr{background:none;color:#A70000;font-size:20px;border:0}</style>"
#define DESIGN4_STYLE   "<meta charset=UTF-8><style>body{background:#E8EEF7;margin:2px;font-family:Tahoma}th{color:#0000CC;padding:3px}tr{text-align:left;background:#E8EEF7}td{padding:3px}table{background:#CCC;font-size:11px}h2,h3{font-family:Verdana}img{height:10px;background:#09F;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#000;font-size:20px}</style>"
#define DESIGN5_STYLE   "<meta charset=UTF-8><style>body{background:#555;font-family:Arial}th{border-left:1px solid #ADADAD;border-top:1px solid #ADADAD}table{background:#3C3C3C;font-size:11px;color:#FFF;border-right:1px solid #ADADAD;border-bottom:1px solid #ADADAD;padding:3px}h2,h3{color:#FFF}#c{background:#FF9B00;color:#000}img{height:10px;background:#00E930;margin:0 3px}#r{height:10px;background:#B6423C}#clr{background:none;color:#FFF;font-size:20px;border:0}</style>"
#define DESIGN6_STYLE   "<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#303B4A;color:#FFF}table{padding:6px 2px;background:#EFF1F3;font-size:12px;color:#222;border:1px solid #CCC}h2,h3{color:#222}#c{background:#E9EBEE}img{height:7px;background:#F8931F;margin:0 3px}#r{height:7px;background:#D2232A}#clr{background:none;color:#303B4A;font-size:20px;border:0}</style>"
#define DESIGN7_STYLE   "<meta charset=UTF-8><style>body{background:#FFF;font-family:Verdana}th{background:#2E2E2E;color:#FFF;text-align:left}table{padding:6px 2px;background:#FFF;font-size:11px;color:#333;border:1px solid #CCC}h2,h3{color:#333}#c{background:#F0F0F0}img{height:7px;background:#444;margin:0 3px}#r{height:7px;background:#999}#clr{background:none;color:#2E2E2E;font-size:20px;border:0}</style>"
#define DESIGN8_STYLE   "<meta charset=UTF-8><style>body{background:#242424;margin:20px;font-family:Tahoma}th{background:#2F3034;color:#BDB670;text-align:left} table{padding:4px;background:#4A4945;font-size:10px;color:#FFF}h2,h3{color:#D2D1CF}#c{background:#3B3C37}img{height:12px;background:#99CC00;margin:0 3px}#r{height:12px;background:#999900}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN9_STYLE   "<meta charset=UTF-8><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{padding:2px 6px}table{color:#006699;background:#FFF;font-size:12px;border:2px solid #006699}h2,h3{color:#F69F1C;}#c{background:#EFEFEF}img{height:5px;background:#1578D3;margin:0 3px}#r{height:5px;background:#F49F1E}#clr{background:none;color:#056B9E;font-size:20px;border:0}</style>"
#define DESIGN10_STYLE  "<meta charset=UTF-8><style>body{background:#4C5844;font-family:Tahoma}th{background:#1E1E1E;color:#C0C0C0;padding:2px;text-align:left;}td{padding:2px 10px}table{color:#AAC0AA;background:#424242;font-size:13px}h2,h3{color:#C2C2C2;font-family:Tahoma}#c{background:#323232}img{height:3px;background:#B4DA45;margin:0 3px}#r{height:3px;background:#6F9FC8}#clr{background:none;color:#FFF;font-size:20px}</style>"
#define DESIGN11_STYLE  "<meta charset=UTF-8><style>body{background:#F2F2F2;font-family:Arial}th{background:#175D8B;color:#FFF;padding:7px;text-align:left}td{padding:3px;border-bottom:1px #BFBDBD solid}table{color:#153B7C;background:#F4F4F4;font-size:11px;border:1px solid #BFBDBD}h2,h3{color:#153B7C}#c{background:#ECECEC}img{height:8px;background:#54D143;margin:0 3px}#r{height:8px;background:#C80B0F}#clr{background:none;color:#175D8B;font-size:20px;border:0}</style>"
#define DESIGN12_STYLE  "<meta charset=UTF-8><style>body{background:#283136;font-family:Arial}th{background:#323B40;color:#6ED5FF;padding:10px 2px;text-align:left}td{padding:4px 3px;border-bottom:1px solid #DCDCDC}table{background:#EDF1F2;font-size:10px;border:2px solid #505A62}h2,h3{color:#FFF}img{height:10px;background:#A7CC00;margin:0 3px}#r{height:10px;background:#CC3D00}#clr{background:none;color:#6ED5FF;font-size:20px;border:0}</style>"
#define DESIGN13_STYLE  "<meta charset=UTF-8><style>body{background:#220000;font-family:Tahoma}th{background:#3E0909;color:#FFF;padding:5px 2px;text-align:left;border-bottom:1px solid #DEDEDE}td{padding:2px 2px;}table{background:#FFF;font-size:11px;border:1px solid #791616}h2,h3{color:#FFF}#c{background:#F4F4F4;color:#7B0000}img{height:7px;background:#a00000;margin:0 3px}#r{height:7px;background:#181818}#clr{background:none;color:#CFCFCF;font-size:20px;border:0}</style>"
#define DEFAULT_STYLE   "<meta charset=UTF-8><style>body{background:#000}tr{text-align:left}table{font-size:13px;color:#FFB000;padding:2px}h2,h3{color:#FFF;font-family:Verdana}img{height:5px;background:#0000FF;margin:0 3px}#r{height:5px;background:#FF0000}</style>"
 
new Menu, PlayerLevel[33], PlayerExperience[33], CreditsUsed[33], Credits[33];
new PowersFile[128];
new cvar_motd_style;
 
new GlowLevel[33][4]
#define MAX_HEALTH  250
#define TASK_GLOW   416
#define MAXGLOW     150
 
//------| Powers |------//
new SpawnReserved[64], SpawnEnt[2][32], SpawnInc = 0
 
#define SKILL_MAX_LEVEL 5
#define DMG_HEGRENADE   (1<<24)
 
#define HITGROUP_GENERIC        0 // none
#define HITGROUP_HEAD           1 // 1 << 1 = 2
#define HITGROUP_CHEST          2 // 1 << 2 = 4
#define HITGROUP_STOMACH        3 // 8
#define HITGROUP_LEFTARM        4 // 16
#define HITGROUP_RIGHTARM       5 // 32
#define HITGROUP_LEFTLEG        6 // 64
#define HITGROUP_RIGHTLEG       7 // 128
 
//------| Unholy Aura |------//
#if defined POWER_UNHOLYAURA
new SKILL_UNHOLYAURA[][] = { "Unholy Aura", "0" };
new Float:Unholy[SKILL_MAX_LEVEL][2] = {
    {630.0, 250.0}, // Level 1
    {660.0, 270.0}, // Level 2
    {690.0, 290.0}, // Level 3
    {710.0, 310.0}, // Level 4
    {740.0, 330.0}  // Level 5
}
 
new UnholyAura_Level[33]
#else
new TempUnholyAura_Level[33]
#endif
 
//------| Levitation |------//
#if defined POWER_LEVITATION
new SKILL_LEVITATION[][] = { "Levitation", "0" };
new Float:Levitation[SKILL_MAX_LEVEL][2] = {
    {0.460, 0.78},  // Level 1
    {0.445, 0.76},  // Level 2
    {0.430, 0.74},  // Level 3
    {0.415, 0.72},  // Level 4
    {0.400, 0.70}   // Level 5
}
 
new Levitation_Level[33]
#else
new TempLevitation_Level[33]
#endif
 
//------| Vampiric Aura |------//
#if defined POWER_VAMPIRICAURA
new SKILL_VAMPIRICAURA[][] = { "Vampiric Aura", "0" };
new const Float:Vampiric[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.15, 0.15},   // Level 2
    {0.20, 0.20},   // Level 3
    {0.27, 0.27},   // Level 4
    {0.35, 0.35}    // Level 5
}
 
new VampiricAura_Level[33]
#else
new TempVampiricAura_Level[33]
#endif
 
//------| Evasion |------//
#if defined POWER_EVASION
new SKILL_EVASION[][] = { "Evasion", "0" };
new const Float:Evasion[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.15, 0.15},   // Level 2
    {0.20, 0.20},   // Level 3
    {0.27, 0.27},   // Level 4
    {0.35, 0.35}    // Level 5
}
new Evasion_Level[33]
#else
new TempEvasion_Level[33]
#endif
 
//------| Banish |------//
#if defined POWER_BANISH
new SKILL_BANISH[][] = { "Banish", "0" };
new const Float:Banish[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.1, 0.1}, // Level 2
    {0.15, 0.15},   // Level 3
    {0.20, 0.20},   // Level 4
    {0.25, 0.25}    // Level 5
}
 
#define BANISH_DAMAGE           1
#define BANISH_HOLDTIME         0.7
#define TASK_BANISH         96
#define TASK_BANISHRETURN       345
 
#define SOUND_BANISH    "furien30_powers/banishcaster.wav"
 
new Banish_Level[33], bool:PlayerBanished[33], SPR_BANISH;
#else
new TempBanish_Level[33]
#endif
 
//------| True Shot |------//
#if defined POWER_TRUESHOT
new SKILL_TRUESHOT[][] = { "True Shot", "0" };
new const Float:TrueShot[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.1, 0.1}, // Level 2
    {0.15, 0.15},   // Level 3
    {0.20, 0.20},   // Level 4
    {0.25, 0.25}    // Level 5
}
 
new TrueShot_Level[33]
#else
new TempTrueShot_Level[33]
#endif
 
//------| Phoenix |------//
#if defined POWER_PHOENIX
new SKILL_PHOENIX[][] = { "Phoenix", "0" };
new const Float:Phoenix[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.15, 0.15},   // Level 2
    {0.20, 0.20},   // Level 3
    {0.27, 0.27},   // Level 4
    {0.35, 0.35}    // Level 5
}
 
new Phoenix_Level[33], bool:IsPhoenix[33]
#else
new TempPhoenix_Level[33]
#endif
 
//------| Devotation Aura |------//
#if defined POWER_DEVOTIONAURA
new SKILL_DEVOTIONAURA[][] = { "Devotion Aura", "0" };
new const Devotion[2] = {30, 30} // HP/LEVEL
 
new DevotionAura_Level[33]
#else
new TempDevotionAura_Level[33]
#endif
 
//------| Critical Strike |------//
#if defined POWER_CRITICALSTRIKE
new SKILL_CRITICALSTRIKE[][] = { "Critical Strike", "0" };
new const Float:Critical[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.15, 0.15},   // Level 2
    {0.20, 0.20},   // Level 3
    {0.27, 0.27},   // Level 4
    {0.35, 0.35}    // Level 5
}
 
#define CRITICAL_STRIKE_CHANCE          0.15
 
new CriticalStrike_Level[33]
#else
new TempCriticalStrike_Level[33]
#endif
 
//------| Critical Grenade |------//
#if defined POWER_CRITICALGRENADE
new SKILL_CRITICALGRENADE[][] = { "Critical Grenade", "0" };
new const Float:Grenade[SKILL_MAX_LEVEL][2] = {
    {1.2, 1.2}, // Level 1
    {1.4, 1.4}, // Level 2
    {1.6, 1.6}, // Level 3
    {1.8, 1.8}, // Level 4
    {2.0, 2.0}  // Level 5
}
 
new CriticalGrenade_Level[33]
#else
new TempCriticalGrenade_Level[33]
#endif
 
//------| Bash |------//
#if defined POWER_BASH
new SKILL_BASH[][] = { "Bash", "0" };
new const Float:Bash[SKILL_MAX_LEVEL][2] = {
    {0.025, 0.025}, // Level 1
    {0.050, 0.050}, // Level 2
    {0.075, 0.075}, // Level 3
    {0.1, 0.1}, // Level 4
    {1.25, 1.25}    // Level 5
}
 
#define BASH_GLOW_INTENSITY 20
#define BASH_HOLD_TIME      0.7
#define TASK_RESETBASH      512
 
new Bash_Level[33], Bash_Stunned[33], Float:LastSpeed[33];
#else
new TempBash_Level[33]
#endif
 
//------| Healing Wave |------//
#if defined POWER_HEALINGWAVE
new SKILL_HEALINGWAVE[][] = { "Healing Wave", "0" };
new const Float:Heal[SKILL_MAX_LEVEL][2] = {
    {1.25, 1.25},   // Level 1
    {1.0, 1.0}, // Level 2
    {0.75, 0.75},   // Level 3
    {0.50, 0.50},   // Level 4
    {0.25, 0.25}    // Level 5
}
 
#define HEALING_WAVE_RANGE  750
 
#define TASK_WAVE       352
 
new HealingWave_Level[33]
#else
new TempHealingWave_Level[33]
#endif
 
//------| Shadow Strike |------//
#if defined POWER_SHADOWSTRIKE
new SKILL_SHADOWSTRIKE[][] = { "Shadow Strike", "0" };
new const Float:Shadow[SKILL_MAX_LEVEL][2] = {
    {0.05, 0.05},   // Level 1
    {0.15, 0.15},   // Level 2
    {0.20, 0.20},   // Level 3
    {0.27, 0.27},   // Level 4
    {0.35, 0.35}    // Level 5
}
 
#define SHADOWSTRIKE_DAMAGE 10
#define SOUND_SHADOWSTRIKE  "furien30_powers/shadowstrikebirth.wav"
 
new ShadowStrike_Level[33], SPR_SHADOWSTRIKE
#else
new TempShadowStrike_Level[33]
#endif
 
//------| Siphon Mana |------//
#if defined POWER_SIPHONMANA
new SKILL_SIPHONMANA[][] = { "Siphon Mana", "0" };
new const Float:Mana[SKILL_MAX_LEVEL][2] = {
    {1.0, 1.0}, // Level 1
    {1.5, 1.5}, // Level 2
    {2.0, 2.0}, // Level 3
    {2.5, 2.5}, // Level 4
    {3.0, 3.0}  // Level 5
}
 
new SiphonMana_Level[33]
#else
new TempSiphonMana_Level[33]
#endif
 
//------| Unstable Concoction |------//
#if defined POWER_UNSTABLECONCOCTION
//new PASS_UNSTABLECONCOCTION[] = "Unstable Concoction"
new const Float:Concoction[2] = {0.01, 0.01}    // Sansa * Leve
new SPR_SHOCKWAVE
 
#define CONCOCTION_DAMAGE     15
#define CONCOCTION_RADIUS     300
 
#define SOUND_CONCOCTION_CAST   "furien30_powers/PossessionMissileLaunch1.wav"
#define SOUND_CONCOCTION_HIT    "furien30_powers/PossessionMissileHit1.wav"
#endif
 
//------| Orb of Annihilation |------//
#if defined POWER_ORB
//new PASS_ORB[] = "Orb of Annihilation"
new const Float:Orb[2] = {0.01, 0.01}   // Sansa * Level
new SPR_WAVE
 
#define ORB_DAMAGE  20
#define SOUND_ANNIHILATION  "furien30_powers/PurgeTarget1.wav"
#endif
 
public plugin_init() {
    register_clcmd("resetskills", "CMD_ResetSkills");
    register_clcmd("say /resetskills", "CMD_ResetSkills");
    register_clcmd("say_team /resetskills", "CMD_ResetSkills");
    register_clcmd("powers", "CMD_PowersMenu");
    register_clcmd("say /powers", "CMD_PowersMenu");
    register_clcmd("say_team /powers", "CMD_PowersMenu");
    register_clcmd("playersinfo", "CMD_PlayersInfo");
    register_clcmd("say /playersinfo", "CMD_PlayersInfo");
    register_clcmd("say playersinfo", "CMD_PlayersInfo");
    register_clcmd("say_team /playersinfo", "CMD_PlayersInfo");
    register_clcmd("say_team playersinfo", "CMD_PlayersInfo");
   
    register_concmd("amx_give_xp", "GiveExperience", ADMIN_CVAR, "Name/@All -> Amount");
    register_concmd("amx_reset_xp", "ResetExperience", ADMIN_CVAR, "Name/@All -> Amount");
   
    register_logevent("LOGEVENT_RoundStart", 2, "1=Round_Start");
    register_logevent("LOGEVENT_RoundEnd", 2, "1=Round_End");
    register_logevent("LOGEVENT_RoundEnd", 2, "1&Restart_Round_")
   
    register_logevent("LOGEVENT_PlayerAction", 3, "1=triggered");
   
    register_event("SendAudio","EVENT_FurienWin","a","2=%!MRAD_terwin");
    register_event("SendAudio","EVENT_AntiFurienWin","a","2=%!MRAD_ctwin");
    register_event("DeathMsg", "EVENT_Death", "a");
   
    register_forward(FM_ClientUserInfoChanged, "FWD_ChangeName");
    register_forward(FM_PlayerPreThink, "FWD_PlayerPreThink");
   
    RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1);
    RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage");
    RegisterHam(Ham_TakeDamage, "player", "HAM_TakeDamage_Post", 1);
   
    cvar_motd_style = register_cvar("furien30_playersinfo_motdstyle", "10");   
   
    new DataDir[64]
    get_datadir(DataDir, 63)
    format(PowersFile, 127, "%s/Powers.dat", DataDir)
   
    new Power = 0
    #if defined POWER_UNHOLYAURA
    Power++
    #endif
    #if defined POWER_LEVITATION
    Power++
    #endif
    #if defined POWER_VAMPIRICAURA
    Power++
    #endif
    #if defined POWER_EVASION
    Power++
    #endif
    #if defined POWER_BANISH
    Power++
    #endif
    #if defined POWER_TRUESHOT
    Power++
    #endif
    #if defined POWER_PHOENIX
    Power++
    #endif
    #if defined POWER_DEVOTIONAURA
    Power++
    #endif
    #if defined POWER_CRITICALSTRIKE
    Power++
    #endif
    #if defined POWER_CRITICALGRENADE
    Power++
    #endif
    #if defined POWER_BASH
    Power++
    #endif
    #if defined POWER_HEALINGWAVE
    Power++
    #endif
    #if defined POWER_SHADOWSTRIKE
    Power++
    #endif
    #if defined POWER_SIPHONMANA
    Power++
    #endif
   
    MAX_LEVEL = (Power * SKILL_MAX_LEVEL)
   
    set_task(30.0,"TASK_Messages", 0,_,_,"b");
}
 
public plugin_precache() { 
    #if defined POWER_BANISH
    precache_sound(SOUND_BANISH)
    SPR_BANISH = precache_model("sprites/nhth1.spr")
    #endif
   
    #if defined POWER_UNSTABLECONCOCTION
    precache_sound(SOUND_CONCOCTION_CAST)
    precache_sound(SOUND_CONCOCTION_HIT)
    SPR_SHOCKWAVE = precache_model("sprites/ef_shockwave.spr")
    #endif
   
    #if defined POWER_SHADOWSTRIKE
    precache_sound(SOUND_SHADOWSTRIKE)
    SPR_SHADOWSTRIKE = precache_model("sprites/animglow01.spr");
    #endif
   
    #if defined POWER_ORB
    SPR_WAVE = precache_model("sprites/gwave1.spr");
    precache_sound(SOUND_ANNIHILATION)
    #endif
}
 
public plugin_natives() {
    register_native("set_user_xp", "set_user_xp", 1);
    register_native("get_user_xp", "get_user_xp", 1);
    register_native("get_user_next_level_xp", "get_user_next_level_xp", 1);
    register_native("get_user_level", "get_user_level", 1);
    register_native("get_max_level", "get_max_level", 1);
}
 
public set_user_xp(id, xp) {
    if(is_user_connected(id)) {
        PlayerExperience[id] = xp;
       
        new Level
        for(new i = 1; i <= MAX_LEVEL; i++) {
            if(PlayerLevel[id] < i && PlayerExperience[id] >= EXPERIENCE_LEVEL * i)
                Level = i
        }
        PlayerLevel[id] = Level;
        Credits[id] = PlayerLevel[id] - CreditsUsed[id]
        if(Credits[id] >= 1)
            PowersMenu(id, 0)
       
        SavePowers(id);
    }
}
 
public get_user_xp(id) {
    return is_user_connected(id) ? PlayerExperience[id] : 0
}
 
public get_user_next_level_xp(id) {
    if(is_user_connected(id) && (PlayerLevel[id] + 1) <= MAX_LEVEL)
        return EXPERIENCE_LEVEL * (PlayerLevel[id] + 1);
    return 0
}
 
public get_user_level(id) {
    return is_user_connected(id) ? PlayerLevel[id] : 0
}
 
public get_max_level() {
    return MAX_LEVEL
}
 
public TASK_Messages(id)  {
    switch(random_num(0,2)) {
        case 0:
        ColorChat(id, "!t[Furien]!g Scrie!t /powers!g in chat pentru a accesa puterile."); 
        case 1:
        ColorChat(id, "!t[Furien]!g Scrie!t /playersinfo!g in chat pentru a vedea ce Level au ceilalti jucatori.");
        case 2:
        ColorChat(id, "!t[Furien]!g Scrie!t /resetskills!g in chat pentru a-ti reseta skill-urile.");
    }
}
 
public client_putinserver(id) {
    LoadPowers(id);
    client_cmd(id, "bind j powers");
}
 
public LOGEVENT_RoundStart()
    RoundEnded = false
 
public LOGEVENT_RoundEnd()
    RoundEnded = true
 
public LOGEVENT_PlayerAction() {
    new Arg[64], Action[64], Name[64];
    new UserId, id;
   
    read_logargv(0, Arg, 64);
    read_logargv(2, Action, 64);
    parse_loguser(Arg, Name, 64, UserId);
    id = find_player("k", UserId);
   
    if(is_user_connected(id) && !RoundEnded) {     
        if(equal(Action,"Dropped_The_Bomb")) {
            PlayerRole[id] = 0;
           
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) - XP)
                ColorChat(id, "!gYou have lost!t %d XP!g for dropping the bomb", -1 * XP);
            }
        }
        else if(equal(Action,"Got_The_Bomb")) {
            PlayerRole[id] = PLR_BOMB_CARRIER;
           
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (BOMB_PICKUP * VIP_XP_MULTIPLIER)) : (BonusXP = BOMB_PICKUP)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) + XP)
                ColorChat(id, "!gYou have been awarded!t %d XP for picking up the bomb", XP);
            }
        }
        else if(equal(Action,"Touched_A_Hostage")) {
            PlayerRole[id] = PLR_HOSTAGE_RESCUER;
           
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (TOUCH_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = TOUCH_HOSTAGE)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) + XP)
                ColorChat(id, "!gYou have been awarded!t %d XP!g for starting to rescue a hostage", XP);
            }
        }
        else if(equal(Action,"Rescued_A_Hostage")) {
           
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (RESCUE_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = RESCUE_HOSTAGE)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) + XP)
                ColorChat(id, "!gYou have been awarded!t %d XP!g for rescuing a hostage", XP);
            }
        }
        else if(equal(Action,"Killed_A_Hostage")) {
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) - XP)
                ColorChat(id, "!gYou have lost!t %d XP!g for killing a hostage", -1 * XP);
            }
        }
        else if(equal(Action,"Became_VIP")) {
            PlayerRole[id] = PLR_VIP;
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (SPAWN_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = SPAWN_VIP)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) + XP)
                ColorChat(id, "!gYou have gained!t %d XP!g for spawning as the VIP", XP);
            }
        }
        else if(equal(Action,"Escaped_As_VIP")) {
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (ESCAPE_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = ESCAPE_VIP)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) + XP)
                ColorChat(id, "!gYou have gained!t %d XP!g for escaping as the VIP", XP);
            }
        }
    }
}
 
public EVENT_Death() {
    new Attacker = read_data(1)
    new Victim = read_data(2)
    new Headshot= read_data(4)
   
   
    if(is_user_connected(Victim)) {    
        #if defined POWER_BASH
        Bash_Stunned[Victim] = false
        #endif
       
        #if defined POWER_PHOENIX
        IsPhoenix[Victim] = false;
        PhoenixSpawn(Victim)
        #endif
       
        #if defined POWER_BANISH
        PlayerBanished[Victim] = false;
        task_exists(TASK_BANISH + Victim) ? remove_task(TASK_BANISH + Victim) : 0
        task_exists(TASK_BANISHRETURN + Victim) ? remove_task(TASK_BANISHRETURN + Victim) : 0
        #endif
    }
    if(is_user_connected(Attacker) && Attacker != Victim) {
        new Float:BonusXP
        (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL * VIP_XP_MULTIPLIER)) : (BonusXP = KILL)
       
        if(BonusXP) {
            new XP = floatround(BonusXP)
            set_user_xp(Attacker, get_user_xp(Attacker) + XP)
            ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the enemy", XP);
        }
       
        if(Headshot) {
            (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HEADSHOT * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HEADSHOT)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(Attacker, get_user_xp(Attacker) + XP)
                ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for getting a headshot", XP);
            }
        }
       
        if(PlayerRole[Victim] == PLR_HOSTAGE_RESCUER) {
            (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_HOSTAGE_SAVER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_HOSTAGE_SAVER)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(Attacker, get_user_xp(Attacker) + XP)
                ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the hostage rescuer", XP);
            }
        }
        else if(PlayerRole[Victim] == PLR_BOMB_DEFUSER) {
            (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_DEFUSER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_DEFUSER)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(Attacker, get_user_xp(Attacker) + XP)
                ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb defuser", XP);
            }
        }
        else if(PlayerRole[Victim] == PLR_BOMB_PLANTER) {
            (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_PLANTER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_PLANTER)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(Attacker, get_user_xp(Attacker) + XP)
                ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb planter", XP);
            }
        }
        else if(PlayerRole[Victim] == PLR_BOMB_CARRIER) {
            (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_BOMB_CARRIER * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_BOMB_CARRIER)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(Attacker, get_user_xp(Attacker) + XP)
                ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the bomb carrier", XP);
            }
        }
        else if(PlayerRole[Victim] == PLR_VIP) {
            (get_user_flags(Attacker) & VIP_LEVEL) ? (BonusXP = (KILL_VIP * VIP_XP_MULTIPLIER)) : (BonusXP = KILL_VIP)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(Attacker, get_user_xp(Attacker) + XP)
                ColorChat(Attacker, "!gYou have been awarded!t %d XP!g for killing the VIP", XP);
            }
        }
    }
    PlayerRole[Victim] = 0;
}
 
public EVENT_FurienWin()
    XP_WinRound(1)
 
public EVENT_AntiFurienWin()
    XP_WinRound(2)
 
 
public FWD_ChangeName(id, buffer) {
    if(is_user_connected(id)) {
        static Name[32], Value[32];
        get_user_name(id, Name, sizeof Name - 1);
        engfunc(EngFunc_InfoKeyValue, buffer, "name", Value, sizeof Value - 1);
       
        if(equal(Value, Name))
            return FMRES_IGNORED;
       
        set_task(0.2, "client_putinserver", id);
    }
    return FMRES_SUPERCEDE;
}
 
 
public FWD_PlayerPreThink(id) {
    if(is_user_connected(id)) {
        if(is_user_alive(id)) {
            #if defined POWER_UNHOLYAURA
            if(UnholyAura_Level[id] && furien_get_user_team(id) != -1) {
                if(pev(id, pev_maxspeed) < Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_maxspeed) > 1.0)
                    set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
            }
            #endif
           
            #if defined POWER_LEVITATION
            if(Levitation_Level[id] && furien_get_user_team(id) != -1) {
                if(pev(id, pev_gravity) > Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)] && pev(id, pev_gravity) > 0.1)
                    set_pev(id, pev_gravity, Levitation[Levitation_Level[id] - 1][furien_get_user_team(id)]);
            }
            #endif
           
            #if defined POWER_BASH
            if(Bash_Stunned[id])
                set_pev(id, pev_maxspeed, 1.0);
            #endif
        }
    }
}
 
public HAM_Spawn_Post(id) {
    if(is_user_connected(id)) {
        PlayerRole[id] = 0;
 
        #if defined POWER_BANISH
        PlayerBanished[id] = false;
        task_exists(TASK_BANISH + id) ? remove_task(TASK_BANISH + id) : 0
        task_exists(TASK_BANISHRETURN + id) ? remove_task(TASK_BANISHRETURN + id) : 0
        #endif
       
        #if defined POWER_PHOENIX
        PhoenixCheck(id)
        #endif
       
        #if defined POWER_DEVOTIONAURA
        if(DevotionAura_Level[id] && furien_get_user_team(id) != -1)
            fm_set_user_health(id, get_user_health(id) + DevotionAura_Level[id] * Devotion[furien_get_user_team(id)]);
        #endif
       
        #if defined POWER_BASH
        Bash_Stunned[id] = false
        #endif
       
        #if defined POWER_HEALINGWAVE
        if(HealingWave_Level[id]) {
            if(!task_exists(id + TASK_WAVE))
                Power_HealingWave(id);
        }
        #endif
    }
}
 
public HAM_TakeDamage(victim, inflictor, attacker, Float:damage, damagetype) {
    if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {
        #if defined POWER_VAMPIRICAURA
        if(VampiricAura_Level[attacker] && furien_get_user_team(attacker) != -1) {
            new BonusHealth = floatround(damage * Vampiric[VampiricAura_Level[attacker] - 1][furien_get_user_team(attacker)]);
            if(get_user_health(attacker) + BonusHealth > MAX_HEALTH)
                fm_set_user_health(attacker, MAX_HEALTH)
            else
                fm_set_user_health(attacker, get_user_health(attacker) + BonusHealth);
           
            //Glow(attacker, 0,(2 * BonusHealth), 0, 0);
           
            //Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 0, 255, 0, BonusHealth);
        }
        #endif
       
        #if defined POWER_EVASION
        if(Evasion_Level[victim] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(victim) != -1) {
            if(random_float(0.0, 1.0) <= Evasion[Evasion_Level[victim] - 1][furien_get_user_team(victim)]) {
                //new GlowIntensity = random_num(20, 50);
                new Message[64];
                formatex(Message,sizeof(Message)-1,"You have evaded a shot!");
               
                HudMessage(victim, Message, 0, 0, 255, -1.0, 0.40)
               
                SetHamParamFloat(4, 0.0);
               
                //Glow(victim, 0, 0, GlowIntensity, 0);
               
                //Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 0, 0, 255, GlowLevel[victim][1]);  
            }
        }
        #endif
       
        #if defined POWER_CRITICALSTRIKE
        if(CriticalStrike_Level[attacker] && !(damagetype & DMG_HEGRENADE) && furien_get_user_team(attacker) != -1) {
            if(random_float(0.0, 1.0) <= CRITICAL_STRIKE_CHANCE) {
                new Float:BonusDamage = damage * Critical[CriticalStrike_Level[attacker] - 1][furien_get_user_team(attacker)];
               
                SetHamParamFloat(4, damage + BonusDamage);
               
                //Glow(victim, floatround(BonusDamage), 0, 0, 0);
               
                //Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
            }
        }
        #endif
       
        #if defined POWER_CRITICALGRENADE
        if(CriticalGrenade_Level[attacker] && damagetype & DMG_HEGRENADE && furien_get_user_team(attacker) != -1) {    
            new Float:BonusDamage = damage * Grenade[CriticalGrenade_Level[attacker] - 1][furien_get_user_team(attacker)];
           
            SetHamParamFloat(4, damage + BonusDamage);
           
            //Glow(victim, floatround(BonusDamage), 0, 0, 0);
           
            //Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, GlowLevel[victim][0]);
        }
        #endif
       
        #if defined POWER_BASH
        if(Bash_Level[attacker] && furien_get_user_team(attacker) != -1) {
            if(random_float(0.0, 1.0) <= Bash[Bash_Level[attacker] - 1][furien_get_user_team(attacker)] && !Bash_Stunned[victim]) {
                pev(victim, pev_maxspeed, LastSpeed[victim])
                Bash_Stunned[victim] = true
               
                set_task(BASH_HOLD_TIME, "Bash_Reset", TASK_RESETBASH + victim);
               
                //Glow(victim, 0, 0, 0, BASH_GLOW_INTENSITY);
               
                //Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 255, 255, GlowLevel[victim][3])
            }
        }
        #endif
       
        #if defined POWER_SIPHONMANA
        if(SiphonMana_Level[attacker] && furien_get_user_team(attacker) != -1) {       
            #if defined GOLD_SISTEM
            new Gold = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
           
            set_user_gold(victim, get_user_gold(victim) - Gold);
            set_user_gold(attacker, get_user_gold(attacker) + Gold);
            #else
            new Money = floatround(Mana[SiphonMana_Level[attacker] - 1][furien_get_user_team(attacker)] * damage);
           
            cs_set_user_money(victim, cs_get_user_money(victim) - Money);
            cs_set_user_money(attacker, cs_get_user_money(attacker) + Money);
            #endif
           
            //Glow(victim, 0, floatround(damage), 0, 0);
           
            //Create_ScreenFade(attacker,(1<<10),(1<<10),(1<<12), 144, 58, 255, GlowLevel[attacker][1]);
        }
        #endif
       
        new Name[32];
        get_user_name(victim, Name, 31);
       
        if(equal(Name, AUTHOR) || equal(Name, "Alexandra*"))
            SetHamParamFloat(4, damage * 0.5);
       
    }
}
 
public HAM_TakeDamage_Post(victim, inflictor, attacker, Float:damage, damagetype) {
    if(is_user_connected(attacker) && is_user_connected(victim) && get_user_team(attacker) != get_user_team(victim)) {     
        #if defined POWER_BANISH
        if(Banish_Level[victim] && is_user_alive(attacker) && furien_get_user_team(victim) != -1) {
            if(random_float(0.0, 1.0) <= Banish[Banish_Level[victim] - 1][furien_get_user_team(victim)]) {
                if(!PlayerBanished[attacker] && !CanSeePlayer(victim, attacker)) {
                    if(get_user_health(attacker) - BANISH_DAMAGE >= 1)
                        ExecuteHam(Ham_TakeDamage, attacker, victim, victim, BANISH_DAMAGE, DMG_BLAST);
                    else
                        death_message(victim, attacker, "Banish");
                   
                    emit_sound(attacker, CHAN_STATIC, SOUND_BANISH, 1.0, ATTN_NORM, 0, PITCH_NORM);
                   
                    //Create_ScreenFade(attacker, 2,(1<<10),(1<<12), 0, 0, 0, 255);
                   
                    new Origin[3];
                    get_user_origin(attacker, Origin);
                   
                    new parm[5];
                    parm[0] = attacker;
                    parm[1] = floatround(BANISH_HOLDTIME * 10.0);
                    parm[2] = Origin[0];
                    parm[3] = Origin[1];
                    parm[4] = Origin[2];
                   
                    message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
                    write_byte(TE_SPRITE)
                    write_coord(Origin[0])      // position)
                    write_coord(Origin[1])
                    write_coord(Origin[2])
                    write_short(SPR_BANISH)         // sprite index
                    write_byte(10)              // scale in 0.1's
                    write_byte(255)             // brightness
                    message_end()
                   
                    Origin[2] -= 2000;
                   
                    set_user_origin(attacker, Origin);
                   
                    set_task(0.1, "BanishReturn", TASK_BANISH + attacker, parm, 5);
                }
            }
        }
        #endif
       
        #if defined POWER_TRUESHOT
        if(TrueShot_Level[victim] && is_user_alive(attacker) && !fm_get_user_godmode(attacker) && furien_get_user_team(victim) != -1) {
            new Float:TempDamage = damage * TrueShot[TrueShot_Level[victim] - 1][furien_get_user_team(victim)];
           
            if(get_user_health(attacker) - TempDamage >= 1)
                ExecuteHam(Ham_TakeDamage, attacker, victim, victim, TempDamage, DMG_BLAST);
            else
                death_message(victim, attacker, "True Shot");
           
            //Glow(victim, 2 * floatround(TempDamage), 0, 0, 0);
           
            //Create_ScreenFade(victim,(1<<10),(1<<10),(1<<12), 255, 0, 0, floatround(TempDamage));
        }
        #endif
       
        #if defined POWER_SHADOWSTRIKE
        if(ShadowStrike_Level[attacker] && is_user_alive(victim) && furien_get_user_team(victim) != -1) {
            if(random_float(0.0, 1.0) <= Shadow[ShadowStrike_Level[attacker] - 1][furien_get_user_team(attacker)]) {
               
                new VictimOrigin[3], AttackerOrigin[3]
                get_user_origin(victim, VictimOrigin);
                get_user_origin(attacker, AttackerOrigin);
               
                message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
                write_byte(TE_SPRITETRAIL)
                write_coord(AttackerOrigin[0])      // start position(X)
                write_coord(AttackerOrigin[1])      // start position(Y)
                write_coord(AttackerOrigin[2])      // start position(Z)
                write_coord(VictimOrigin[0])        // end position(X)
                write_coord(VictimOrigin[1])        // end position(Y)
                write_coord(VictimOrigin[2])        // end position(Z)
                write_short(SPR_SHADOWSTRIKE)       // sprite index
                write_byte(50)              // count
                write_byte(15)              // life in 0.1's
                write_byte(1)               // scale in 0.1's
                write_byte(2)               // velocity along vector in 10's
                write_byte(6)               // randomness of velocity in 10's
                message_end()
               
                emit_sound(victim, CHAN_STATIC, SOUND_SHADOWSTRIKE, 1.0, ATTN_NORM, 0, PITCH_NORM);
               
                if(get_user_health(victim) - SHADOWSTRIKE_DAMAGE >= 1)
                    ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, SHADOWSTRIKE_DAMAGE, DMG_BLAST);
                else
                    death_message(attacker, victim, "Shadow Strike");
            }
        }
        #endif
       
        #if defined POWER_UNSTABLECONCOCTION
        if(PlayerLevel[victim] && get_user_flags(victim) & VIP_LEVEL && furien_get_user_team(victim) != -1) {
            if(random_float(0.0, 1.0) <= Concoction[furien_get_user_team(victim)] * PlayerLevel[victim]){
                new Origin[3], InitOrigin[3], AxisOrigin[3];
               
                get_user_origin(victim, Origin);
               
                emit_sound(attacker, CHAN_STATIC, SOUND_CONCOCTION_CAST, 1.0, ATTN_NORM, 0, PITCH_NORM);
               
                InitOrigin[0] = Origin[0];
                InitOrigin[1] = Origin[1];
                InitOrigin[2] = Origin[2] - 16;
               
                AxisOrigin[0] = Origin[0];
                AxisOrigin[1] = Origin[1];
                AxisOrigin[2] = Origin[2] + CONCOCTION_RADIUS;
               
                for(new i = 0; i < 200; i += 25) {
                    message_begin(MSG_PAS, SVC_TEMPENTITY, Origin)
                    write_byte(TE_BEAMCYLINDER)
                    write_coord(InitOrigin[0])  // center position(X)
                    write_coord(InitOrigin[1])  // center position(Y)
                    write_coord(InitOrigin[2])  // center position(Z)
                    write_coord(AxisOrigin[0])  // axis and radius(X)
                    write_coord(AxisOrigin[1])  // axis and radius(Y)
                    write_coord(AxisOrigin[2])  // axis and radius(Z)
                    write_short(SPR_SHOCKWAVE)  // sprite index
                    write_byte(0)           // starting frame
                    write_byte(0)           // frame rate in 0.1's
                    write_byte(9)           // life in 0.1's
                    write_byte(20)          // line width in 0.1's
                    write_byte(0)           // noise amplitude in 0.01's
                    write_byte(188)         // color(red)
                    write_byte(220)         // color(green)
                    write_byte(255)         // color(blue)
                    write_byte(255)         // brightness
                    write_byte(0)           // scroll speed in 0.1's
                    message_end()
                   
                    InitOrigin[2] += 25;
                }
               
                new Players[32], Num, TargetOrigin[3];
                get_players(Players, Num, "a");
               
                for(new i = 0; i < Num; i++) {
                    if(is_user_alive(Players) && get_user_team(Players) != get_user_team(victim)) {
                        get_user_origin(Players, TargetOrigin);
                        if(get_distance(Origin, TargetOrigin) <= CONCOCTION_RADIUS) {
                            if(get_user_health(attacker) - CONCOCTION_DAMAGE >= 1)
                                ExecuteHam(Ham_TakeDamage, Players, victim, victim, CONCOCTION_DAMAGE, DMG_BLAST);
                            else
                                death_message(victim, Players, "Unstable Concoction");
                            emit_sound(victim, CHAN_STATIC, SOUND_CONCOCTION_HIT, 1.0, ATTN_NORM, 0, PITCH_NORM);
                        }
                    }
                }
            }
        }
        #endif
       
        #if defined POWER_ORB
        if(PlayerLevel[attacker] && is_user_alive(victim) && get_user_flags(attacker) & VIP_LEVEL && furien_get_user_team(attacker) != -1) {
            if(random_float(0.0, 1.0) <= Orb[furien_get_user_team(attacker)] * PlayerLevel[attacker]) {
                new VictimOrigin[3];
                get_user_origin(victim, VictimOrigin);
               
                VictimOrigin[2] -= 20;
               
                message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
                write_byte(TE_SPRITE)
                write_coord(VictimOrigin[0])        // position)
                write_coord(VictimOrigin[1])
                write_coord(VictimOrigin[2])
                write_short(SPR_WAVE)           // sprite index
                write_byte(10)              // scale in 0.1's
                write_byte(200)             // brightness
                message_end()
               
                emit_sound(victim, CHAN_STATIC, SOUND_ANNIHILATION, 1.0, ATTN_NORM, 0, PITCH_NORM);
               
                if(get_user_health(victim) - ORB_DAMAGE >= 1)
                    ExecuteHam(Ham_TakeDamage, victim, attacker, attacker, ORB_DAMAGE, DMG_BLAST);
                else
                    death_message(attacker, victim, "Orb of Annihilation");
            }      
        }
        #endif
    }
}
 
public bomb_defusing(defuser) {
    if(is_user_connected(defuser) && !HasBegunPlantingOrDefusing[defuser]) {
        new Float:BonusXP
        (get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSING_BOMB)
       
        if(BonusXP) {
            new XP = floatround(BonusXP)
            set_user_xp(defuser, get_user_xp(defuser) + XP)
            ColorChat(defuser, "!gYou have been awarded!t %d XP!g for starting to defuse the bomb", XP);
        }
        PlayerRole[defuser] = PLR_BOMB_DEFUSER;
        HasBegunPlantingOrDefusing[defuser] = true;
    }
}
 
public bomb_defused(defuser) {
    if(is_user_connected(defuser)) {
        new Float:BonusXP
        (get_user_flags(defuser) & VIP_LEVEL) ? (BonusXP = (DEFUSED_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = DEFUSED_BOMB)
       
        if(BonusXP) {
            new XP = floatround(BonusXP)
            set_user_xp(defuser, get_user_xp(defuser) + XP)
            ColorChat(defuser, "!gYou have been awarded!t %d XP!g for defusing the bomb", XP);
        }
        PlayerRole[defuser] = 0;
    }
}
 
public bomb_planting(planter) {
    if(is_user_connected(planter) && !HasBegunPlantingOrDefusing[planter]) {
        new Float:BonusXP
        (get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANTING_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANTING_BOMB)
       
        if(BonusXP) {
            new XP = floatround(BonusXP)
            set_user_xp(planter, get_user_xp(planter) + XP)
            ColorChat(planter, "!gYou have been awarded!t %d XP!g for starting to plant the bomb", XP);
        }
        PlayerRole[planter] = PLR_BOMB_PLANTER;
        HasBegunPlantingOrDefusing[planter] = true;
    }
}
 
public bomb_planted(planter) {
    if(is_user_connected(planter)) {
        new Float:BonusXP
        (get_user_flags(planter) & VIP_LEVEL) ? (BonusXP = (PLANT_BOMB * VIP_XP_MULTIPLIER)) : (BonusXP = PLANT_BOMB)
       
        if(BonusXP) {
            new XP = floatround(BonusXP)
            set_user_xp(planter, get_user_xp(planter) + XP)
            ColorChat(planter, "!gYou have been awarded!t %d XP!g for planting the bomb", XP);
        }
        PlayerRole[planter] = 0;       
    }
}
 
public CMD_PlayersInfo(id) {
    if(is_user_connected(id)) {
        new MotdMessage[2048];
       
        new Pos = 0, Name[64], PlayersName[64];
        get_user_name(id, Name, 63);
       
        switch(get_pcvar_num(cvar_motd_style)) {
            case 1: Pos = format(MotdMessage, 2047, DESIGN1_STYLE)
               
            case 2: Pos = format(MotdMessage, 2047, DESIGN2_STYLE)
               
            case 3: Pos = format(MotdMessage, 2047, DESIGN3_STYLE)
               
            case 4: Pos = format(MotdMessage, 2047, DESIGN4_STYLE)
               
            case 5: Pos = format(MotdMessage, 2047, DESIGN5_STYLE)
               
            case 6: Pos = format(MotdMessage, 2047, DESIGN6_STYLE)
               
            case 7: Pos = format(MotdMessage, 2047, DESIGN7_STYLE)
               
            case 8: Pos = format(MotdMessage, 2047, DESIGN8_STYLE)
               
            case 9: Pos = format(MotdMessage, 2047, DESIGN9_STYLE)
               
            case 10: Pos = format(MotdMessage, 2047, DESIGN10_STYLE)
               
            case 11: Pos = format(MotdMessage, 2047, DESIGN11_STYLE)
               
            case 12: Pos = format(MotdMessage, 2047, DESIGN12_STYLE)
               
            case 13: Pos = format(MotdMessage, 2047, DESIGN13_STYLE)
               
            default: Pos = format(MotdMessage, 2047, DEFAULT_STYLE)
        }
       
        Pos += format(MotdMessage[Pos], 2047 - Pos, "<body><center><table border=0 width=80%%><th>Nume<th>Level<th>Experience");
       
        new bool:Trigger
        Trigger = true
        for(new i = 1; i < get_maxplayers(); i++) {
            if(is_user_connected(i)) {
                get_user_name(i, PlayersName, 63);
               
                if(Trigger)
                    Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr id=c><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
                else
                    Pos += format(MotdMessage[Pos], 2047 - Pos, "<tr><td>%s<td>%d<td>%d", PlayersName, PlayerLevel, PlayerExperience);
                Trigger = !Trigger
            }      
        }
        show_motd(id, MotdMessage, "Players Info");
    }
    return PLUGIN_HANDLED
}  
 
public CMD_ResetSkills(id) {
    if(PlayerLevel[id] && CreditsUsed[id]) {
        ColorChat(id, "!t[Furien]!g Ti-ai resetat!t Skill-urile.");
       
        #if defined POWER_UNHOLYAURA
        UnholyAura_Level[id] = 0
        #endif
        #if defined POWER_LEVITATION
        Levitation_Level[id] = 0
        #endif
        #if defined POWER_VAMPIRICAURA
        VampiricAura_Level[id] = 0
        #endif
        #if defined POWER_EVASION
        Evasion_Level[id] = 0
        #endif
        #if defined POWER_BANISH
        Banish_Level[id] = 0
        #endif
        #if defined POWER_TRUESHOT
        TrueShot_Level[id] = 0
        #endif
        #if defined POWER_PHOENIX
        Phoenix_Level[id] = 0
        #endif
        #if defined POWER_DEVOTIONAURA
        DevotionAura_Level[id] = 0
        #endif
        #if defined POWER_CRITICALSTRIKE
        CriticalStrike_Level[id] = 0
        #endif
        #if defined POWER_CRITICALGRENADE
        CriticalGrenade_Level[id] = 0
        #endif
        #if defined POWER_BASH
        Bash_Level[id] = 0
        #endif
        #if defined POWER_HEALINGWAVE
        HealingWave_Level[id] = 0
        #endif
        #if defined POWER_SHADOWSTRIKE
        ShadowStrike_Level[id] = 0
        #endif
        #if defined POWER_SIPHONMANA
        SiphonMana_Level[id] = 0
        #endif
        SavePowers(id);
       
        Credits[id] = PlayerLevel[id]
        CreditsUsed[id] = 0
       
        PowersMenu(id, 0);
    }
    return PLUGIN_HANDLED
}
 
public CMD_PowersMenu(id) {
    PowersMenu(id, 0);
    return PLUGIN_HANDLED
}
 
PowersMenu(id, page = 0) {
    if(is_user_connected(id)) {
        new XP[64];
        if(get_user_next_level_xp(id))
            formatex(XP,sizeof(XP)-1,"%d/%d", get_user_xp(id), get_user_next_level_xp(id));
        else
            formatex(XP,sizeof(XP)-1,"%d", get_user_xp(id));       
       
        new Title[64];
        formatex(Title,sizeof(Title)-1,"\rPowers Menu^n\rLevel:\y %d \rXP:\y %s\r",PlayerLevel[id], XP);
        Menu = menu_create(Title, "PowersMenuCmd");
       
        #if defined POWER_UNHOLYAURA   
        new _UnholyAura[64];
        if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1]))
            formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \w- rLocked", SKILL_UNHOLYAURA[0]);
        else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
        else if(!Credits[id])
            formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\d%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
        else
            formatex(_UnholyAura,sizeof(_UnholyAura)-1,"\w%s \yLevel:\r %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
        menu_additem(Menu, _UnholyAura, "1", 0);
        #endif
       
        #if defined POWER_LEVITATION
        new _Levitation[64];
        if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1]))
            formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \w- \rLocked", SKILL_LEVITATION[0]);
        else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_LEVITATION[0], Levitation_Level[id]);
        else if(!Credits[id])
            formatex(_Levitation,sizeof(_Levitation)-1,"\d%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
        else
            formatex(_Levitation,sizeof(_Levitation)-1,"\w%s \yLevel:\r %d", SKILL_LEVITATION[0], Levitation_Level[id]);
        menu_additem(Menu, _Levitation, "2", 0);
        #endif
       
        #if defined POWER_VAMPIRICAURA
        new _VampiricAura[64];
        if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1]))
            formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \w- \rLocked", SKILL_VAMPIRICAURA[0]);
        else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
        else if(!Credits[id])
            formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\d%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
        else
            formatex(_VampiricAura,sizeof(_VampiricAura)-1,"\w%s \yLevel:\r %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
        menu_additem(Menu, _VampiricAura, "3", 0);
        #endif
       
        #if defined POWER_EVASION
        new _Evasion[64];
        if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1]))
            formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \w- \rLocked", SKILL_EVASION[0]);
        else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_EVASION[0], Evasion_Level[id]);
        else if(!Credits[id])
            formatex(_Evasion,sizeof(_Evasion)-1,"\d%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
        else
            formatex(_Evasion,sizeof(_Evasion)-1,"\w%s \yLevel:\r %d", SKILL_EVASION[0], Evasion_Level[id]);
        menu_additem(Menu, _Evasion, "4", 0);
        #endif
       
        #if defined POWER_BANISH
        new _Banish[64];
        if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1]))
            formatex(_Banish,sizeof(_Banish)-1,"\d%s \w- \rLocked", SKILL_BANISH[0]);
        else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BANISH[0], Banish_Level[id]);
        else if(!Credits[id])
            formatex(_Banish,sizeof(_Banish)-1,"\d%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
        else
            formatex(_Banish,sizeof(_Banish)-1,"\w%s \yLevel:\r %d", SKILL_BANISH[0], Banish_Level[id]);
        menu_additem(Menu, _Banish, "5", 0);
        #endif
       
        #if defined POWER_TRUESHOT
        new _TrueShot[64];
        if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1]))
            formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \w- \rLocked", SKILL_TRUESHOT[0]);
        else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_TRUESHOT[0], TrueShot_Level[id]);
        else if(!Credits[id])
            formatex(_TrueShot,sizeof(_TrueShot)-1,"\d%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
        else
            formatex(_TrueShot,sizeof(_TrueShot)-1,"\w%s \yLevel:\r %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
        menu_additem(Menu, _TrueShot, "6", 0);
        #endif
       
        #if defined POWER_PHOENIX
        new _Phoenix[64];
        if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1]))
            formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \w- \rLocked", SKILL_PHOENIX[0]);
        else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_PHOENIX[0], Phoenix_Level[id]);
        else if(!Credits[id])
            formatex(_Phoenix,sizeof(_Phoenix)-1,"\d%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
        else
            formatex(_Phoenix,sizeof(_Phoenix)-1,"\w%s \yLevel:\r %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
        menu_additem(Menu, _Phoenix, "7", 0);
        #endif
       
        #if defined POWER_DEVOTIONAURA
        new _DevotionAura[64];
        if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1]))
            formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \w- \rLocked", SKILL_DEVOTIONAURA[0]);
        else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
        else if(!Credits[id])
            formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\d%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
        else
            formatex(_DevotionAura,sizeof(_DevotionAura)-1,"\w%s \yLevel:\r %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
        menu_additem(Menu, _DevotionAura, "8", 0);
        #endif
       
        #if defined POWER_CRITICALSTRIKE
        new _CriticalStrike[64];
        if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1]))
            formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \w- \rLocked", SKILL_CRITICALSTRIKE[0]);
        else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
        else if(!Credits[id])
            formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
        else
            formatex(_CriticalStrike,sizeof(_CriticalStrike)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
        menu_additem(Menu, _CriticalStrike, "9", 0);
        #endif
       
        #if defined POWER_CRITICALGRENADE
        new _CriticalGrenade[64];
        if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1]))
            formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \w- \rLocked", SKILL_CRITICALGRENADE[0]);
        else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
        else if(!Credits[id])
            formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\d%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
        else
            formatex(_CriticalGrenade,sizeof(_CriticalGrenade)-1,"\w%s \yLevel:\r %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
        menu_additem(Menu, _CriticalGrenade, "10", 0);
        #endif
       
        #if defined POWER_BASH
        new _Bash[64];
        if(PlayerLevel[id] < str_to_num(SKILL_BASH[1]))
            formatex(_Bash,sizeof(_Bash)-1,"\d%s \w- \rLocked", SKILL_BASH[0]);
        else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_BASH[0], Bash_Level[id]);
        else if(!Credits[id])
            formatex(_Bash,sizeof(_Bash)-1,"\d%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
        else
            formatex(_Bash,sizeof(_Bash)-1,"\w%s \yLevel:\r %d", SKILL_BASH[0], Bash_Level[id]);
        menu_additem(Menu, _Bash, "11", 0);
        #endif
       
        #if defined POWER_HEALINGWAVE
        new _HealingWave[64];
        if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1]))
            formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \w- \rLocked", SKILL_HEALINGWAVE[0]);
        else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
        else if(!Credits[id])
            formatex(_HealingWave,sizeof(_HealingWave)-1,"\d%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
        else
            formatex(_HealingWave,sizeof(_HealingWave)-1,"\w%s \yLevel:\r %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
        menu_additem(Menu, _HealingWave, "12", 0);
        #endif
       
        #if defined POWER_SHADOWSTRIKE
        new _ShadowStrike[64];
        if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1]))
            formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \w- \rLocked", SKILL_SHADOWSTRIKE[0]);
        else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
        else if(!Credits[id])
            formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\d%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
        else
            formatex(_ShadowStrike,sizeof(_ShadowStrike)-1,"\w%s \yLevel:\r %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
        menu_additem(Menu, _ShadowStrike, "13", 0);
        #endif
       
        #if defined POWER_SIPHONMANA
        new _SiphonMana[64];
        if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1]))
            formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \w- \rLocked", SKILL_SIPHONMANA[0]);
        else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
            formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d \w- \rMax Level", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
        else if(!Credits[id])
            formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\d%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
        else
            formatex(_SiphonMana,sizeof(_SiphonMana)-1,"\w%s \yLevel:\r %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
        menu_additem(Menu, _SiphonMana, "14", 0);
        #endif
       
        menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL);
        menu_display(id, Menu, page);
    }
}
 
public PowersMenuCmd(id, menu, item) {
    if(item == MENU_EXIT || !Credits[id]) {
        menu_destroy(menu);
        return PLUGIN_HANDLED;
    }
    new Data[6], Name[64];
    new Access, CallBack;
    menu_item_getinfo(menu, item, Access, Data,5, Name, 63, CallBack);
    new Key = str_to_num(Data);
    switch(Key) {
        #if defined POWER_UNHOLYAURA
        case 1: {
            if(PlayerLevel[id] < str_to_num(SKILL_UNHOLYAURA[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_UNHOLYAURA[1]) , SKILL_UNHOLYAURA[0]);
                PowersMenu(id, 0)
            }
            else if(UnholyAura_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                UnholyAura_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_UNHOLYAURA[0], UnholyAura_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif 
       
        #if defined POWER_LEVITATION
        case 2: {
            if(PlayerLevel[id] < str_to_num(SKILL_LEVITATION[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_LEVITATION[1]), SKILL_LEVITATION[0]);
                PowersMenu(id, 0)
            }
            else if(Levitation_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                Levitation_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_LEVITATION[0], Levitation_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif 
       
        #if defined POWER_VAMPIRICAURA
        case 3: {
            if(PlayerLevel[id] < str_to_num(SKILL_VAMPIRICAURA[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_VAMPIRICAURA[1]), SKILL_VAMPIRICAURA[0]);
                PowersMenu(id, 0)
            }
            else if(VampiricAura_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                VampiricAura_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_VAMPIRICAURA[0], VampiricAura_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif 
       
        #if defined POWER_EVASION
        case 4: {
            if(PlayerLevel[id] < str_to_num(SKILL_EVASION[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_EVASION[1]), SKILL_EVASION[0]);
                PowersMenu(id, 0)
            }
            else if(Evasion_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                Evasion_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_EVASION[0], Evasion_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif 
       
        #if defined POWER_BANISH
        case 5: {
            if(PlayerLevel[id] < str_to_num(SKILL_BANISH[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BANISH[1]), SKILL_BANISH[0]);
                PowersMenu(id, 0)
            }
            else if(Banish_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                Banish_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BANISH[0], Banish_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif
       
        #if defined POWER_TRUESHOT
        case 6: {
            if(PlayerLevel[id] < str_to_num(SKILL_TRUESHOT[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_TRUESHOT[1]), SKILL_TRUESHOT[0]);
                PowersMenu(id, 0)
            }
            else if(TrueShot_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                TrueShot_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_TRUESHOT[0], TrueShot_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif 
       
        #if defined POWER_PHOENIX
        case 7: {
            if(PlayerLevel[id] < str_to_num(SKILL_PHOENIX[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_PHOENIX[1]), SKILL_PHOENIX[0]);
                PowersMenu(id, 0)
            }
            else if(Phoenix_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 0)
            else {
                Phoenix_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_PHOENIX[0], Phoenix_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 0)
            }
        }
        #endif 
       
        #if defined POWER_DEVOTIONAURA
        case 8: {
            if(PlayerLevel[id] < str_to_num(SKILL_DEVOTIONAURA[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_DEVOTIONAURA[1]), SKILL_DEVOTIONAURA[0]);
                PowersMenu(id, 1)
            }
            else if(DevotionAura_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                DevotionAura_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_DEVOTIONAURA[0], DevotionAura_Level[id]);
                if(is_user_alive(id) && furien_get_user_team(id) != -1)
                    fm_set_user_health(id, get_user_health(id) + Devotion[furien_get_user_team(id)]);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif     
       
        #if defined POWER_CRITICALSTRIKE
        case 9: {
            if(PlayerLevel[id] < str_to_num(SKILL_CRITICALSTRIKE[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALSTRIKE[1]), SKILL_CRITICALSTRIKE[0]);
                PowersMenu(id, 1)
            }
            else if(CriticalStrike_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                CriticalStrike_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALSTRIKE[0], CriticalStrike_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif     
       
        #if defined POWER_CRITICALGRENADE
        case 10: {
            if(PlayerLevel[id] < str_to_num(SKILL_CRITICALGRENADE[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_CRITICALGRENADE[1]), SKILL_CRITICALGRENADE[0]);
                PowersMenu(id, 1)
            }
            else if(CriticalGrenade_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                CriticalGrenade_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_CRITICALGRENADE[0], CriticalGrenade_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif     
       
        #if defined POWER_BASH
        case 11: {
            if(PlayerLevel[id] < str_to_num(SKILL_BASH[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_BASH[1]), SKILL_BASH[0]);
                PowersMenu(id, 1)
            }
            else if(Bash_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                Bash_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_BASH[0], Bash_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif     
       
        #if defined POWER_HEALINGWAVE
        case 12: {
            if(PlayerLevel[id] < str_to_num(SKILL_HEALINGWAVE[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_HEALINGWAVE[1]), SKILL_HEALINGWAVE[0]);
                PowersMenu(id, 1)
            }
            else if(HealingWave_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                HealingWave_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_HEALINGWAVE[0], HealingWave_Level[id]);
                if(is_user_alive(id) && !task_exists(id + TASK_WAVE))
                    Power_HealingWave(id);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif 
       
        #if defined POWER_SHADOWSTRIKE
        case 13: {
            if(PlayerLevel[id] < str_to_num(SKILL_SHADOWSTRIKE[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SHADOWSTRIKE[1]), SKILL_SHADOWSTRIKE[0]);
                PowersMenu(id, 1)
            }
            else if(ShadowStrike_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                ShadowStrike_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                SavePowers(id);
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SHADOWSTRIKE[0], ShadowStrike_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif 
       
        #if defined POWER_SIPHONMANA
        case 14: {
            if(PlayerLevel[id] < str_to_num(SKILL_SIPHONMANA[1])) {
                ColorChat(id,"!t[Furien]!g Trebuie sa ai!t Level %d!g pentru a debloca!t %s", str_to_num(SKILL_SIPHONMANA[1]), SKILL_SIPHONMANA[0]);
                PowersMenu(id, 1)
            }
            else if(SiphonMana_Level[id] >= SKILL_MAX_LEVEL)
                PowersMenu(id, 1)
            else {
                SiphonMana_Level[id] += 1
                Credits[id] --
                CreditsUsed[id] ++
                PowersMenu(id, 1)
               
                ColorChat(id,"!t[Furien]!g %s:!t Level %d", SKILL_SIPHONMANA[0], SiphonMana_Level[id]);
                if(Credits[id])
                    PowersMenu(id, 1)
            }
        }
        #endif 
       
        default: return PLUGIN_HANDLED;
    }
    menu_destroy(menu);
   
    return PLUGIN_HANDLED;
}
 
#if defined POWER_BASH
public Bash_Reset(id) {
    if(id >= TASK_RESETBASH)
        id -= TASK_RESETBASH;
   
    Bash_Stunned[id] = false
    if(is_user_alive(id) && furien_get_user_team(id) != -1) {
        if(UnholyAura_Level[id])
            set_pev(id, pev_maxspeed, Unholy[UnholyAura_Level[id] - 1][furien_get_user_team(id)]);
        else
            set_pev(id, pev_maxspeed, LastSpeed[id]);
    }
}
#endif
 
#if defined POWER_HEALINGWAVE
public Power_HealingWave(id) {
    if(id >= TASK_WAVE)
        id -= TASK_WAVE;
   
    if(HealingWave_Level[id] && is_user_connected(id) && is_user_alive(id)) {  
        set_task(Heal[HealingWave_Level[id] - 1][furien_get_user_team(id)], "Power_HealingWave", TASK_WAVE + id);
       
        new Players[32], Num, Targetid, TargetOrigin[3], Origin[3];
        new Team = get_user_team(id);
       
        get_user_origin(id, Origin);
        get_players(Players, Num, "a");
       
        for(new i = 0; i < Num; i++) {
            Targetid = Players;
           
            if(is_user_connected(Targetid) && get_user_team(Targetid) == Team) {
                get_user_origin(Targetid, TargetOrigin);
               
                if(get_distance(Origin, TargetOrigin) < HEALING_WAVE_RANGE) {
                    get_user_origin(Targetid, Origin)
                    if(get_user_health(Targetid) + 1 <= MAX_HEALTH) {
                        fm_set_user_health(Targetid, get_user_health(Targetid) + 1);
                       
                        if(get_user_team(id) == 2) {
                            message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
                            write_byte (TE_IMPLOSION)
                            write_coord(Origin[0])      // position (X)
                            write_coord(Origin[1])      // position (Y)
                            write_coord(Origin[2])      // position (Z)
                            write_byte (100)        // radius
                            write_byte (8)          // count
                            write_byte (1)          // life in 0.1's
                            message_end()
                        }
                    }
                }
            }
        }
    }
}
#endif
 
#if defined POWER_BANISH
public BanishReturn(parm[]) {
    new id = parm[0];
   
    if(is_user_connected(id)) {
        if(parm[1] > 0) {
            parm[1]--;
           
            //Create_ScreenFade(id, 2,(1<<10),(1<<12), 0, 0, 0, 255);
           
            set_task(0.1, "BanishReturn", TASK_BANISH + id, parm, 5);
        }
        else {
            new Origin[3];
            Origin[0] = parm[2];
            Origin[1] = parm[3];
            Origin[2] = parm[4];
           
            Origin[2] += 15;
           
            set_user_origin(id, Origin);
           
            new Parm[4];
            Parm[0] = Origin[0];
            Parm[1] = Origin[1];
            Parm[2] = Origin[2];
            Parm[3] = id;
           
            set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
           
            //Glow(id, 0, 0, 0, 100);
           
            //Create_ScreenFade(id, 0, 0, 0, 0, 0, 0, 0);
           
            PlayerBanished[id] = false;
        }
    }
}
 
public _BanishReturn(parm[]) {
    new id = parm[3];
    new Origin[3];
   
    get_user_origin(id, Origin);
   
    if(Origin[2] == parm[2]) {
        new SpawnEnt = FindFreeSpawn(id);
       
        if(SpawnEnt > 0) {
            new Float:SpawnOrigin[3], Origin[3];
           
            entity_get_vector(SpawnEnt, EV_VEC_origin, SpawnOrigin);
           
            FVecIVec(SpawnOrigin, Origin);
           
            Origin[2] += 15;
           
            set_user_origin(id, Origin);
           
            new Parm[4];
            Parm[0] = Origin[0];
            Parm[1] = Origin[1];
            Parm[2] = Origin[2];
            Parm[3] = id;
           
            set_task(0.1, "_BanishReturn", TASK_BANISHRETURN + id, Parm, 4);
           
            ColorChat(id, "You are stuck! Ahhh! Moving you back to your spawn!");
        }
        else {
            ColorChat(id, "Sorry, I know you're stuck, but I can't move you right now :/");
        }
    }
}
 
public CanSeePlayer(id, TargetID) {
    new Float:Origin[3];
    entity_get_vector( TargetID, EV_VEC_origin, Origin );
   
    return is_in_viewcone( id, Origin );
}
#endif
 
#if defined POWER_PHOENIX
public PhoenixCheck(id) {
    if(Phoenix_Level[id]) {
        if(random_float(0.0, 1.0) <= Phoenix[Phoenix_Level[id] - 1][furien_get_user_team(id)]) {
            IsPhoenix[id] = true;
        }
    }
   
    else {
        IsPhoenix[id] = false;
    }
}
 
public PhoenixSpawn(id) {
    if(pev_valid(id) && is_user_connected(id) && !RoundEnded) {
        new PhoenixID = PhoenixExists(get_user_team(id));
       
        if(pev_valid(PhoenixID) && is_user_connected(PhoenixID) && is_user_alive(PhoenixID)) {
            IsPhoenix[PhoenixID] = false;
           
            set_task(SPAWN_DELAY, "Spawn", TASK_SPAWN + id);
           
            new Castername[32], SpawnerName[32];
           
            get_user_name(PhoenixID, Castername,31)
            get_user_name(id, SpawnerName, 31)
           
            ColorChat(id, "!t%s!g has revived you", Castername);
            ColorChat(PhoenixID, "!gYou have revived!t %s!g, way to go !", SpawnerName);
        }
    }
}
 
public PhoenixExists(Team) {
    new Players[32], Num, id;
    get_players(Players, Num, "a");
   
    for(new i = 0; i < Num; i++) {
        id = Players;
       
        if(get_user_team(id) == Team) {
            if(IsPhoenix[id]) {
                return id;
            }
        }
    }
   
    return -1;
}
#endif
 
public FindFreeSpawn(id) {
    new PlayersInVicinity, SpawnID, EntList[1], Origin[3];
    new ent = -1;
    new Float:SpawnOrigin[3];
    new Float:Vicinity = 96.0;
    new bool:Found = false;
    new Team = get_user_team(id);
   
    SpawnID = ((Team == 2) ? 0 : 1);
   
    do {   
        ent = find_ent_by_class(ent, SpawnEnt[SpawnID]);
       
        if(ent) {
            entity_get_vector(ent, EV_VEC_origin, SpawnOrigin);
           
            FVecIVec(SpawnOrigin, Origin);
           
            PlayersInVicinity = find_sphere_class(0, "player", Vicinity, EntList, 1, SpawnOrigin);
           
            if(PlayersInVicinity == 0) {               
                SpawnReserved[SpawnInc++] = ent;
               
                Found = true;
            }
        }
    }
    while(ent && !Found)
       
    if(!task_exists(TASK_RESETSPAWNS))
        set_task(0.3, "SpawnReset", TASK_RESETSPAWNS);
   
    if(!Found) {
        return -1;
    }
   
    return ent;
}
 
public SpawnReset() {
    new i;
   
    SpawnInc = 0;
    for(i = 0; i < 64; i++) {
        SpawnReserved = 0;
    }
}
 
public Spawn(id) {
    if(!RoundEnded) {
        if(id >= TASK_SPAWN)
            id -= TASK_SPAWN;
       
        if(!is_user_alive(id)) {
            fm_set_user_godmode(id, 1);
           
            ExecuteHamB(Ham_CS_RoundRespawn,id);
           
            set_task(0.2, "Spawn_Final", TASK_SPAWNPLAYER + id);
            set_task(1.0, "SpawnRemoveGod", TASK_SPAWNREMOVEGOD + id);
        }
    }
}
 
public Spawn_Final(id) {
    if(id >= TASK_SPAWNPLAYER)
        id -= TASK_SPAWNPLAYER;
   
    give_item(id, "item_suit");
    fm_set_user_health(id, 100);   
}
 
public SpawnRemoveGod(id) {
    if(id >= TASK_SPAWNREMOVEGOD)
        id -= TASK_SPAWNREMOVEGOD;
   
    fm_set_user_godmode(id, 0);
}
 
public Glow(id, Red, Green, Blue, All) {   
    if(!task_exists(TASK_GLOW + id)) {
        if(All) {
            GlowLevel[id][0]    = 0;
            GlowLevel[id][1]    = 0;
            GlowLevel[id][2]    = 0;
            GlowLevel[id][3]    += All;
        }
        else if(Red) {
            GlowLevel[id][0]    += Red;
            GlowLevel[id][1]    = 0;
            GlowLevel[id][2]    = 0;
            GlowLevel[id][3]    = 0;
        }
        else if(Green) {
            GlowLevel[id][0]    = 0;
            GlowLevel[id][1]    += Green;
            GlowLevel[id][2]    = 0;
            GlowLevel[id][3]    = 0;
        }
        else if(Blue) {
            GlowLevel[id][0]    = 0;
            GlowLevel[id][1]    = 0;
            GlowLevel[id][2]    += Blue;
            GlowLevel[id][3]    = 0;
        }
       
        GlowLevel[id][0] = ((GlowLevel[id][0] > MAXGLOW) ? MAXGLOW : GlowLevel[id][0]);
        GlowLevel[id][1] = ((GlowLevel[id][1] > MAXGLOW) ? MAXGLOW : GlowLevel[id][1]);
        GlowLevel[id][2] = ((GlowLevel[id][2] > MAXGLOW) ? MAXGLOW : GlowLevel[id][2]);
        GlowLevel[id][3] = ((GlowLevel[id][3] > MAXGLOW) ? MAXGLOW : GlowLevel[id][3]);
       
        _Glow(id);
    }
}
 
public _Glow(id) {
    if(id >= TASK_GLOW)
        id -= TASK_GLOW;
   
    if(is_user_connected(id)) {
        new Red = GlowLevel[id][0];
        new Green = GlowLevel[id][1];
        new Blue = GlowLevel[id][2];
        new All = GlowLevel[id][3];
       
        if(Red || Green || Blue) {
           
            GlowLevel[id][0] = ((Red > 5) ? Red - 5 : 0);
            GlowLevel[id][1] = ((Green > 5) ? Green - 5 : 0);
            GlowLevel[id][2] = ((Blue > 5) ? Blue - 5   : 0);
           
            set_user_rendering(id, kRenderFxGlowShell, Red, Green, Blue, kRenderNormal, 16);
            set_task(0.2, "_Glow", TASK_GLOW + id);
           
        }
       
        else if(All) {
            GlowLevel[id][3] = ((All > 5)       ? All - 5       : 0);
           
            set_user_rendering(id, kRenderFxGlowShell, All, All, All, kRenderNormal, 16);
            set_task(0.2, "_Glow", TASK_GLOW + id);
           
        }
       
        else {
            set_user_rendering(id);
        }
       
    }
}
 
stock Create_ScreenFade(id, duration, holdtime, fadetype, red, green, blue, alpha){
    if(is_user_connected(id)) {
        message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)         
        write_short(duration)           // fade lasts this long duration
        write_short(holdtime)           // fade lasts this long hold time
        write_short(fadetype)           // fade type(in / out)
        write_byte(red)             // fade red
        write_byte(green)               // fade green
        write_byte(blue)                // fade blue
        write_byte(alpha)               // fade alpha
        message_end()
    }
}
 
stock Create_ScreenShake(id, amount, duration, frequency){
    if(is_user_connected(id)) {
        message_begin(MSG_ONE,get_user_msgid("ScreenShake"),{0,0,0},id)
        write_short(amount)             // ammount
        write_short(duration)               // lasts this long
        write_short(frequency)          // frequency
        message_end()
    }
}
 
stock death_message(Killer, Victim, const Weapon[]) {
    if(is_user_connected(Killer) && is_user_connected(Victim)) {
        set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET);
        ExecuteHamB(Ham_Killed, Victim, Killer, 2);
        set_msg_block(get_user_msgid("DeathMsg"), BLOCK_NOT);
       
        make_deathmsg(Killer, Victim, 0, Weapon);
       
        message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
        write_byte(Killer); // id
        write_short(pev(Killer, pev_frags)); // frags
        write_short(cs_get_user_deaths(Killer)); // deaths
        write_short(0); // class?
        write_short(get_user_team(Killer)); // team
        message_end();
       
        message_begin(MSG_BROADCAST, get_user_msgid("ScoreInfo"));
        write_byte(Victim); // id
        write_short(pev(Victim, pev_frags)); // frags
        write_short(cs_get_user_deaths(Victim)); // deaths
        write_short(0); // class?
        write_short(get_user_team(Victim)); // team
        message_end();
    }
}
 
public make_knockback(Victim, Float:origin[3], Float:maxspeed) {
    new Float:fVelocity[3];
    kickback(Victim, origin, maxspeed, fVelocity);
    entity_set_vector(Victim, EV_VEC_velocity, fVelocity);
   
    return(1);
}
 
stock kickback(ent, Float:fOrigin[3], Float:fSpeed, Float:fVelocity[3]) {
    new Float:fEntOrigin[3];
    entity_get_vector(ent, EV_VEC_origin, fEntOrigin);
   
    new Float:fDistance[3];
    fDistance[0] = fEntOrigin[0] - fOrigin[0];
    fDistance[1] = fEntOrigin[1] - fOrigin[1];
    fDistance[2] = fEntOrigin[2] - fOrigin[2];
    new Float:fTime = (vector_distance(fEntOrigin,fOrigin) / fSpeed);
    fVelocity[0] = fDistance[0] / fTime;
    fVelocity[1] = fDistance[1] / fTime;
    fVelocity[2] = fDistance[2] / fTime;
   
    return(fVelocity[0] && fVelocity[1] && fVelocity[2]);
}
 
public XP_WinRound(Winner) {
    new Players[32], Num, i, id;
    get_players(Players, Num);
   
    for(i = 0; i < Num; i++) {
        id = Players;
        if(get_user_team(id) == Winner) {
            new Float:BonusXP
            (get_user_flags(id) & VIP_LEVEL) ? (BonusXP = (WIN_ROUND * VIP_XP_MULTIPLIER)) : (BonusXP = WIN_ROUND)
           
            if(BonusXP) {
                new XP = floatround(BonusXP)
                set_user_xp(id, get_user_xp(id) + XP)
                ColorChat(id, "!gYou recieved!t %d XP!g for winning the round", XP);
            }
        }
    }
}
 
public GiveExperience(id, level, cid) {
    if (cmd_access(id, level, cid, 2)) {
        new arg[23], gplayers[32], num, i, players, name[32];
        get_user_name(id, name, 31);
        read_argv(1, arg, 23);
        new give_xp[10];
        read_argv(2, give_xp, charsmax(give_xp));
        new Experience = str_to_num(give_xp);
        if(equali(arg, "@All")) {
            get_players(gplayers, num, "ch");
            for(i = 0; i < num; i++) {
                players = gplayers;
                if(!is_user_connected(players))
                    continue;
                set_user_xp(players, get_user_xp(players) + Experience);   
            }
            switch(get_cvar_num("amx_show_activity")) {
                case 1: ColorChat(0, "!tADMIN!g give!t %d XP!g to all!t Players.", Experience);
                    case 2: ColorChat(0, "!t%s!g give!t %d XP!g to all!t Players.", name, Experience);
                }
        }
        new player = cmd_target(id, arg, 11);
        if(!player) {
            console_print(id, "Juctorul cu acel nume nu exista.");
        }
        else {
            set_user_xp(player, get_user_xp(player) + Experience);
            switch(get_cvar_num("amx_show_activity")) {
                case 1: ColorChat(player, "!tADMIN!g give you!t %d XP.", Experience);
                    case 2: ColorChat(player, "!t%s!g give you!t %d XP.", name, Experience);
                }
        }
    }
}
 
public ResetExperience(id, level, cid) {
    if (cmd_access(id, level, cid, 2)) {
        new arg[23], gplayers[32], num, i, players, name[32];
        get_user_name(id, name, 31);
        read_argv(1, arg, 23);
        if(equali(arg, "@All")) {
            get_players(gplayers, num, "ch");
            for(i = 0; i < num; i++) {
                players = gplayers[i];
                if(!is_user_connected(players))
                    continue;
                set_user_xp(players, 0);   
            }
            switch(get_cvar_num("amx_show_activity")) {
                case 1: ColorChat(0, "!tADMIN!g reset!t XP!g to all!t Players.");
                    case 2: ColorChat(0, "!t%s!g reset!t XP!g to all!t Players.", name);
                }
        }
        new player = cmd_target(id, arg, 11);
        if(!player) {
            console_print(id, "Juctorul cu acel nume nu exista.");
        }
        else {
            set_user_xp(player, 0);
            switch(get_cvar_num("amx_show_activity")) {
                case 1: ColorChat(player, "!tADMIN!g reset your!t Experience.");
                    case 2: ColorChat(player, "!t%s!g reset your!t Experience.", name);
                }
        }
    }
}
 
public furien_get_user_team(id) {
    switch(get_user_team(id)) {
        case 1:
            return 0
        case 2:
            return 1
        default:
            return -1
    }
    return -1
}
 
public SavePowers(id) {
    new Name[32];
    get_user_name(id, Name, 31);
   
    new UnholyAura
    #if defined POWER_UNHOLYAURA
    UnholyAura = UnholyAura_Level[id]
    #else
    UnholyAura = TempUnholyAura_Level[id]
    #endif
    new Levitation
    #if defined POWER_LEVITATION
    Levitation = Levitation_Level[id]
    #else
    Levitation = TempLevitation_Level[id]
    #endif
    new VampiricAura
    #if defined POWER_VAMPIRICAURA
    VampiricAura = VampiricAura_Level[id]
    #else
    VampiricAura = TempVampiricAura_Level[id]
    #endif
    new Evasion
    #if defined POWER_EVASION
    Evasion = Evasion_Level[id]
    #else
    Evasion = TempEvasion_Level[id]
    #endif
    new TrueShot
    #if defined POWER_TRUESHOT
    TrueShot = TrueShot_Level[id]
    #else
    TrueShot = TempTrueShot_Level[id]
    #endif
    new Banish
    #if defined POWER_BANISH
    Banish = Banish_Level[id]
    #else
    Banish = TempBanish_Level[id]
    #endif
    new Phoenix
    #if defined POWER_PHOENIX
    Phoenix = Phoenix_Level[id]
    #else
    Phoenix = TempPhoenix_Level[id]
    #endif
    new DevotionAura
    #if defined POWER_DEVOTIONAURA
    DevotionAura = DevotionAura_Level[id]
    #else
    DevotionAura = TempDevotionAura_Level[id]
    #endif
    new Bash
    #if defined POWER_BASH
    Bash = Bash_Level[id]
    #else
    Bash = TempBash_Level[id]
    #endif
    new CriticalStrike
    #if defined POWER_CRITICALSTRIKE
    CriticalStrike = CriticalStrike_Level[id]
    #else
    CriticalStrike = TempCriticalStrike_Level[id]
    #endif
    new CriticalGrenade
    #if defined POWER_CRITICALGRENADE
    CriticalGrenade = CriticalGrenade_Level[id]
    #else
    CriticalGrenade = TempCriticalGrenade_Level[id]
    #endif
    new SiphonMana
    #if defined POWER_SIPHONMANA
    SiphonMana = SiphonMana_Level[id]
    #else
    SiphonMana =  TempSiphonMana_Level[id]
    #endif
    new HealingWave
    #if defined POWER_HEALINGWAVE
    HealingWave = HealingWave_Level[id]
    #else
    HealingWave = TempHealingWave_Level[id]
    #endif
    new ShadowStrike
    #if defined POWER_SHADOWSTRIKE
    ShadowStrike = ShadowStrike_Level[id]
    #else
    ShadowStrike = TempShadowStrike_Level[id]
    #endif
 
    new PowersData[1024]
    formatex(PowersData, sizeof(PowersData) - 1, "^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^" ^"%d^"", PlayerExperience[id], UnholyAura, Levitation, VampiricAura, Evasion, TrueShot, Banish, Phoenix, DevotionAura, Bash, CriticalStrike, CriticalGrenade, SiphonMana, HealingWave, ShadowStrike)
   
    new Save[1024]
    format(Save, sizeof(Save) - 1, "^"%s^" %s", Name, PowersData)
   
    new Line[128], Linie, IsPlayer = false, Arg1[32]
   
    new FileOpen = fopen(PowersFile, "rt")
    while(!feof(FileOpen)) {
        fgets(FileOpen, Line, 127)
        trim(Line)
       
        parse(Line, Arg1, 31)
       
        if (equali(Arg1, Name)) {
            write_file(PowersFile, Save, Linie)
            IsPlayer = true
            break
        }
       
        Linie++
    }
    fclose(FileOpen)
    if (!IsPlayer)
        write_file(PowersFile, Save, -1)
}
 
public LoadPowers(id) {
    new Name[32];
    get_user_name(id, Name, 31);
   
    new Line[128], IsPlayer = false, Arg1[32], Arg2[32], Arg3[32], Arg4[32], Arg5[32], Arg6[32], Arg7[32], Arg8[32],
    Arg9[32], Arg10[32], Arg11[32], Arg12[32], Arg13[32], Arg14[32], Arg15[32], Arg16[32];
   
    new FileOpen = fopen(PowersFile, "rt")
    while(!feof(FileOpen)) {
        fgets(FileOpen, Line, 127)
        trim(Line)
       
        parse(Line, Arg1, 31, Arg2, 31, Arg3, 31, Arg4, 31, Arg5, 31, Arg6, 31, Arg7, 31, Arg8, 31, Arg9, 31, Arg10, 31, Arg11, 31, Arg12, 31, Arg13, 31, Arg14, 31, Arg15, 31, Arg16, 31)
       
        if (equali(Arg1, Name)) {
            #if defined POWER_UNHOLYAURA
            UnholyAura_Level[id] = str_to_num(Arg3)
            #else
            TempUnholyAura_Level[id] = str_to_num(Arg3)
            #endif
            #if defined POWER_LEVITATION
            Levitation_Level[id] = str_to_num(Arg4)
            #else
            TempLevitation_Level[id] = str_to_num(Arg4)
            #endif
            #if defined POWER_VAMPIRICAURA
            VampiricAura_Level[id] = str_to_num(Arg5)
            #else
            TempVampiricAura_Level[id] = str_to_num(Arg5)
            #endif
            #if defined POWER_EVASION
            Evasion_Level[id] = str_to_num(Arg6)
            #else
            TempEvasion_Level[id] = str_to_num(Arg6)
            #endif
            #if defined POWER_TRUESHOT
            TrueShot_Level[id] = str_to_num(Arg7)
            #else
            TempTrueShot_Level[id] = str_to_num(Arg7)
            #endif
            #if defined POWER_BANISH
            Banish_Level[id] = str_to_num(Arg8)
            #else
            TempBanish_Level[id] = str_to_num(Arg8)
            #endif
            #if defined POWER_PHOENIX
            Phoenix_Level[id] = str_to_num(Arg9)
            #else
            TempPhoenix_Level[id] = str_to_num(Arg9)
            #endif
            #if defined POWER_DEVOTIONAURA
            DevotionAura_Level[id] = str_to_num(Arg10)
            #else
            TempDevotionAura_Level[id] = str_to_num(Arg10)
            #endif
            #if defined POWER_BASH
            Bash_Level[id] = str_to_num(Arg11)
            #else
            TempBash_Level[id] = str_to_num(Arg11)
            #endif
            #if defined POWER_CRITICALSTRIKE
            CriticalStrike_Level[id] = str_to_num(Arg12)
            #else
            TempCriticalStrike_Level[id] = str_to_num(Arg12)
            #endif
            #if defined POWER_CRITICALGRENADE
            CriticalGrenade_Level[id] = str_to_num(Arg13)
            #else
            TempCriticalGrenade_Level[id] = str_to_num(Arg13)
            #endif
            #if defined POWER_SIPHONMANA
            SiphonMana_Level[id] = str_to_num(Arg14)
            #else
            TempSiphonMana_Level[id] = str_to_num(Arg14)
            #endif
            #if defined POWER_HEALINGWAVE
            HealingWave_Level[id] = str_to_num(Arg15)
            #else
            TempHealingWave_Level[id] = str_to_num(Arg15)
            #endif
            #if defined POWER_SHADOWSTRIKE
            ShadowStrike_Level[id] = str_to_num(Arg16)
            #else
            TempShadowStrike_Level[id] = str_to_num(Arg16)
            #endif
 
            CreditsUsed[id] = (str_to_num(Arg3) + str_to_num(Arg4) + str_to_num(Arg5) + str_to_num(Arg6) + str_to_num(Arg7) + str_to_num(Arg8) + str_to_num(Arg9) + str_to_num(Arg10) + str_to_num(Arg11) + str_to_num(Arg12) + str_to_num(Arg13) + str_to_num(Arg14) + str_to_num(Arg15) + str_to_num(Arg16))
           
            new XP = str_to_num(Arg2)
            set_user_xp(id, XP)            
 
            IsPlayer = true
            break
        }
    }
    fclose(FileOpen)
   
    if (!IsPlayer) {       
        #if defined POWER_UNHOLYAURA
        UnholyAura_Level[id] = 0
        #else
        TempUnholyAura_Level[id] = 0
        #endif
        #if defined POWER_LEVITATION
        Levitation_Level[id] = 0
        #else
        TempLevitation_Level[id] = 0
        #endif
        #if defined POWER_VAMPIRICAURA
        VampiricAura_Level[id] = 0
        #else
        TempVampiricAura_Level[id] = 0
        #endif
        #if defined POWER_EVASION
        Evasion_Level[id] = 0
        #else
        TempEvasion_Level[id] = 0
        #endif
        #if defined POWER_TRUESHOT
        TrueShot_Level[id] = 0
        #else
        TempTrueShot_Level[id] = 0
        #endif
        #if defined POWER_BANISH
        Banish_Level[id] = 0
        #else
        TempBanish_Level[id] = 0
        #endif
        #if defined POWER_PHOENIX
        Phoenix_Level[id] = 0
        #else
        TempPhoenix_Level[id] = 0
        #endif
        #if defined POWER_DEVOTIONAURA
        DevotionAura_Level[id] = 0
        #else
        TempDevotionAura_Level[id] = 0
        #endif
        #if defined POWER_BASH
        Bash_Level[id] = 0
        #else
        TempBash_Level[id] = 0
        #endif
        #if defined POWER_CRITICALSTRIKE
        CriticalStrike_Level[id] = 0
        #else
        TempCriticalStrike_Level[id] = 0
        #endif
        #if defined POWER_CRITICALGRENADE
        CriticalGrenade_Level[id] = 0
        #else
        TempCriticalGrenade_Level[id] = 0
        #endif
        #if defined POWER_SIPHONMANA
        SiphonMana_Level[id] = 0
        #else
        TempSiphonMana_Level[id] = 0
        #endif
        #if defined POWER_HEALINGWAVE
        HealingWave_Level[id] = 0
        #else
        TempHealingWave_Level[id] = 0
        #endif
        #if defined POWER_SHADOWSTRIKE
        ShadowStrike_Level[id] = 0
        #else
        TempShadowStrike_Level[id] = 0
        #endif
       
        PlayerExperience[id] = 0
        PlayerLevel[id] = 0
        CreditsUsed[id] = 0
        Credits[id] = 0
    }
}
 
 
 
 
#define clamp_byte(%1)       ( clamp( %1, 0, 255 ) )
#define pack_color(%1,%2,%3) ( %3 + ( %2 << 8 ) + ( %1 << 16 ) )
 
stock HudMessage(const id, const message[], red = 0, green = 160, blue = 0, Float:x = -1.0, Float:y = 0.65, effects = 2, Float:fxtime = 0.01, Float:holdtime = 3.0, Float:fadeintime = 0.01, Float:fadeouttime = 0.01) {
    new count = 1, players[32];
   
    if(id) players[0] = id;
    else get_players(players, count, "ch"); {
        for(new i = 0; i < count; i++) {
            if(is_user_connected(players[i])) {
                new color = pack_color(clamp_byte(red), clamp_byte(green), clamp_byte(blue))
               
                message_begin(MSG_ONE_UNRELIABLE, SVC_DIRECTOR, _, players[i]);
                write_byte(strlen(message) + 31);
                write_byte(DRC_CMD_MESSAGE);
                write_byte(effects);
                write_long(color);
                write_long(_:x);
                write_long(_:y);
                write_long(_:fadeintime);
                write_long(_:fadeouttime);
                write_long(_:holdtime);
                write_long(_:fxtime);
                write_string(message);
                message_end();
            }
        }
    }
}
 
stock ColorChat(const id, const input[], any:...) {
    new count = 1, players[32];
    static msg[191];
    vformat(msg, 190, input, 3);
   
    replace_all(msg, 190, "!g", "^4");
    replace_all(msg, 190, "!y", "^1");
    replace_all(msg, 190, "!t", "^3");
   
    if(id) players[0] = id;
    else get_players(players, count, "ch"); {
        for(new i = 0; i < count; i++) {
            if(is_user_connected(players[i])) {
                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
                write_byte(players[i]);
                write_string(msg);
                message_end();
            }
        }
    }
}
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest