Cerere Plugin Furien Weapons

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
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

21 Dec 2013, 14:56

Salut as dori si eu un pluginul furien weapons cu armele default.
User avatar
Rony
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 967
Joined: 11 Mar 2013, 11:43
Detinator Steam: Da
CS Status: CO-FOUNDER BETANO
Detinator server CS: CS1.6 , CS:GO
SteamID: 31r1
Reputatie: Membru Club eXtreamCS (1 luna)
Membru Club eXtreamCs (28 Feb)
Utilizator neserios (tepar)
Location: NAPOLI
Has thanked: 172 times
Been thanked: 66 times
Contact:

21 Dec 2013, 16:05

Uite unul mai dragut.
| Afiseaza codul
/* Plugin generated by AMXX-Studio */
/* Ce optimizat mai e... l-am facut in graba */

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <cstrike>
#include <hamsandwich>

#define PLUGIN "Furien Weapons Menu"
#define VERSION "1.0"
#define AUTHOR "tre3fla"

#define ADMIN_FLAG ADMIN_KICK
#define VIP_FLAG ADMIN_LEVEL_H

#define is_valid_player(%1) (1 <= %1 <= 32)

/* AK47 Golden pentru VIP */
new const vGoldenAk[ 64 ] = "models/AntiFurienWeapons/v_Golden-AK.mdl"
new const pGoldenAk[ 64 ] = "models/AntiFurienWeapons/p_Golden-AK.mdl"

/* M4A1 Golden pentru VIP */
new const vGoldenM4[ 64 ] = "models/AntiFurienWeapons/v_Golden-M4.mdl"
new const pGoldenM4[ 64 ] = "models/AntiFurienWeapons/p_Golden-M4.mdl"

/* MP5 Navy Golden pentru VIP */
new const vGoldenMP5[ 64 ] = "models/AntiFurienWeapons/v_Golden-MP5.mdl"
new const pGoldenMP5[ 64 ] = "models/AntiFurienWeapons/p_Golden-MP5.mdl"

/* AWP Golden pentru VIP */
new const vGoldenAWP[ 64 ] = "models/AntiFurienWeapons/v_Golden-AWP.mdl"
new const pGoldenAWP[ 64 ] = "models/AntiFurienWeapons/p_Golden-AWP.mdl"

new m_spriteTexture

new bool: ArmaPrimita[ 33 ]
new bool: AreGoldenAK[ 33 ]
new bool: AreGoldenM4[ 33 ]
new bool: AreGoldenMP5[ 33 ]
new bool: AreGoldenAWP[ 33 ]


public plugin_init( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )
	
	register_event( "CurWeapon", "Event_CurWeapon", "be", "1=1" )
	register_event("CurWeapon", "GoldenEffect", "be", "1=1", "3>0" )
	
	RegisterHam( Ham_Spawn, "player", "fwPlayerSpawn", true )
	RegisterHam( Ham_TakeDamage, "player", "fwTakeDamage" )
	
	register_clcmd( "say /weapons", "ClcmdWeaponsMenus" )
}

public plugin_precache( ) {
	precache_model( vGoldenAk )
	precache_model( pGoldenAk )
	precache_model( vGoldenM4 )
	precache_model( pGoldenM4 )
	precache_model( vGoldenMP5 )
	precache_model( pGoldenMP5 )
	precache_model( vGoldenAWP )
	precache_model( pGoldenAWP )
	m_spriteTexture = precache_model( "sprites/dot.spr" )
}

public fwPlayerSpawn( id ) {
	AreGoldenAK[ id ] = false
	AreGoldenM4[ id ] = false
	AreGoldenMP5[ id ] = false
	AreGoldenAWP[ id ] = false
	ArmaPrimita[ id ] = false
	
	if( is_user_alive( id ) && cs_get_user_team( id ) == CS_TEAM_CT ) {
		strip_user_weapons( id )
		PopUpWeaponsMenu( id )
		give_item( id, "weapon_usp" )
		cs_set_user_bpammo( id, CSW_USP, 100 )
	}
	else if( iis_user_alive( id ) && cs_get_user_team( id ) == CS_TEAM_T ) {
		strip_user_weapons( id ) 
		give_item( id, "weapon_knife" )
	}
}

public PopUpWeaponsMenu( id ) {
	new FurienWeaponsMenu = menu_create( "\yAnti-Furien\r Weapons", "FurienWeaponsHandler" )
	
	menu_additem( FurienWeaponsMenu, "Arme\y Normale", "1", 0 )
	menu_additem( FurienWeaponsMenu, "Arme\r V.I.P", "2", 0 )
	
	menu_setprop( FurienWeaponsMenu, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, FurienWeaponsMenu, 0 )
}

