[FURIEN] Ultimate VIP

Pluginuri pentru modul AmxModX.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2811
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 244 times
Been thanked: 129 times
Contact:

13 Oct 2014, 20:37

Se referea la ce am scris eu mai sus.
Vezi ca o dam in offtopic.
RoyalServer
User avatar
EuSemakka
Membru, skill +1
Membru, skill +1
Posts: 301
Joined: 26 Nov 2013, 17:40
Detinator Steam: Da
Detinator server CS: Furien.FaraLaG.Ro
Has thanked: 38 times
Been thanked: 7 times

28 Mar 2015, 22:36

Are cineva resursele pentru acest plugin ?
User avatar
LOLpgl
Membru, skill +3
Membru, skill +3
Posts: 1127
Joined: 16 Dec 2013, 21:01
Detinator Steam: Da
SteamID: ionutcruso
Location: Rm.Valcea
Has thanked: 19 times
Been thanked: 15 times

28 Mar 2015, 22:40

Are cineva resursele? :)
Rio*
Membru, skill 0
Membru, skill 0
Posts: 62
Joined: 01 Mar 2015, 12:41
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

02 Apr 2015, 19:13

RESURSELE PLZZZ
User avatar
Jorj
Fost moderator
Fost moderator
Posts: 3494
Joined: 13 Aug 2013, 18:10
Detinator Steam: Da
Detinator server CS: Furien.LsZ.Ro
SteamID: clic_lsz
Reputatie: Fost eXtream Mod
Fost Membru Club eXtreamCS (patru luni)
Nume anterior: Clic
Location: Piatra Neamt
Has thanked: 1 time
Been thanked: 20 times
Contact:

06 Jun 2015, 13:16

Am si eu nevoie de resurse ... Le are cineva ?
Intermediez tranzactii cand am chef si timp ! :)

Image
User avatar
DaNNe.
Fost moderator
Fost moderator
Posts: 2811
Joined: 08 Nov 2013, 20:43
Detinator Steam: Da
CS Status: Activitate scăzută
SteamID: /id/FurienMaster
Reputatie: Nick anterior: DnD. Gold, Emrys
0.5/3
Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Has thanked: 244 times
Been thanked: 129 times
Contact:

14 Mar 2016, 21:12

Le gasesti cu un search pe google.
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 428
Joined: 25 May 2015, 07:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 3 times
Contact:

15 Feb 2018, 15:13

DaNNe. wrote:Descriere: Un plugin cu niste puteri pentru FURIEN.

Descarcare:
SMA | Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <  amxmodx  >
#include <  cstrike  >
#include <  hamsandwich  >
#include <  fakemeta_util  >

#include <  nvault  >
#include <  engine  >
#include <  xs  >

#define VERSION "0.1a"
#define szPrefix "^x03[ULTIMATE VIP]^x04 -"
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )

#define VIP_SILVER ADMIN_LEVEL_F
#define VIP_GOLD ADMIN_LEVEL_G
#define VIP_DIAMOND ADMIN_LEVEL_H

#define FFADE_IN		0x0000		// Just here so we don't pass 0 into the function
#define FFADE_OUT		0x0001		// Fade out (not in)
#define FFADE_MODULATE		0x0002		// Modulate (don't blend)
#define FFADE_STAYOUT		0x0004		// ignores the duration, stays faded out until new ScreenFade message received
#define BREAK_GLASS		0x01

new const thunder_sound[] = "ambience/thunder_clap.wav";
new g_lightning, g_smoke, ThunderSprite;
new FireAmmo [ 33 ];
new g_iMaxPlayers, RippleSprite;
new bool: UserIsVIP [ 33 ], bool: UserIsSilver [ 33 ], bool: UserIsGold [ 33 ], bool: UserIsDiamond [ 33 ];
new HasPower [ 33 ], NextPower [ 33 ], Float: LastMessage [ 33 ];
new Teleport_Countdown[33], TeleportSprite, TeleportSprite2, Thunder_Countdown [ 33 ];
new cvar_ring_countdown, cvar_thunder_countdown, cvar_bolt_countdown, cvar_autoheal_countdown, cvar_shock_countdown,  cvar_acid_countdown, cvar_teleport_countdown, cvar_invincibility_countdown, cvar_invincibility_duration
new Invincibility_Countdown [ 33 ], Invincibility_Duration [ 33 ], AutoHeal_Countdown [ 33 ], AcidSpit_Countdown [ 33 ];
new const SOUND_TELEPORT[] = { "weapons/flashbang-1.wav" }
new Vault;
const UNIT_SEC = 0x1000
const FFADE = 0x0000
const UNIT_SECOND = (1<<12)
const BREAK_WOOD = 0x08
new gShockWaveSprite;
new fire_sound[] = "weapons/plauncher-1.wav"

enum {
	Red,
	Green,
	Blue
}

// ACID SPIT

#define ENG_NULLENT			-1
#define EV_INT_WEAPONKEY	EV_INT_impulse
#define POISON_WEAPONKEY		233
#define WEAP_LINUX_XTRA_OFF			4
#define m_fKnown				44
#define m_flNextPrimaryAttack 			46
#define m_flTimeWeaponIdle			48
#define m_iClip					51
#define m_fInReload				54
#define PLAYER_LINUX_XTRA_OFF			5
#define m_flNextAttack				83
#define  TIME_POISON				5.0
#define CSW_WPN_POISON		CSW_M3
#define OFFSET_TIME_ATTACK 0.6
#define WPN_RELOAD_TIME 3.4

#define RED 60
#define GREEN 250
#define BLUE 0
#define PEV_ENT_TIME pev_fuser1

new const fire_classname_could[] = "fire_salamander"
new const fire_spr_name_cloud[] = "sprites/ultimatevip/fire.spr"
new const g_szShockWaveSprite[    ]  =  "sprites/ultimatevip/muzzleflash3.spr";

// Precahce files
new const fire_model_name[] = 	"models/ultimatevip/spore.mdl"
new const fire_poison[] = 		"models/ultimatevip/spore_poison.mdl"
new const fire_spr_name[] = 		"sprites/laserbeam.spr"
new const fire_sprite[] = 		"sprites/ultimatevip/poison_spr.spr"
new const spr_poison_flare[] = 	"sprites/ultimatevip/poison_flare.spr"

new g_sound[][] = {
	"weapons/plauncher_draw.wav",
	"weapons/plaunch_clipin.wav",
	"weapons/plaunch_clipout.wav",
	"weapons/plauncher_explode.wav"
}


// classname
new const fire_classname[] = "poison_fire"
new const poison_classname[] = "posion_spore"

enum {
	IDLE_ANIM = 0,
	DRAW_ANIM = 2,
	RELOAD_ANIM = 1,
	SHOOT_ANIM = 3,
	SHOOT_ANIM1 = 4,
	SHOOT_ANIM2 = 5
}

new sprite_ability, fire_spr_id, fire_spr_nameid, cvar_start_damage, cvar_end_damage, cvar_shot_speed, cvar_movetype
new Float:g_poison_touch[33], Float:gPoisonGlow[33], bool:gGlowPlayer[33], g_msgScreenShake
new bool:disc_opened[33]

// END ACID SPIT

new const g_szExplodeSound2[    ]  =  "ambience/particle_suck1.wav";	

public plugin_init (	) {
	
	register_plugin ( "Ultimate Furien VIP", VERSION, "Hades Ownage" );
	
	RegisterHam ( Ham_Spawn, "player", "Player_Spawn", 1 );
	RegisterHam ( Ham_Killed, "player", "Player_Killed", 0 );
	RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
	
	register_clcmd ( "say /furienvip", "ShowVIPMenu" );
	register_clcmd ( "ultimate", "UltimateCMD" );
	
	register_message(get_user_msgid("ScoreAttrib"),"vip_scoreboard");
	g_iMaxPlayers = get_maxplayers ( 	);
	
	cvar_ring_countdown = register_cvar ( "vip_ring_countdown", "20" );
	cvar_bolt_countdown = register_cvar ( "vip_bolt_countdown", "20" );
	cvar_shock_countdown = register_cvar ( "vip_shock_countdown", "20" );
	cvar_acid_countdown = register_cvar ( "vip_spit_countdown", "20" );
	cvar_teleport_countdown = register_cvar ( "vip_teleport_countdown", "20" );
	cvar_invincibility_countdown = register_cvar ( "vip_invincibility_countdown", "20" );
	cvar_invincibility_duration = register_cvar ( "vip_invincibility_duration", "3" );
	cvar_autoheal_countdown = register_cvar ( "vip_autoheal_countdown", "20" );
	cvar_thunder_countdown = register_cvar ( "vip_thunder_countdown", "20" );
	
	register_touch(fire_classname_could, "*", "fw_touch_fire")
	register_think(fire_classname_could, "fw_think_fire")
	
	// ACID SPIT
	
	cvar_shot_speed = register_cvar("zp_pl_bulletspeed", "500")	// Speed shot
	cvar_movetype = register_cvar("zp_pl_movetype", "0")	// 0 - Line, 1 - Toss
	cvar_start_damage = register_cvar("zp_pl_startdamage", "90.0")	// Урон
	cvar_end_damage = register_cvar("zp_pl_enddamage", "160.0")	// Урон
	g_msgScreenShake = get_user_msgid("ScreenShake")
	set_cvar_num("sv_maxvelocity", 8000)
	
	register_touch(fire_classname, "*", "fw_touch_shot")
	register_think(fire_classname, "fw_think")
	register_touch(poison_classname, "*", "fw_touch_poison")
	
	// END ACID SPIT
}