public FurienWeaponsHandler( id, FurienWeaponsMenu, item ) {
	if( item == MENU_EXIT ) {
		menu_destroy( FurienWeaponsMenu )
		return PLUGIN_HANDLED
	}
	
	switch( item ) {
		case 0 : {
			ArmeNormale( id ) 
		}
		case 1 : {
			if( get_user_flags( id ) & VIP_FLAG ) {
				ArmeVIP( id ) 
			}
			else {
				ColorChat( id, "^4[Furien Weapons]^1 Aceste arme sunt rezervate numai pentru^3 V.I.P^1." )
				return PLUGIN_HANDLED 
			}
		}
	}
	menu_destroy( FurienWeaponsMenu )
	return PLUGIN_HANDLED
}

public ArmeNormale( id ) {
	
	new MeniuArmeNormale = menu_create( "\yArme\r Normale", "ArmeNormaleHandler" )
	
	menu_additem( MeniuArmeNormale, "Kalashnikov\r       (\yAK47\r)", "1", 0 )
	menu_additem( MeniuArmeNormale, "Carabina\r           (\yM4A1\r)", "2", 0 )
	menu_additem( MeniuArmeNormale, "MP5\r                 (\yNavy\r)", "3", 0 )
	menu_additem( MeniuArmeNormale, "Magnum Sniper\r (\yAWP\r)", "4", 0 )
	
	menu_setprop( MeniuArmeNormale, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuArmeNormale, 0 )
}