public plugin_precache (	) {
	
	gShockWaveSprite  =  precache_model(  g_szShockWaveSprite  );
	RippleSprite = precache_model ( "sprites/ultimatevip/ripple.spr" );
	precache_sound ( g_szExplodeSound2 );
	
	precache_model(fire_spr_name_cloud)
	precache_sound("weapons/flamegun-1.wav")
	precache_sound ( "weapons/flamegun-2.wav" );
	
	
	TeleportSprite = precache_model( "sprites/blue_lightning_blizzard.spr");
	TeleportSprite2 = precache_model( "sprites/ultimatevip/3dmflared.spr");
	
	precache_sound(SOUND_TELEPORT);
	
	// ACID SIPT
	
	for(new i=0;i<sizeof g_sound;i++) precache_sound(g_sound)
	
	precache_sound(fire_sound)
	
	precache_model(fire_model_name)
	precache_model(fire_poison)
	sprite_ability = engfunc(EngFunc_PrecacheModel, spr_poison_flare)	
	fire_spr_id = precache_model(fire_sprite)
	fire_spr_nameid = precache_model(fire_spr_name)
	
	// ACID SPIT
	
	precache_sound( thunder_sound );
	g_lightning = precache_model( "sprites/lgtning.spr" );
	g_smoke = precache_model( "sprites/steam1.spr" );
	ThunderSprite = precache_model ( "sprites/ultimatevip/hugeball.spr" );
	
}

public client_putinserver (  id  ) {
	
	LoadPower ( id );
	
}

public client_disconnect ( id ) {
	
	SavePower ( id );
	
}

public vip_scoreboard(const MsgId, const MsgType, const MsgDest) {
	static id;
	id = get_msg_arg_int(1);
	if(UserIsVIP [ id ])
		set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
}

public Player_Killed (  id  ) {
	
	if ( HasPower [ id ] == 5 ) {
		
		new Float:fOrigin[ 3 ], iOrigin[ 3 ];
		pev( id, pev_origin, fOrigin  );
		
		FVecIVec(  fOrigin, iOrigin  );
		
		CreateBlast( 255, 102, 51, iOrigin );
		
		emit_sound(  id, CHAN_WEAPON,  g_szExplodeSound2, 1.0, ATTN_NORM, 0, PITCH_NORM  );
		
		ExplodeAndDamageNearPlayers( id, fOrigin );
		
	}
	
}

public Player_Spawn (  id  ) {
	
	UserIsVIP [ id ] = false;
	UserIsSilver [ id ] = false;
	UserIsGold [ id ] = false;
	UserIsDiamond [ id ] = false;
	
	Invincibility_Countdown [ id ] = 0;
	Invincibility_Duration [ id ] = 0;
	Teleport_Countdown [ id ] = 0;
	AutoHeal_Countdown [ id ] = 0;
	AcidSpit_Countdown [ id ] = 0;
	Thunder_Countdown [ id ] = 0;
	
	if ( is_user_alive (  id  ) ) {
		
		if ( get_user_flags ( id ) & VIP_SILVER ) {
			
			fm_set_user_health ( id, 250 );
			fm_set_user_armor ( id, 250 );
			fm_set_user_maxspeed ( id, fm_get_user_maxspeed ( id ) + 100.0 );
			UserIsVIP [ id ] = true;
			UserIsSilver [ id ] = true;
			
		}
		
		if ( get_user_flags ( id ) & VIP_GOLD ) {
			
			fm_set_user_health ( id, 250 );
			fm_set_user_armor ( id, 250 );
			fm_set_user_maxspeed ( id, fm_get_user_maxspeed ( id ) + 125.0 );
			UserIsVIP [ id ] = true;
			UserIsGold [ id ] = true;
			
		}
		
		if ( get_user_flags ( id ) & VIP_DIAMOND ) {
			
			fm_set_user_health ( id, 250 );
			fm_set_user_armor ( id, 250 );
			fm_set_user_maxspeed ( id, fm_get_user_maxspeed ( id ) + 150.0 );
			fm_set_user_gravity ( id, fm_get_user_gravity ( id ) + 0.125 );
			UserIsVIP [ id ] = true;
			UserIsDiamond [ id ] = true;
			
		}
		
		if ( UserIsVIP [ id ] ) {
			
			HasPower [ id ] = NextPower [ id ];
			client_cmd ( id, "bind v ultimate" );
			SavePower ( id );
			
			set_task ( 15.0, "GiveHE", id );
			set_task ( 2.0, "Regeneration", id );
		}
		
		if ( HasPower [ id ] == 9 ) FireAmmo [ id ] = 30;
	}
}

public Player_TakeDamage (  iVictim, iInflictor, iAttacker, Float:fDamage  ) {
	
	if ( get_user_team ( iAttacker ) == get_user_team ( iVictim ) || iAttacker == iVictim )
		return 1;
	
	if ( UserIsSilver [ iAttacker ] && IsPlayer ( iAttacker ) ) 	SetHamParamFloat ( 4, fDamage + 50.0 );
	
	if ( UserIsGold [ iAttacker ] && IsPlayer ( iAttacker ) )	 	SetHamParamFloat ( 4, fDamage + 60.0 );
	
	if ( UserIsDiamond [ iAttacker ] && IsPlayer ( iAttacker ) ) 	SetHamParamFloat ( 4, fDamage + 70.0 );
	
	
	return HAM_IGNORED;
}

public GiveHE (  id  ) {
	
	if ( is_user_alive ( id ) ) {
		
		fm_give_item ( id, "weapon_hegrenade" );
		set_task ( 30.0, "GiveHE", id );
	}
}

public Regeneration (  id  ) {
	
	if ( is_user_alive ( id ) ) {
		if ( get_user_health ( id ) < 150 )
			fm_set_user_health ( id, get_user_health ( id ) + 5 );
		set_task ( 2.0, "Regeneration", id );
	}
}

public ShowVIPMenu (  id  ) { 
	
	new Menu = menu_create("\rUltimate VIP Menu", "VIPMenuCmd");
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dInvincibility - \yCountdown:\r %d \yDuration:\r %d \d[Silver]", get_pcvar_num ( cvar_invincibility_countdown ), get_pcvar_num ( cvar_invincibility_duration ) );
		else if ( HasPower [ id ] == 1)
			formatex ( buffer, sizeof ( buffer ) -1,"\rInvincibility - Countdown: %d Duration: %d \d[Silver]", get_pcvar_num ( cvar_invincibility_countdown ), get_pcvar_num ( cvar_invincibility_duration ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wInvincibility - \yCountdown:\r %d \yDuration:\r %d \d[Silver]", get_pcvar_num ( cvar_invincibility_countdown ), get_pcvar_num ( cvar_invincibility_duration ) );
		menu_additem ( Menu, buffer, "1", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dTeleport - \yCountdown:\r %d \d[Silver]", get_pcvar_num ( cvar_teleport_countdown ) );
		else if ( HasPower [ id ] == 2)
			formatex ( buffer, sizeof ( buffer ) -1,"\rTeleport - Countdown: %d \d[Silver]", get_pcvar_num ( cvar_teleport_countdown ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wTeleport - \yCountdown:\r %d \d[Silver]", get_pcvar_num ( cvar_teleport_countdown ) );
		menu_additem ( Menu, buffer, "2", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dAuto Heal - \yCountdown:\r %d \d[Silver]", get_pcvar_num ( cvar_autoheal_countdown ) );
		else if ( HasPower [ id ] == 3)
			formatex ( buffer, sizeof ( buffer ) -1,"\rAuto Heal - Countdown: %d \d[Silver]v", get_pcvar_num ( cvar_autoheal_countdown ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wAuto Heal - \yCountdown:\r %d \d[Silver]", get_pcvar_num ( cvar_autoheal_countdown ) );
		menu_additem ( Menu, buffer, "3", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dAcid Spit - \yCountdown:\r %d \d[Gold]", get_pcvar_num ( cvar_acid_countdown ) );
		else if ( HasPower [ id ] == 4)
			formatex ( buffer, sizeof ( buffer ) -1,"\rAcid Spit - Countdown: %d \d[Gold]", get_pcvar_num ( cvar_acid_countdown ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wAcid Spit - \yCountdown:\r %d \d[Gold]", get_pcvar_num ( cvar_acid_countdown ) );
		menu_additem ( Menu, buffer, "4", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dBomb Explode - \d[Gold]" );
		else if ( HasPower [ id ] == 5)
			formatex ( buffer, sizeof ( buffer ) -1,"\rBomb Explode - \d[Gold]" );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wBomb Explode - \d[Gold]" );
		menu_additem ( Menu, buffer, "5", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dPlasma Attack - \yCountdown:\r %d \d[Gold]", get_pcvar_num ( cvar_shock_countdown ) );
		else if ( HasPower [ id ] == 6)
			formatex ( buffer, sizeof ( buffer ) -1,"\rPlasma Attack - Countdown: %d \d[Gold]", get_pcvar_num ( cvar_shock_countdown ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wPlasma Attack - \yCountdown:\r %d \d[Gold]", get_pcvar_num ( cvar_shock_countdown ) );
		menu_additem ( Menu, buffer, "6", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dSuper Bolt Attack - \yCountdown:\r %d \d[Diamond]", get_pcvar_num ( cvar_bolt_countdown ) );
		else if ( HasPower [ id ] == 7)
			formatex ( buffer, sizeof ( buffer ) -1,"\rSuper Bolt Attack - Countdown: %d \d[Diamond]", get_pcvar_num ( cvar_bolt_countdown ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wSuper Bolt Attack - \yCountdown:\r %d \d[Diamond]", get_pcvar_num ( cvar_bolt_countdown ) );
		menu_additem ( Menu, buffer, "7", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dRing of Energy - \yCountdown:\r %d \d[Diamond]", get_pcvar_num ( cvar_ring_countdown ) );
		else if ( HasPower [ id ] == 8)
			formatex ( buffer, sizeof ( buffer ) -1,"\rRing of Energy - Countdown: %d \d[Diamond]", get_pcvar_num ( cvar_ring_countdown ) );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wRing of Energy - \yCountdown:\r %d \d[Diamond]", get_pcvar_num ( cvar_ring_countdown ) );
		menu_additem ( Menu, buffer, "8", 0 );
	}
	
	if ( is_user_connected ( id ) ) {
		
		new buffer [ 256 ];
		if ( !UserIsVIP [ id ] )
			formatex ( buffer, sizeof ( buffer ) -1,"\dCloud of Fire - \yAmmo:\r 30 \d[Diamond]" );
		else if ( HasPower [ id ] == 9)
			formatex ( buffer, sizeof ( buffer ) -1,"\rCloud of Fire - Ammo: 30 \d[Diamond]" );
		else
			formatex ( buffer, sizeof ( buffer ) -1,"\wCloud of Fire - \yAmmo:\r 30 \d[Diamond]" );
		menu_additem ( Menu, buffer, "9", 0 );
	}
	
	menu_setprop ( Menu, MPROP_EXIT, MEXIT_ALL );
	menu_display ( id, Menu, 0 );
	return PLUGIN_CONTINUE;
}

public VIPMenuCmd ( id, menu, item ) {
	
	if ( item == MENU_EXIT ) {
		menu_destroy ( menu );
		return 1;
	}
	
	if ( !UserIsVIP [ id ] ) {
		
		ColorChat ( id, "%s Trebuie sa ai VIP ca sa poti folosi puterile", szPrefix );
		return 1;
	}
	
	new data [ 6 ], iName [ 64 ];
	new access, callback;
	menu_item_getinfo ( menu, item, access, data,5, iName, 63, callback );
	new key = str_to_num ( data );
	switch ( key ) {
		
		case 1: 
		{
			if ( UserIsSilver [ id ] || UserIsGold [ id ] || UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 1 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 1;
				}
			}
		}
		
		case 2: 
		{
			if ( UserIsSilver [ id ] || UserIsGold [ id ] || UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 2 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 2;
				}
			}
		}
		
		case 3: 
		{
			if ( UserIsSilver [ id ] || UserIsGold [ id ] || UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 3 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 3;
				}
			}
		}
		
		case 4: 
		{
			if ( UserIsGold [ id ] || UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 4 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 4;
				}
			}
			
			else {
				
				ColorChat ( id, "%s Nu ai acces la aceasta putere.", szPrefix );
				return 1;
			}
		}
		
		case 5: 
		{
			if ( UserIsGold [ id ] || UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 5 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 5;
				}
			}
			
			else {
				
				ColorChat ( id, "%s Nu ai acces la aceasta putere.", szPrefix );
				return 1;
			}
		}
		
		case 6: 
		{
			if ( UserIsGold [ id ] || UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 6 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 6;
				}
			}
			
			else {
				
				ColorChat ( id, "%s Nu ai acces la aceasta putere.", szPrefix );
				return 1;
			}
		}
		
		case 7: 
		{
			if ( UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 7 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 7;
				}
			}
			
			else {
				
				ColorChat ( id, "%s Nu ai acces la aceasta putere.", szPrefix );
				return 1;
			}
		}
		
		case 8: 
		{
			if ( UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 8 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 8;
				}
			}
			
			else {
				
				ColorChat ( id, "%s Nu ai acces la aceasta putere.", szPrefix );
				return 1;
			}
		}
		
		case 9: 
		{
			if ( UserIsDiamond [ id ] ) {
				
				if ( NextPower [ id ] == 9 ) {
					
					ColorChat ( id, "%s Detii deja aceasta putere.", szPrefix );
				}
				
				else {
					ColorChat ( id, "%s Puterea ti se va activa la urmatorul spawn.", szPrefix );
					NextPower [ id ] = 9;
				}
			}
			
			else {
				
				ColorChat ( id, "%s Nu ai acces la aceasta putere.", szPrefix );
				return 1;
			}
		}
		
	}
	
	menu_destroy ( menu );
	return 1;
}

public UltimateCMD (  id  ) {
	
	if(UserIsVIP [ id ] && is_user_alive(id) ) {
		if(HasPower[id] == 1 && !Invincibility_Duration[id]) {
			if (Invincibility_Countdown[id]) {
				if(LastMessage[id] < get_gametime()) {
					LastMessage[id] = get_gametime() + 1.0;
					set_hudmessage(255, 170, 0, -1.0, 0.87, 0, 6.0, 1.0)
					show_hudmessage ( id, "Puterea iti va reveni in %d secund%s.",Invincibility_Countdown[id], Invincibility_Countdown[id] > 1 ? "e" : "a");
				}
			}
			else {
				fm_set_user_godmode(id, 1);
				Invincibility_Duration[id] = get_pcvar_num(cvar_invincibility_duration)
				message_begin(MSG_ONE, 108, {0,0,0}, id);
				write_byte(Invincibility_Duration[id]);
				write_byte(0);
				message_end();
				CountDown_Invincibility(id);
			}
		}
		
		if(HasPower[id] == 2) {
			if(Teleport_Countdown[id]) {
				if(LastMessage[id] < get_gametime()) {
					LastMessage[id] = get_gametime() + 1.0;
					set_hudmessage(255, 170, 0, -1.0, 0.87, 0, 6.0, 1.0)
					show_hudmessage ( id, "Puterea iti va reveni in %d secund%s.",Teleport_Countdown[id], Teleport_Countdown[id] > 1 ? "e" : "a");
				}
			}
			else if (teleport(id)) {
				emit_sound(id, CHAN_STATIC, SOUND_TELEPORT, 1.0, ATTN_NORM, 0, PITCH_NORM)
				Teleport_Countdown[id] = get_pcvar_num(cvar_teleport_countdown);
				CountDown_Teleport(id);
			}
			else {
				Teleport_Countdown[id] = 0
				set_hudmessage(255, 170, 0, -1.0, 0.87, 0, 6.0, 1.0);
				show_hudmessage ( id, "Pozitia de teleportare este invalida" );
			}
		}
		
		if(HasPower[id] == 3 ) {
			
			if(AutoHeal_Countdown[id]) {
				if(LastMessage[id] < get_gametime()) {
					LastMessage[id] = get_gametime() + 1.0;
					set_hudmessage(255, 170, 0, -1.0, 0.87, 0, 6.0, 1.0)
					show_hudmessage ( id, "Puterea iti va reveni in %d secund%s.",AutoHeal_Countdown[id], AutoHeal_Countdown[id] > 1 ? "e" : "a");
				}
			}
			else if ( autoheal ( id ) ) {
				
				AutoHeal_Countdown[id] = get_pcvar_num(cvar_autoheal_countdown);
				CountDown_AutoHeal(id);
			}
		}
		
		if(HasPower[id] == 4 ) {
			
			if(AcidSpit_Countdown[id]) {
				if(LastMessage[id] < get_gametime()) {
					LastMessage[id] = get_gametime() + 1.0;
					set_hudmessage(255, 170, 0, -1.0, 0.87, 0, 6.0, 1.0)
					show_hudmessage ( id, "Puterea iti va reveni in %d secund%s.",AcidSpit_Countdown[id], AcidSpit_Countdown[id] > 1 ? "e" : "a");
				}
			}
			else if ( acidspit ( id ) ) {
				
				AcidSpit_Countdown[id] = get_pcvar_num(cvar_acid_countdown);
				CountDown_AcidSpit(id);
			}
		}
		
		if(HasPower[id] == 7 ) {
			
			if(Thunder_Countdown[id]) {
				if(LastMessage[id] < get_gametime()) {
					LastMessage[id] = get_gametime() + 1.0;
					set_hudmessage(255, 170, 0, -1.0, 0.87, 0, 6.0, 1.0)
					show_hudmessage ( id, "Puterea iti va reveni in %d secund%s.",Thunder_Countdown[id], Thunder_Countdown[id] > 1 ? "e" : "a");
				}
			}
			else if ( thunderbolt ( id ) ) {
				
				Thunder_Countdown[id] = get_pcvar_num(cvar_thunder_countdown);
				CountDown_Thunder(id);
			}
		}
		
		if ( HasPower [ id ] == 9 ) {
			
			cloudfire ( id );
			
		}
	}
	
	return 1;
}

public CountDown_AutoHeal(id) {
	if(!is_user_alive(id) || HasPower[id] != 3) {
		AutoHeal_Countdown[id] = 0;
	}
	else if(AutoHeal_Countdown[id] > 0) {
		
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Iti vei putea folosi puterea in %d secund%s", AutoHeal_Countdown[id], AutoHeal_Countdown[id] == 1 ? "a" : "e");
		AutoHeal_Countdown[id]--;
		set_task(1.0, "CountDown_AutoHeal", id);
	}
	else if(AutoHeal_Countdown[id] <= 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Iti poti folosi puterea din nou");
		AutoHeal_Countdown[id] = 0;
	}
}

public CountDown_AcidSpit(id) {
	if(!is_user_alive(id) || HasPower[id] != 4) {
		AcidSpit_Countdown[id] = 0;
	}
	else if(AcidSpit_Countdown[id] > 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Iti vei putea folosi puterea in %d secund%s", AcidSpit_Countdown[id], AcidSpit_Countdown[id] == 1 ? "a" : "e");
		AcidSpit_Countdown[id]--;
		set_task(1.0, "CountDown_AcidSpit", id);
	}
	else if(AcidSpit_Countdown[id] <= 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Iti poti folosi puterea din nou");
		AcidSpit_Countdown[id] = 0;
	}
}

public CountDown_Thunder(id) {
	if(!is_user_alive(id) || HasPower[id] != 7) {
		Thunder_Countdown[id] = 0;
	}
	else if(Thunder_Countdown[id] > 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Iti vei putea folosi puterea in %d secund%s", Thunder_Countdown[id], Thunder_Countdown[id] == 1 ? "a" : "e");
		Thunder_Countdown[id]--;
		set_task(1.0, "CountDown_Thunder", id);
	}
	else if(Thunder_Countdown[id] <= 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Iti poti folosi puterea din nou");
		Thunder_Countdown[id] = 0;
	}
}

public CountDown_Invincibility(id) {
	if(!is_user_alive(id) || HasPower[id] != 1) {
		fm_set_user_godmode(id, 0)
		message_begin(MSG_ONE, 108, {0,0,0}, id);
		write_byte(0);
		write_byte(0);
		message_end();
		Invincibility_Duration[id] = 0;
	}
	else if(Invincibility_Duration[id] > 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Esti invincibil timp de %d secund%s", Invincibility_Duration[id], Invincibility_Duration[id] == 1 ? "a" : "e");
		Invincibility_Duration[id]--;
		if(Invincibility_Duration[id] <= 0)
			Invincibility_Countdown[id] = get_pcvar_num(cvar_invincibility_countdown);
		set_task(1.0, "CountDown_Invincibility", id);
	}
	else if(Invincibility_Duration[id] <= 0) {
		Invincibility_Countdown[id] = get_pcvar_num(cvar_invincibility_countdown);
		set_task(1.0, "CountDown_Invincibility2", id)
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Invincibilitatea s-a terminat");
		Invincibility_Duration[id] = 0;
		fm_set_user_godmode(id, 0)
		message_begin(MSG_ONE, 108, {0,0,0}, id);
		write_byte(0);
		write_byte(0);
		message_end();
	}
}

public CountDown_Invincibility2(id) {
	if(!is_user_alive(id) || HasPower[id] != 1) {
		Invincibility_Countdown[id] = 0;
	}
	else if(Invincibility_Countdown[id] > 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Invincibilitatea revine in %d secund%s", Invincibility_Countdown[id], Invincibility_Countdown[id] == 1 ? "a" : "e");
		Invincibility_Countdown[id]--;
		set_task(1.0, "CountDown_Invincibility2", id);
	}
	else if(Invincibility_Countdown[id] <= 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Poti folosi din nou invincibilitatea");
		Invincibility_Countdown[id] = 0;
	}
}

public CountDown_Teleport(id) {
	if(!is_user_alive(id) || HasPower[id] != 2) {
		Teleport_Countdown[id] = 0;
	}
	else if(Teleport_Countdown[id] > 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Te vei putea din nou teleporta in %d secund%s", Teleport_Countdown[id], Teleport_Countdown[id] == 1 ? "a" : "e");
		Teleport_Countdown[id]--;
		set_task(1.0, "CountDown_Teleport", id);
	}
	else if(Teleport_Countdown[id] <= 0) {
		set_hudmessage(255, 170, 0, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, 7);
		show_hudmessage(id, "Te poti teleporta din nou");
		Teleport_Countdown[id] = 0;
	}
}

bool: autoheal(  id  ) {
	
	if ( get_user_team ( id ) == 1 ) {
		
		fm_set_user_health ( id, 250 );
		
		new iPlayers[32]
		new iNum
		
		get_players( iPlayers, iNum, "e", "TERRORIST" )
		
		for( new i = 0; i < iNum; i++ )
		{
			new szName[32]
			get_user_name(id, szName, charsmax(szName)) 
			fm_set_user_health (iPlayers, 200 );
			
			set_hudmessage(85, 170, 255, -1.0, -1.0, 0, 6.0, 3.0)
			show_hudmessage(iPlayers, "%s ti-a daruit viata", szName)
		}
		
		
	}
	
	if ( get_user_team ( id ) == 2 ) {
		
		fm_set_user_health ( id, 250 );
		
		new iPlayers[32]
		new iNum
		
		get_players( iPlayers, iNum, "e", "CT" )
		
		for( new i = 0; i < iNum; i++ )
		{
			new szName[32]
			get_user_name(id, szName, charsmax(szName)) 
			fm_set_user_health (iPlayers, 200 );
			
			set_hudmessage(85, 170, 255, -1.0, -1.0, 0, 6.0, 3.0)
			show_hudmessage(iPlayers, "%s ti-a daruit viata", szName)
		}
		
		
	}
	
	return true;
}

bool:teleport(id) {
	new Float:vOrigin[3], Float:vNewOrigin[3],
	Float:vNormal[3], Float:vTraceDirection[3],
	Float:vTraceEnd[3];
	
	pev(id, pev_origin, vOrigin);
	
	velocity_by_aim(id, 123456789, vTraceDirection);
	xs_vec_add(vTraceDirection, vOrigin, vTraceEnd);
	
	engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, id, 0);
	
	new Float:flFraction;
	get_tr2(0, TR_flFraction, flFraction);
	if (flFraction < 1.0) {
		get_tr2(0, TR_vecEndPos, vTraceEnd);
		get_tr2(0, TR_vecPlaneNormal, vNormal);
	}
	
	xs_vec_mul_scalar(vNormal, 40.0, vNormal); // do not decrease the 40.0
	xs_vec_add(vTraceEnd, vNormal, vNewOrigin);
	
	if (is_player_stuck(id, vNewOrigin))
		return false;
	
	emit_sound(id, CHAN_STATIC, SOUND_TELEPORT, 1.0, ATTN_NORM, 0, PITCH_NORM);
	tele_effect(vOrigin);
	
	engfunc(EngFunc_SetOrigin, id, vNewOrigin);
	
	tele_effect2(vNewOrigin);
	
	if(is_user_connected(id)) {
		new shock[3]
		shock[0] = random_num(2,10)
		shock[1] = random_num(2,5)
		shock[2] = random_num(2,10)
		message_begin(MSG_ONE, get_user_msgid("ScreenShake"), _, id)
		write_short((1<<12)*shock[0])
		write_short((1<<12)*shock[1])
		write_short((1<<12)*shock[2])
		message_end()
	}
	return true;
}

stock is_player_stuck(id, Float:originF[3]) {
	engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0);
	
	if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
		return true;
	
	return false;
}

stock tele_effect(const Float:torigin[3]) {
	new origin[3];
	origin[0] = floatround(torigin[0]);
	origin[1] = floatround(torigin[1]);
	origin[2] = floatround(torigin[2]);
	
	message_begin(MSG_PAS, SVC_TEMPENTITY, origin);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+10);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+60);
	write_short(TeleportSprite);
	write_byte(0);
	write_byte(0);
	write_byte(3);
	write_byte(60);
	write_byte(0);
	write_byte(0);
	write_byte(0);
	write_byte(255);
	write_byte(255);
	write_byte(0);
	message_end();
}

stock tele_effect2(const Float:torigin[3]) {
	new origin[3];
	origin[0] = floatround(torigin[0]);
	origin[1] = floatround(torigin[1]);
	origin[2] = floatround(torigin[2]);
	
	message_begin(MSG_PAS, SVC_TEMPENTITY, origin);
	write_byte(TE_BEAMCYLINDER);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+10);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+60);
	write_short(TeleportSprite);
	write_byte(0);
	write_byte(0);
	write_byte(6);
	write_byte(80);
	write_byte(0);
	write_byte(0);
	write_byte(0);
	write_byte(255);
	write_byte(255);
	write_byte(0);
	message_end();
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_SPRITETRAIL);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]+40);
	write_coord(origin[0]);
	write_coord(origin[1]);
	write_coord(origin[2]);
	write_short(TeleportSprite2);
	write_byte(60);
	write_byte(20);
	write_byte(3);
	write_byte(70);
	write_byte(20);
	message_end();
}	

stock FixedUnsigned16(Float:flValue, iScale) {
	new iOutput;
	
	iOutput = floatround(flValue * iScale);
	if ( iOutput < 0 )
		iOutput = 0;
	
	if ( iOutput > 0xFFFF )
		iOutput = 0xFFFF;
	return iOutput;
}

stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=FFADE_IN,bool:bReliable=false,bool:bExternal=false) {
	if( id && !is_user_connected(id))
		return;
	
	new iFadeTime;
	if( flFxTime == -1.0 ) {
		iFadeTime = 4;
	}
	else {
		iFadeTime = FixedUnsigned16( flFxTime , 1<<12 );
	}
	
	static gmsgScreenFade;
	if( !gmsgScreenFade ) {
		gmsgScreenFade = get_user_msgid("ScreenFade");
	}
	
	new MSG_DEST;
	if( bReliable ) {
		MSG_DEST = id ? MSG_ONE : MSG_ALL;
	}
	else {
		MSG_DEST = id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST;
	}
	
	if( bExternal ) {
		emessage_begin( MSG_DEST, gmsgScreenFade, _, id );
		ewrite_short( iFadeTime );
		ewrite_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
		ewrite_short( iFlags );
		ewrite_byte( iColor[Red] );
		ewrite_byte( iColor[Green] );
		ewrite_byte( iColor[Blue] );
		ewrite_byte( iAlpha );
		emessage_end();
	}
	else {
		message_begin( MSG_DEST, gmsgScreenFade, _, id );
		write_short( iFadeTime );
		write_short( FixedUnsigned16( flHoldTime , 1<<12 ) );
		write_short( iFlags );
		write_byte( iColor[Red] );
		write_byte( iColor[Green] );
		write_byte( iColor[Blue] );
		write_byte( iAlpha );
		message_end();
	}
}