public ArmeNormaleHandler( id, MeniuArmeNormale, item ) {
	if( !is_user_alive( id ) ) {
		ColorChat( id, "^4[Furien Weapons]^1 Nu iti poti alege arma atunci cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuArmeNormale )
		return PLUGIN_HANDLED 
	}
	
	switch( item ) {
		case 0 : {
			give_item( id, "weapon_ak47" )
			cs_set_user_bpammo( id, CSW_AK47, 90 )
			ArmaPrimita[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_m4a1" )
			cs_set_user_bpammo( id, CSW_M4A1, 90 )
			ArmaPrimita[ id ] = true
		}
		case 2 : {
			give_item( id, "weapon_mp5navy" )
			cs_set_user_bpammo( id, CSW_MP5NAVY, 120 )
			ArmaPrimita[ id ] = true
		}
		case 3 : {
			give_item( id, "weapon_awp" )
			cs_set_user_bpammo( id, CSW_AWP, 30 )
			ArmaPrimita[ id ] = true
		}
	}
	menu_destroy( MeniuArmeNormale )
	return PLUGIN_HANDLED
}

public ArmeVIP( id ) {
	new MeniuArmeVIP = menu_create( "\yArme \r*\w V\r.\wI\r.\wP\r *", "ArmeVIPHandler" )
	
	menu_additem( MeniuArmeVIP, "Golden AK47\r  (\y3x DMG\r)", "1", 0 )
	menu_additem( MeniuArmeVIP, "Golden M4A1\r (\y4x DMG\r)", "2", 0 )
	menu_additem( MeniuArmeVIP, "Golden MP5\r   (\y5x DMG\r)", "3", 0 )
	menu_additem( MeniuArmeVIP, "Golden AWP\r   (\y4x DMG\r)", "4", 0 )
	
	menu_setprop( MeniuArmeVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuArmeVIP, 0 )
}

public ArmeVIPHandler( id, MeniuArmeVIP, item ) {
	if( !is_user_alive( id ) ) {
		ColorChat( id, "^4[Furien Weapons]^1 Nu iti poti alege arma atunci cand esti mort!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuArmeVIP )
		return PLUGIN_HANDLED
	}
	
	switch( item ) {
		case 0 : {
			give_item( id, "weapon_ak47" )
			cs_set_user_bpammo( id, CSW_AK47, 90 )
			set_pev( id, pev_viewmodel2, vGoldenAk )
			set_pev( id, pev_weaponmodel2, pGoldenAk )
			ArmaPrimita[ id ] = true
			AreGoldenAK[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_m4a1" )
			cs_set_user_bpammo( id, CSW_M4A1, 90 )
			set_pev( id, pev_viewmodel2, vGoldenM4 )
			set_pev( id, pev_weaponmodel2, pGoldenM4 )
			ArmaPrimita[ id ] = true
			AreGoldenM4[ id ] = true
		}
		case 2 : {
			give_item( id, "weapon_mp5navy" )
			cs_set_user_bpammo( id, CSW_MP5NAVY, 120 )
			set_pev( id, pev_viewmodel2, vGoldenMP5 )
			set_pev( id, pev_weaponmodel2, pGoldenMP5 )
			ArmaPrimita[ id ] = true
			AreGoldenMP5[ id ] = true
		}
		case 3 : {
			give_item( id, "weapon_awp" )
			cs_set_user_bpammo( id, CSW_AWP, 30 )
			set_pev( id, pev_viewmodel2, vGoldenAWP )
			set_pev( id, pev_weaponmodel2, pGoldenAWP )
			ArmaPrimita[ id ] = true
			AreGoldenAWP[ id ] = true
		}
	}
	menu_destroy( MeniuArmeVIP )
	return PLUGIN_HANDLED
}

public ClcmdWeaponsMenus( id ) {
	if( !is_user_alive( id ) ) {
		ColorChat( id, "^4[Furien Weapons]^1 Nu poti sa-ti alegeti arma atunci cand esti mort!" )
		return 
	}
	
	if( ArmaPrimita[ id ] ) {
		ColorChat( id, "^4[Furien Weapons]^1 Ti-ai ales deja arma in aceasta runda!" )
		return 
	}
	
	if( cs_get_user_team( id ) == CS_TEAM_CT ) {
		PopUpWeaponsMenu( id )
	}
}

public Event_CurWeapon( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_AK47 && AreGoldenAK[ id ] ) {
		set_pev( id, pev_viewmodel2, vGoldenAk )
		set_pev( id, pev_weaponmodel2, pGoldenAk )
	}
	
	if( Arma == CSW_M4A1 && AreGoldenM4[ id ] ) {
		set_pev( id, pev_viewmodel2, vGoldenM4 )
		set_pev( id, pev_weaponmodel2, pGoldenM4 )
	}
	
	if( Arma == CSW_MP5NAVY && AreGoldenMP5[ id ] ) {
		set_pev( id, pev_viewmodel2, vGoldenMP5 )
		set_pev( id, pev_weaponmodel2, pGoldenMP5 )
	}
	
	if( Arma == CSW_AWP && AreGoldenAWP[ id ] ) {
		set_pev( id, pev_viewmodel2, vGoldenAWP )
		set_pev( id, pev_weaponmodel2, pGoldenAWP )
	}
}

public fwTakeDamage( Victim, Inflictor, Attacker, Float:Damage ) {
	if( is_valid_player( Attacker ) && get_user_weapon( Attacker ) == CSW_AK47 && AreGoldenAK[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 3 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_M4A1 && AreGoldenM4[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 4 )
	}
	
	if( is_valid_player( Attacker ) && get_user_weapon( Attacker ) == CSW_MP5NAVY && AreGoldenMP5[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 5 )
	}
	
	if( is_valid_player( Attacker ) && get_user_weapon( Attacker) == CSW_AWP && AreGoldenAWP[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 4 )
	}
}

public GoldenEffect( id ) {
	new clip,ammo
	new Arma = get_user_weapon(id,clip,ammo)
		
	if (Arma == CSW_AK47 && AreGoldenAK[ id ] || Arma == CSW_M4A1 && AreGoldenM4[ id ] || Arma == CSW_MP5NAVY && AreGoldenMP5[ id ] || Arma == CSW_AWP && AreGoldenAWP[ id ]) {
		new vec1[ 3 ], vec2[ 3 ]
		get_user_origin( id, vec1, 1 ) 
		get_user_origin( id, vec2, 4 ) 

		message_begin( MSG_BROADCAST,SVC_TEMPENTITY )
		write_byte ( 0 )     
		write_coord( vec1[ 0 ] )
		write_coord( vec1[ 1 ] )
		write_coord( vec1[ 2 ] )
		write_coord( vec2[ 0 ] )
		write_coord( vec2[ 1 ] )
		write_coord( vec2[ 2 ] )
		write_short( m_spriteTexture )
		write_byte( 1 )  
		write_byte( 5 ) 
		write_byte( 2 ) 
		write_byte( 10 ) 
		write_byte( 0  ) 
		write_byte( 255  )     
		write_byte( 215  )       
		write_byte(  0 )       
		write_byte( 200 ) 
		write_byte( 150 ) 
		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, "!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();
			}
		}
	} 
}
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

21 Dec 2013, 16:08

Default......fara golden etc...
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

21 Dec 2013, 16:39

UP ............
Post Reply

Return to “Cereri”

  • Information