stock UTIL_FadeToBlack(id,Float:fxtime=3.0,bool:bReliable=false,bool:bExternal=false) {
	UTIL_ScreenFade(id, _, fxtime, fxtime, 255, FFADE_OUT|FFADE_STAYOUT,bReliable,bExternal);
}

public SavePower (  id  ) {
	
	Vault = nvault_open ( "VIPFurienPower" );
	new data_power [ 256 ], key_power [ 64 ];
	
	new name [ 33 ];
	get_user_name ( id, name, 32 );
	format ( key_power, 63, "%s-/", name );
	
	format ( data_power, 255, "%d#", NextPower [ id ] );
	nvault_set ( Vault, key_power, data_power );
	nvault_close ( Vault );
	return PLUGIN_CONTINUE;
}

public LoadPower (  id  ) {
	
	Vault = nvault_open ( "VIPFurienPower" );
	new data_power [ 256 ], key_power [ 64 ];
	new name [ 33 ];
	get_user_name ( id, name, 32 );
	format ( key_power, 63, "%s-/", name );
	
	format ( data_power, 255, "%d#", NextPower [ id ] );
	nvault_get ( Vault, key_power, data_power, 255 );
	replace_all ( data_power, 255, "#", " ");
	
	new Power [ 32 ];
	parse ( data_power, Power, 31 );
	NextPower [ id ] = str_to_num ( Power );
	if ( NextPower [ id ] > 9) 
		NextPower [ id ] == random_num ( 1,9 );
	nvault_close ( Vault );
	return PLUGIN_CONTINUE;
} 

// ACID SPIT

bool: acidspit (id) {
	
	new Float:Puch[3]
	pev(id, pev_punchangle, Puch)
	Puch[0]-=random_float(3.0, 6.0)
	emit_sound(id, CHAN_WEAPON, fire_sound, 1.0, ATTN_NORM, 0, PITCH_NORM)
	throw_fire(id)
	set_pev(id,pev_punchangle,Puch)
	
	return true;
}

public throw_fire(id)
{
	new iEnt = create_entity("info_target")
	new Float:vfVelocity[3]
	
	velocity_by_aim(id, (get_pcvar_num(cvar_shot_speed)*10), vfVelocity)
	
	// add velocity of Owner for ent
	new Float:vfAttack[3], Float:vfAngle[3], Float:vOfps[3]
	get_weapon_attackment(id, vfAttack, 20.0)
	pev(id, pev_view_ofs, vOfps)
	pev(id, pev_angles, vfAngle)
	
	// set info for ent
	set_pev(iEnt, pev_movetype, MOVETYPE_FLY)
	set_pev(iEnt, PEV_ENT_TIME, get_gametime() + 5.0)	// time remove
	set_pev(iEnt, pev_classname, fire_classname)
	engfunc(EngFunc_SetModel, iEnt, fire_model_name)	//fire_model_name
	set_pev(iEnt, pev_mins, Float:{-2.0, -2.0, -2.0})
	set_pev(iEnt, pev_maxs, Float:{2.0, 2.0, 2.0})
	set_pev(iEnt, pev_body, 2)
	set_pev(iEnt, pev_origin, vfAttack)
	set_pev(iEnt, pev_velocity, vfVelocity)
	set_pev(iEnt, pev_solid, SOLID_BBOX)
	set_pev(iEnt, pev_owner, id)
	set_pev(iEnt, pev_iuser2, 1)
	set_pev(iEnt, pev_vuser1, vfVelocity)
	set_pev(iEnt, pev_angles, vfAngle)
	set_pev(iEnt, pev_v_angle, vOfps)
	
	set_pev(iEnt, pev_rendermode, kRenderTransAdd)
	set_pev(iEnt, pev_renderamt, 130.0)
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
	write_byte(TE_BEAMFOLLOW) // TE id
	write_short(iEnt) // entity
	write_short(fire_spr_nameid) // sprite
	write_byte(8) // life
	write_byte(6) // width
	write_byte(RED) // r
	write_byte(GREEN) // g
	write_byte(BLUE) // b
	write_byte(180) // brightness
	message_end()
	set_task(OFFSET_TIME_ATTACK, "RemoveDisk", id+2242)
}

public RemoveDisk(taskid)
{
	disc_opened[taskid-2242] = false;
	remove_task(taskid)
}

public fw_remove_poison(taskEnt)
{
	new Ent=taskEnt-1234
	if(is_valid_ent(Ent)) engfunc(EngFunc_RemoveEntity, Ent)
	remove_task(taskEnt)
}

public fw_touch_poison(ent, touch)
{
	client_print(0, print_center, "Touch")
	if(is_user_alive(touch))
	{
		static Float:CurTime
		CurTime = get_gametime()
		
		if(CurTime - 1.0 > g_poison_touch[touch])
		{
			new Owner = pev(ent, pev_owner)
			ExecuteHamB(Ham_TakeDamage, touch, Owner, touch, 50.0, DMG_BLAST)
			
			g_poison_touch[touch] = CurTime
		}
	}
}

public fw_touch_shot(ent, id)
{
	emit_sound(ent, CHAN_ITEM, g_sound[3], 1.0, ATTN_NORM, 0, PITCH_NORM)
	new Float:vOrigin[3]
	pev(ent, pev_origin, vOrigin);
	
	new classname[1024]
	pev(id, pev_classname, classname, charsmax(classname))
	if(equal(classname, "func_wall") || equal(classname, "func_breakable") || equal(classname, "worldspawn")) {
		new Gent = create_entity("info_target")
		
		set_pev(Gent, pev_owner, pev(ent, pev_owner))
		new Float:maxs[3] = {40.0, 40.0, 25.0}
		new Float:mins[3] = {-40.0, -40.0, -25.0}
		entity_set_size(Gent, mins, maxs)
		set_pev(Gent, pev_classname, poison_classname)
		engfunc(EngFunc_SetModel, Gent, fire_poison)
		
		new	Float:vNewOrigin[3],Float:vNormal[3],Float:vTraceDirection[3],
		Float:vTraceEnd[3],Float:vEntAngles[3];
		
		pev(ent, get_pcvar_num(cvar_movetype) ? pev_velocity : pev_vuser1, vTraceDirection)
		
		xs_vec_add(vTraceDirection, vOrigin, vTraceEnd);
		
		engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, ent, 0);
		
		new Float:fFraction;
		get_tr2(0, TR_flFraction, fFraction);
		
		// -- We hit something!
		if(fFraction < 1.0)
		{
			// -- Save results to be used later.
			get_tr2(0, TR_vecEndPos, vTraceEnd);
			
			get_tr2(0, TR_vecPlaneNormal, vNormal);
		}
		xs_vec_add(vTraceEnd, vNormal, vNewOrigin);
		
		vector_to_angle(vNormal,vEntAngles);
		vEntAngles[0]-=90.0
		
		set_pev(Gent,pev_angles,vEntAngles);
		set_pev(Gent, pev_origin, vNewOrigin)
		
		set_pev(Gent, pev_rendermode, kRenderTransAdd)
		set_pev(Gent, pev_renderamt, 160.0)
		
		set_pev(Gent, pev_solid, SOLID_SLIDEBOX)
		set_pev(Gent, pev_movetype, MOVETYPE_NONE)
		
		effect_play_sprite(vOrigin, 40.0)
		
		set_task(TIME_POISON, "fw_remove_poison", Gent+1234)
		remove_entity(ent)
		return FMRES_IGNORED
	}
	
	if(!is_valid_ent(id))
		return FMRES_IGNORED
	
	if(!is_user_alive(id) || !is_user_connected(id)) {
		remove_entity(ent)
		return FMRES_IGNORED
	}
	
	if(pev(ent, pev_iuser2) == 1)
	{
		set_pev(ent, pev_iuser2, 0)
		pev(id, pev_origin, vOrigin)
		effect_play_sprite(vOrigin, 30.0)
		
		message_begin (MSG_BROADCAST,SVC_TEMPENTITY)
		write_byte( TE_SPRITETRAIL ) // Throws a shower of sprites or models
		write_coord( floatround(vOrigin[ 0 ]) ) // start pos
		write_coord( floatround(vOrigin[ 1 ]) )
		write_coord( floatround(vOrigin[ 2 ]) )
		write_coord( floatround(vOrigin[ 0 ]) ) // velocity
		write_coord( floatround(vOrigin[ 1 ]) )
		write_coord( floatround(vOrigin[ 2 ]) +20)
		write_short(sprite_ability ) // spr
		write_byte(18) // (count)
		write_byte(random_num(8,15)) // (life in 0.1's)
		write_byte(4) // byte (scale in 0.1's)
		write_byte(random_num(22,35)) // (velocity along vector in 10's)
		write_byte(20) // (randomness of velocity in 10's)
		message_end()
		
		static attacker
		
		attacker = pev(ent, pev_owner)
		
		if(!fm_get_user_godmode(id)) {
			new Float:velocity[3]
			pev(ent, pev_vuser1, velocity)
			velocity[2]+=30.0
			xs_vec_mul_scalar(velocity, 1000.0/xs_vec_len(velocity), velocity)
			
			ExecuteHam(Ham_TakeDamage, id, "poison_launcher", attacker, random_float(get_pcvar_float(cvar_start_damage), get_pcvar_float(cvar_end_damage)), DMG_BULLET)
			message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("Damage"), _, id)
			write_byte(0) // damage save
			write_byte(0) // damage take
			write_long(DMG_POISON) // damage type
			write_coord(0) // x
			write_coord(0) // y
			write_coord(0) // z
			message_end()
			
			user_screen_shake(id, 4, 2, 5)
			do_screen_fade(id, 0.8, 0.7, RED, GREEN, BLUE, 180);
			
			set_pev(id, pev_velocity, velocity)
			gPoisonGlow[id] = get_gametime() + 1.0;
			gGlowPlayer[id] = true;
			
			fm_set_rendering(id, kRenderFxGlowShell, RED, GREEN, BLUE, kRenderNormal, 25)
		}
		remove_entity(ent)
		return FMRES_IGNORED
	}
	
	return FMRES_IGNORED
}

public client_PostThink(id)
{
	if (!is_user_alive(id)) return;
	
	if(gGlowPlayer[id]) {
		if(gPoisonGlow[id]>get_gametime())
			return
		
		
		set_pev(id, pev_renderfx, 0)	
		gGlowPlayer[id] = false;	
	}
}

effect_play_sprite(const Float:vOrigin[3], Float:Add) {
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, vOrigin, 0)
	write_byte(TE_SPRITE)
	engfunc(EngFunc_WriteCoord, vOrigin[0])
	engfunc(EngFunc_WriteCoord, vOrigin[1])
	engfunc(EngFunc_WriteCoord, vOrigin[2] + Add)
	write_short(fire_spr_id)
	write_byte(8)
	write_byte(200)
	message_end()
}

user_screen_shake(id, amplitude = 4, duration = 2, frequency = 10) {
	message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, id)
	write_short((1<<12)*amplitude) // ??
	write_short((1<<12)*duration) // ??
	write_short((1<<12)*frequency) // ??
	message_end()
}

stock do_screen_fade(       id, Float:fadeTime, Float:holdTime, red, green, blue, alpha, type = 0x0000       ) {
	static msgScreenFade;
	if (      !msgScreenFade    ) { msgScreenFade = get_user_msgid(    "ScreenFade"           ); }
	new fade, hold;
	fade = clamp(    floatround(     fadeTime * float(1<<12)), 0, 0xFFFF    );
	hold = clamp(     floatround(         holdTime * float(1<<12)), 0, 0xFFFF      );
	message_begin(    MSG_ONE_UNRELIABLE, msgScreenFade, _, id          );
	write_short(          fade    );
	write_short(    hold    );
	write_short(    type   );
	write_byte(      red    );
	write_byte(  green    );
	write_byte(    blue    );
	write_byte(     alpha    );
	message_end(    );
}

stock get_weapon_attackment(id, Float:output[3], Float:fDis = 40.0) { 
	new Float:vfEnd[3], viEnd[3] 
	get_user_origin(id, viEnd, 3)  
	IVecFVec(viEnd, vfEnd) 
	
	new Float:fOrigin[3], Float:fAngle[3]
	
	pev(id, pev_origin, fOrigin) 
	pev(id, pev_view_ofs, fAngle)
	
	xs_vec_add(fOrigin, fAngle, fOrigin) 
	
	new Float:fAttack[3]
	
	xs_vec_sub(vfEnd, fOrigin, fAttack)
	xs_vec_sub(vfEnd, fOrigin, fAttack) 
	
	new Float:fRate
	
	fRate = fDis / vector_length(fAttack)
	xs_vec_mul_scalar(fAttack, fRate, fAttack)
	
	xs_vec_add(fOrigin, fAttack, output)
}

// END ACID SPIT

stock ColorChat(const id, const input[], any:...) {
	new count = 1, players[32];
	static msg[191];
	vformat(msg, 190, input, 3);
	
	replace_all(msg, 190, "!x04", "^4");
	replace_all(msg, 190, "!x01", "^1");
	replace_all(msg, 190, "!x03", "^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();
			}
		}
	}
}

public ExplodeAndDamageNearPlayers( iPsycho, const Float:fOrigin[ 3 ]  )
{
	static iVictim;
	iVictim = -1;
	
	while( ( iVictim = engfunc(EngFunc_FindEntityInSphere, iVictim, fOrigin, 300.0) ) != 0 ) 
	{
		if( !is_user_alive( iVictim ) )
			continue;
		
		if( get_user_team( iPsycho ) == get_user_team( iVictim ) )
			continue;
		
		if ( HasPower [ iVictim ] != 9 ) {
			new Float:fHealth;
			pev(  iVictim, pev_health, fHealth );
			
			fHealth -= float(  random_num( 70, 150 )  );
			
			new originnn[3];
			get_user_origin ( iVictim, originnn, 0 );
			message_begin(MSG_PAS, SVC_TEMPENTITY, originnn);
			write_byte(TE_BEAMCYLINDER);
			write_coord(originnn[0]);
			write_coord(originnn[1]);
			write_coord(originnn[2]+10);
			write_coord(originnn[0]);
			write_coord(originnn[1]);
			write_coord(originnn[2]+60);
			write_short(RippleSprite);
			write_byte(0);
			write_byte(0);
			write_byte(3);
			write_byte(60);
			write_byte(0);
			write_byte(0); //255
			write_byte(0); //255
			write_byte(255); //255 //BLUE
			write_byte(255); //255 
			write_byte(0);
			message_end();
			
			Create_TE_SPRITETRAIL3( originnn, originnn, RippleSprite, 50, 10, 2, 50, 10 );
			
			if(  fHealth <= 0  )
			{
				log_kill( iPsycho, iVictim, "Explode", 0  );
				fm_set_user_frags ( iPsycho, get_user_frags ( iPsycho ) + 1 );
				
			}
			else
			{
				ShakeScreen(  iVictim, 5.5  );
				FadeScreen(  iVictim, 3.0, 42, 170, 255, 100 );
				damage_user(  iVictim, fHealth, fOrigin, DMG_BLAST );
			}
		}
	}
}

public ShakeScreen( id, const Float:seconds )
{
	message_begin( MSG_ONE, get_user_msgid( "ScreenShake" ), { 0, 0, 0 }, id );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( 1<<13 );
	message_end( );
	
}

public FadeScreen( id, const Float:seconds, const redd, const greenn, const bluee, const alpha )
{      
	message_begin( MSG_ONE, get_user_msgid( "ScreenFade" ), _, id );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( floatround( 4096.0 * seconds, floatround_round ) );
	write_short( 0x0000 );
	write_byte( redd );
	write_byte( greenn );
	write_byte( bluee );
	write_byte( alpha );
	message_end( );
	
}

stock log_kill(  iKiller, iVictim, szWeapon[], iHeadshot  )
{
	user_silentkill(  iVictim  );
	
	message_begin(  MSG_ALL, get_user_msgid( "DeathMsg" ),  {0,0,0}, 0  );
	write_byte( iKiller );
	write_byte( iVictim );
	write_byte( iHeadshot );
	write_string( szWeapon );
	message_end(  );
	
	fm_set_user_frags( iKiller, get_user_frags( iKiller ) +1  );
	
	new kname[32], vname[32], kauthid[32], vauthid[32], kteam[10], vteam[10];
	
	get_user_name( iKiller, kname, 31 );
	get_user_team( iKiller, kteam, 9 );
	get_user_authid( iKiller, kauthid, 31 );
	
	get_user_name( iVictim, vname, 31 );
	get_user_team( iVictim, vteam, 9 );
	get_user_authid( iVictim, vauthid, 31 );
	
	log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"%s^"", 
	kname, get_user_userid( iKiller ), kauthid, kteam, 
	vname, get_user_userid( iVictim ), vauthid, vteam, szWeapon  );
	
	return 0;
}

stock damage_user( iVictim, const Float:fHealthLeft, const Float:fOrigin[ 3 ], bit  )
{
	new iOrigin[ 3 ];
	FVecIVec( fOrigin, iOrigin );
	
	message_begin( MSG_ONE, get_user_msgid( "Damage" ), {0,0,0}, iVictim  );
	write_byte( 21 );
	write_byte( 20 );
	write_long( bit );
	write_coord( iOrigin[ 0 ] );
	write_coord( iOrigin[ 1 ] );
	write_coord( iOrigin[ 2 ] );
	message_end(  );
	
	set_pev(  iVictim, pev_health, fHealthLeft );
}

CreateBlast(  const Redd, const Greenn, const Bluee, const iOrigin[ 3 ] ) {
	
	// Small ring
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_BEAMCYLINDER );
	write_coord( iOrigin[ 0 ] ); // start X
	write_coord( iOrigin[ 1 ] ); // start Y
	write_coord( iOrigin[ 2 ] ); // start Z
	write_coord( iOrigin[ 0 ] ); // something X
	write_coord( iOrigin[ 1 ] ); // something Y
	write_coord( iOrigin[ 2 ] + 285 ); // something Z
	write_short( gShockWaveSprite ); // sprite
	write_byte( 0 ); // startframe
	write_byte( 0 ); // framerate
	write_byte( 4 ); // life
	write_byte( 60 ); // width
	write_byte( 0 ); // noise
	write_byte( Redd ); // red
	write_byte( Greenn ); // green
	write_byte( Bluee ); // blue
	write_byte( 200 ); // brightness
	write_byte( 0 ); // speed
	message_end(  );
	
	// Medium ring
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_BEAMCYLINDER );
	write_coord( iOrigin[ 0 ] ); // start X
	write_coord( iOrigin[ 1 ] ); // start Y
	write_coord( iOrigin[ 2 ] ); // start Z
	write_coord( iOrigin[ 0 ] ); // something X
	write_coord( iOrigin[ 1 ] ); // something Y
	write_coord( iOrigin[ 2 ] + 385 ); // something Z
	write_short( gShockWaveSprite ); // sprite
	write_byte( 0 ); // startframe
	write_byte( 0 ); // framerate
	write_byte( 4 ); // life
	write_byte( 60 ); // width
	write_byte( 0 ); // noise
	write_byte( Redd ); // red
	write_byte( Greenn ); // green
	write_byte( Bluee ); // blue
	write_byte( 200 ); // brightness
	write_byte( 0 ); // speed
	message_end(  );
	
	// Large ring
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_BEAMCYLINDER );
	write_coord( iOrigin[ 0 ] ); // start X
	write_coord( iOrigin[ 1 ] ); // start Y
	write_coord( iOrigin[ 2 ] ); // start Z
	write_coord( iOrigin[ 0 ] ); // something X
	write_coord( iOrigin[ 1 ] ); // something Y
	write_coord( iOrigin[ 2 ] + 470 ); // something Z
	write_short( gShockWaveSprite ); // sprite
	write_byte( 0 ); // startframe
	write_byte( 0 ); // framerate
	write_byte( 4 ); // life
	write_byte( 60 ); // width
	write_byte( 0 ); // noise
	write_byte( Redd ); // red
	write_byte( Greenn ); // green
	write_byte( Bluee ); // blue
	write_byte( 200 ); // brightness
	write_byte( 0 ); // speed
	message_end(  );
	
	// Largest Ring
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_BEAMCYLINDER );
	write_coord( iOrigin[ 0 ] ); // start X
	write_coord( iOrigin[ 1 ] ); // start Y
	write_coord( iOrigin[ 2 ] ); // start Z
	write_coord( iOrigin[ 0 ] ); // something X
	write_coord( iOrigin[ 1 ] ); // something Y
	write_coord( iOrigin[ 2 ] + 555 ); // something Z
	write_short( gShockWaveSprite ); // sprite
	write_byte( 0 ); // startframe
	write_byte( 0 ); // framerate
	write_byte( 4 ); // life
	write_byte( 60 ); // width
	write_byte( 0 ); // noise
	write_byte( Redd ); // red
	write_byte( Greenn ); // green
	write_byte( Bluee ); // blue
	write_byte( 200 ); // brightness
	write_byte( 0 ); // speed
	message_end(  );
	
	message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
	write_byte(TE_SPRITETRAIL);
	write_coord(iOrigin[0]);
	write_coord(iOrigin[1]);
	write_coord(iOrigin[2]+40);
	write_coord(iOrigin[0]);
	write_coord(iOrigin[1]);
	write_coord(iOrigin[2]);
	write_short(TeleportSprite2);
	write_byte(20);
	write_byte(5);
	write_byte(3);
	write_byte(40);
	write_byte(10);
	message_end();
}

stock Create_TE_SPRITETRAIL3(start[3], end[3], iSprite, count, life, scale, velocity, random ){
	
	message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
	write_byte( TE_SPRITETRAIL )
	write_coord( start[0] ) // start position (X)
	write_coord( start[1] ) // start position (Y)
	write_coord( start[2] + 40 ) // start position (Z)
	write_coord( end[0] ) // end position (X)
	write_coord( end[1] ) // end position (Y)
	write_coord( end[2] ) // end position (Z)
	write_short( iSprite ) // sprite index
	write_byte( count ) // count
	write_byte( life) // life in 0.1's
	write_byte( scale) // scale in 0.1's
	write_byte( velocity ) // velocity along vector in 10's
	write_byte( random ) // randomness of velocity in 10's
	message_end()
}

bool: thunderbolt ( id ) {
	new target, body;
	static Float:start[3];
	static Float:aim[3];
	
	pev(id, pev_origin, start);
	fm_get_aim_origin(id, aim);
	
	start[2] += 16.0; // raise
	aim[2] += 16.0; // raise
	
	message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
	write_byte(0);
	engfunc(EngFunc_WriteCoord,start[0]);
	engfunc(EngFunc_WriteCoord,start[1]);
	engfunc(EngFunc_WriteCoord,start[2]);
	engfunc(EngFunc_WriteCoord,aim[0]);
	engfunc(EngFunc_WriteCoord,aim[1]);
	engfunc(EngFunc_WriteCoord,aim[2]);
	write_short(ThunderSprite); // sprite index
	write_byte(0); // start frame
	write_byte(30); // frame rate in 0.1's
	write_byte(10); // life in 0.1's
	write_byte(50); // line width in 0.1's
	write_byte(50); // noise amplititude in 0.01's
	write_byte(51); // red
	write_byte(204); // green
	write_byte(255); // blue
	write_byte(100); // brightness
	write_byte(50); // scroll speed in 0.1's
	message_end();
	
	get_user_aiming (id, target, body, 5000);
	if(is_user_alive(target) && get_user_team(id) != get_user_team(target)) {
		
		// get target's origin
		new vorigin[ 3 ], pos[ 3 ];
		get_user_origin( target, vorigin );
		
		
		
		// modify origins
		vorigin[ 2 ] -= 26;
		pos[ 0 ] = vorigin[ 0 ] + 150;
		pos[ 1 ] = vorigin[ 1 ] + 150;
		pos[ 2 ] = vorigin[ 2 ] + 800;
		
		
		
		// create lightning bolt
		Thunder( pos, vorigin );
		Thunder2 ( pos, vorigin );
		Thunder( pos, vorigin );
		Thunder2 ( pos, vorigin );
		Thunder( pos, vorigin );
		Thunder2 ( pos, vorigin );
		Thunder( pos, vorigin );
		Thunder2 ( pos, vorigin );
		
		new Float:fOrigin[ 3 ], iOrigin[ 3 ];
		pev( target, pev_origin, fOrigin  );
		
		FVecIVec(  fOrigin, iOrigin  );
		
		new Float:fHealth;
		pev(  target, pev_health, fHealth );
		
		fHealth -= float(  random_num( 50, 100 )  );
		
		if(  fHealth <= 0  )
		{
			log_kill( id, target, "Super Thunder Bolt", 0  );
			fm_set_user_frags ( id, get_user_frags ( id ) + 1 );
		}
		else
		{
			set_pev(  target, pev_health, fHealth );
		}
		
		LightNearPlayers ( target, fOrigin );
		
		
		Smoke( vorigin, 10, 10 );
		
		
		message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);
		write_short(1<<10);
		write_short(1<<10);
		write_short(0x0000);
		write_byte(255);
		write_byte(255);
		write_byte(255);
		write_byte(50);
		message_end();
		message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, target);
		write_short(1<<10);
		write_short(1<<10);
		write_short(0x0000);
		write_byte(255);
		write_byte(255);
		write_byte(255);
		write_byte(50);
		message_end();
	}
	
	return true;
}

Thunder( start[ 3 ], end[ 3 ] ) {
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
	write_byte( TE_BEAMPOINTS ); 
	write_coord( start[ 0 ] ); 
	write_coord( start[ 1 ] ); 
	write_coord( start[ 2 ] ); 
	write_coord( end[ 0 ] ); 
	write_coord( end[ 1 ] ); 
	write_coord( end[ 2 ] ); 
	write_short( g_lightning ); 
	write_byte( 1 );
	write_byte( 5 );
	write_byte( 7 );
	write_byte( 80 );
	write_byte( 30 );
	write_byte( 200 ); 
	write_byte( 200 );
	write_byte( 200 );
	write_byte( 200 );
	write_byte( 200 );
	message_end();
	
	message_begin( MSG_PVS, SVC_TEMPENTITY, end );
	write_byte( TE_SPARKS );
	write_coord( end[ 0 ]  );
	write_coord( end[ 1 ]);
	write_coord( end[ 2 ] );
	message_end();
	
	
	
	emit_sound( 0 ,CHAN_ITEM, thunder_sound, 1.0, ATTN_NORM, 0, PITCH_NORM );
}

Thunder2( start[ 3 ], end[ 3 ] ) {
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY ); 
	write_byte( TE_BEAMPOINTS ); 
	write_coord( start[ 0 ] ); 
	write_coord( start[ 1 ] ); 
	write_coord( start[ 2 ] ); 
	write_coord( end[ 0 ] ); 
	write_coord( end[ 1 ] ); 
	write_coord( end[ 2 ] ); 
	write_short( g_lightning ); 
	write_byte( 1 );
	write_byte( 5 );
	write_byte( 7 );
	write_byte( 20 );
	write_byte( 30 );
	write_byte( 200 ); 
	write_byte( 200 );
	write_byte( 200 );
	write_byte( 200 );
	write_byte( 200 );
	message_end();
	
	message_begin( MSG_PVS, SVC_TEMPENTITY, end );
	write_byte( TE_SPARKS );
	write_coord( end[ 0 ]  );
	write_coord( end[ 1 ]);
	write_coord( end[ 2 ] );
	message_end();
	
}

Smoke( iorigin[ 3 ], scale, framerate ) {
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_SMOKE );
	write_coord( iorigin[ 0 ] );
	write_coord( iorigin[ 1 ] );
	write_coord( iorigin[ 2 ] );
	write_short( g_smoke );
	write_byte( scale );
	write_byte( framerate );
	message_end();
}




public LightNearPlayers(  id, const Float:fOrigin[ 3 ]  )
{
	static iVictim;
	iVictim = -1;
	
	while( ( iVictim = engfunc(EngFunc_FindEntityInSphere, iVictim, fOrigin, 300.0) ) != 0 ) 
	{
		if( !is_user_alive( iVictim ) )
			continue;
		
		if( get_user_team( id ) == get_user_team( iVictim ) ) {
			
			new Float:fVictimOrigin[ 3 ], iVictimOrigin[ 3 ];
			pev( id, pev_origin, fVictimOrigin );
			
			FVecIVec( fVictimOrigin, iVictimOrigin );
			CreateLightning( id, iVictim, iVictimOrigin );
			
		}
		
	}
}


public CreateLightning( id, iVictim, iVictimOrigin[ 3 ] )
{
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_BEAMENTS );
	write_short( id );		// start entity
	write_short( iVictim );		// end entity
	write_short( g_lightning );			// model
	write_byte( 0 );		// starting frame
	write_byte( 15 );			// frame rate
	write_byte( 15 );				// life
	write_byte( 80 );				// line width
	write_byte( 10 );				// noise amplitude
	write_byte( 255 );				// red
	write_byte( 255 );				// green
	write_byte( 255 );				// blue
	write_byte( 255 );				// brightness
	write_byte( 0 );				// scroll speed
	message_end( );	
	
	message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
	write_byte( TE_ELIGHT );
	write_short( iVictim );			// entity
	write_coord( iVictimOrigin[0] );			// initial position
	write_coord( iVictimOrigin[1] );			// initial position
	write_coord( iVictimOrigin[2] );			// initial position
	write_coord( 100 );			// radius
	write_byte( 51 );				// red
	write_byte( 204 );				// green
	write_byte( 255 );				// blue
	write_byte( 15 );				// life
	write_coord( 0 );		// decay rate
	message_end( );
	
}

public cloudfire(id)
{
	set_hudmessage(0, 170, 255, 0.02, 0.87, 0, 6.0, 1.0)
	show_hudmessage(id, "Ammo: %d", FireAmmo [ id ])
	
	if ( FireAmmo [ id ] > 0 ) {
		
		new iEnt = create_entity("env_sprite")
		new Float:vfVelocity[3]
		
		velocity_by_aim(id, 500, vfVelocity)
		xs_vec_mul_scalar(vfVelocity, 0.4, vfVelocity)
		
		// add velocity of Owner for ent
		new Float:fOwnerVel[3], Float:vfAttack[3], Float:vfAngle[3]
		pev(id, pev_angles, vfAngle)
		//pev(id, pev_origin, vfAttack)
		get_weapon_attackment(id, vfAttack, 20.0)
		vfAttack[2] -= 7.0
		//vfAttack[1] += 7.0
		pev(id, pev_velocity, fOwnerVel)
		fOwnerVel[2] = 0.0
		xs_vec_add(vfVelocity, fOwnerVel, vfVelocity)
		
		// set info for ent
		set_pev(iEnt, pev_movetype, MOVETYPE_FLY)
		set_pev(iEnt, pev_rendermode, kRenderTransAdd)
		set_pev(iEnt, pev_renderamt, 150.0)
		set_pev(iEnt, PEV_ENT_TIME, get_gametime() + 1.5)	// time remove
		set_pev(iEnt, pev_scale, 0.2)
		set_pev(iEnt, pev_nextthink, halflife_time() + 0.05)
		
		set_pev(iEnt, pev_classname, fire_classname_could)
		engfunc(EngFunc_SetModel, iEnt, fire_spr_name_cloud)
		set_pev(iEnt, pev_mins, Float:{-1.0, -1.0, -1.0})
		set_pev(iEnt, pev_maxs, Float:{1.0, 1.0, 1.0})
		set_pev(iEnt, pev_origin, vfAttack)
		set_pev(iEnt, pev_gravity, 0.01)
		set_pev(iEnt, pev_velocity, vfVelocity)
		vfAngle[1] += 30.0
		set_pev(iEnt, pev_angles, vfAngle)
		set_pev(iEnt, pev_solid, SOLID_BBOX)
		set_pev(iEnt, pev_owner, id)
		set_pev(iEnt, pev_iuser2, 1)
		
		emit_sound(id, CHAN_WEAPON, "weapons/flamegun-2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
		--FireAmmo [ id ];
		
	}
	
	else {
		
		set_hudmessage(0, 170, 255, -1.0, 0.13, 0, 6.0, 2.0)
		show_hudmessage(id, "No ammo !")
		return 1;
	}
	
	return 0;
}

public fw_think_fire(iEnt)
{
	if ( !pev_valid(iEnt) ) return;
	
	new Float:fFrame, Float:fScale, Float:fNextThink
	pev(iEnt, pev_frame, fFrame)
	pev(iEnt, pev_scale, fScale)
	
	// effect exp
	new iMoveType = pev(iEnt, pev_movetype)
	if (iMoveType == MOVETYPE_NONE)
	{
		fNextThink = 0.015
		fFrame += 1.0
		
		if (fFrame > 21.0)
		{
			engfunc(EngFunc_RemoveEntity, iEnt)
			return
		}
	}
	
	// effect normal
	else
	{
		fNextThink = 0.045
		fFrame += 1.0
		fFrame = floatmin(21.0, fFrame)
	}
	
	fScale = (entity_range(iEnt, pev(iEnt, pev_owner)) / 500) * 3.0
	
	set_pev(iEnt, pev_frame, fFrame)
	set_pev(iEnt, pev_scale, fScale)
	set_pev(iEnt, pev_nextthink, halflife_time() + fNextThink)
	
	
	// time remove
	new Float:fTimeRemove
	pev(iEnt, PEV_ENT_TIME, fTimeRemove)
	if (get_gametime() >= fTimeRemove)
	{
		engfunc(EngFunc_RemoveEntity, iEnt)
		return;
	}
}

public fw_touch_fire(ent, id)
{
	set_pev(ent, pev_movetype, MOVETYPE_NONE)
	set_pev(ent, pev_solid, SOLID_NOT)	
	
	if(!is_valid_ent(id))
		return FMRES_IGNORED
	
	if(!is_user_alive(id) || !is_user_connected(id) )
		return FMRES_IGNORED
	
	if(pev(ent, pev_iuser2) == 1)
	{
		set_pev(ent, pev_iuser2, 0)
		
		static attacker, ent_kill
		
		attacker = pev(ent, pev_owner)
		ent_kill = fm_get_user_weapon_entity(id, CSW_KNIFE)
		
		
		ExecuteHam(Ham_TakeDamage, id, ent_kill, attacker, random_float(70.0, 100.0), DMG_BULLET)		
	}
	return FMRES_HANDLED
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Resurse nu am, cautati voi.

Nume: Ultimate Furien VIP
Versiune: In sursa
Link: La DaNNe. patronu'

Module necesare; In sursa
CVAR-uri: In sursa

Imagini: Faceti voi

Resurse? Nu cred ca le are nimeni..
User avatar
EleCtr0zZz
Membru, skill +1
Membru, skill +1
Posts: 428
Joined: 25 May 2015, 07:27
Detinator Steam: Da
SteamID: =
Fond eXtream: 0
Has thanked: 3 times
Contact:

16 Feb 2018, 17:35

Deoarece lenea este mare si nimeni chiar nu a vrut sa le caute , le-am gasit eu dupa multe cautari de 2 ore.
| Afiseaza codul
http://www77.zippyshare.com/v/7JsUqkam/file.html
Un multumesc? :thumbsup: :kissing:
User avatar
puNx
Membru, skill 0
Membru, skill 0
Posts: 80
Joined: 07 Aug 2015, 18:26
Detinator Steam: Da
CS Status: :)
Detinator server CS: Furien.Enjoygame.RO
SteamID: #WAS
Fond eXtream: 0
Contact:

12 Dec 2018, 11:35

mai are cineva resursele ?
Image
Image
Furien.Enjoygame.Ro[+18][VIP FREE][Admine Free]

Ofer suport tehnic si incredere pentru servere de CS 1.6 !
Contact me:
Skype: vlad.vlad604
Y!M: [email protected]
Steam: zeT # ANUBIS (link: http://steamcommunity.com/id/vladpuNx/ )
Forum: puNx (PM me)
Pretul difera in functie de ce doreste clientul !
User avatar
puNx
Membru, skill 0
Membru, skill 0
Posts: 80
Joined: 07 Aug 2015, 18:26
Detinator Steam: Da
CS Status: :)
Detinator server CS: Furien.Enjoygame.RO
SteamID: #WAS
Fond eXtream: 0
Contact:

12 Dec 2018, 13:47

Image
Image
Furien.Enjoygame.Ro[+18][VIP FREE][Admine Free]

Ofer suport tehnic si incredere pentru servere de CS 1.6 !
Contact me:
Skype: vlad.vlad604
Y!M: [email protected]
Steam: zeT # ANUBIS (link: http://steamcommunity.com/id/vladpuNx/ )
Forum: puNx (PM me)
Pretul difera in functie de ce doreste clientul !
Post Reply

Return to “AmxModX”

  • Information
  • Who is online

    Users browsing this forum: Petal [Bot] and 11 guests