PLUGIN VIP MENU

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori

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

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
kmking
Membru, skill 0
Membru, skill 0
Posts: 30
Joined: 31 Oct 2018, 22:47
Detinator Steam: Nu
Detinator server CS: CS.PLAY4CS.RO
Fond eXtream: 0
Contact:

31 Oct 2018, 22:51

Am nevoie de un plugin VIP MENU dar el sa contina arme mai sofisticate ....
Adica nu armele classice , cum ar fi la modul furien dar sa aiba acces si tero la arme
Ajutatima va rog ma chinui de mult timp sa dau de el ....

MULTUMESC !


1: Arme Playeri
2: Arme VIP

SI IN ARME VIP SA GASESC nu stiu BAZOOKA SAU BARLOG SAU nu stiu ARME DE GENU
Image
CONNECT CS.PLAY4CS.RO
Olium
User avatar
kmking
Membru, skill 0
Membru, skill 0
Posts: 30
Joined: 31 Oct 2018, 22:47
Detinator Steam: Nu
Detinator server CS: CS.PLAY4CS.RO
Fond eXtream: 0
Contact:

02 Nov 2018, 05:53

up !
Image
CONNECT CS.PLAY4CS.RO
User avatar
kmking
Membru, skill 0
Membru, skill 0
Posts: 30
Joined: 31 Oct 2018, 22:47
Detinator Steam: Nu
Detinator server CS: CS.PLAY4CS.RO
Fond eXtream: 0
Contact:

03 Nov 2018, 21:24

up.... chair nu stie nimeni ?
Image
CONNECT CS.PLAY4CS.RO
User avatar
Pymbor
Fost administrator
Fost administrator
Posts: 762
Joined: 01 Jan 2013, 01:25
Detinator Steam: Da
CS Status: Citesc
Reputatie: Fost administrator
Restrictie moderator (25 Aug 19)
Fost detinator DR și ZM
Castigator membru CLUB eXtream @ MOS NICOLAE (3 luni)
Has thanked: 9 times
Been thanked: 9 times

03 Nov 2018, 23:33

Te rog frumos sa te opresti prin a lasa reply cu up in fiecare zi.
Asteapta pana ce ti se va da un raspuns. ( in caz ca stie cineva )
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2039
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: 33 times
Been thanked: 330 times
Contact:

05 Nov 2018, 11:42

de știu sunt persoane care știu, depinde cine vrea să-l ajute
tu ceri niște arme extra, crezi că va sta cineva să caute pe net armele care le vrei tu? faci o arhivă cu armele extra care le vrei pentru vip, și poate poate
User avatar
kmking
Membru, skill 0
Membru, skill 0
Posts: 30
Joined: 31 Oct 2018, 22:47
Detinator Steam: Nu
Detinator server CS: CS.PLAY4CS.RO
Fond eXtream: 0
Contact:

05 Nov 2018, 19:57

Adryyy wrote:de știu sunt persoane care știu, depinde cine vrea să-l ajute
tu ceri niște arme extra, crezi că va sta cineva să caute pe net armele care le vrei tu? faci o arhivă cu armele extra care le vrei pentru vip, și poate poate
Armele le pun singur , doar sa mi se faca pluginul si sa mi se spuna unde trebe sa modific pentru a pune armele ...
Image
CONNECT CS.PLAY4CS.RO
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2039
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: 33 times
Been thanked: 330 times
Contact:

05 Nov 2018, 20:11

păi înseamnă că poți face tu prin native...
User avatar
dragonCSX
Membru, skill +1
Membru, skill +1
Posts: 189
Joined: 04 Feb 2017, 17:36
Detinator Steam: Da
CS Status: Web Developer / Scripting AMXX.
Detinator server CS: da
SteamID: weedakadulceata
Fond eXtream: 0
Location: Ploiesti
Contact:

06 Nov 2018, 08:50

Search...
- pluginuri-extream/plugin-furien-guns-v1-0-t226973.html
Search X2
- amxmodx/furien-weapons-cso-models-t232668.html

Puteam sa ți-l fac dar sunt cu munca .
Încearcă SI vezi care merg.
User avatar
kmking
Membru, skill 0
Membru, skill 0
Posts: 30
Joined: 31 Oct 2018, 22:47
Detinator Steam: Nu
Detinator server CS: CS.PLAY4CS.RO
Fond eXtream: 0
Contact:

08 Nov 2018, 06:58

dragonCSX wrote:Search...
- pluginuri-extream/plugin-furien-guns-v1-0-t226973.html
Search X2
- amxmodx/furien-weapons-cso-models-t232668.html

Puteam sa ți-l fac dar sunt cu munca .
Încearcă SI vezi care merg.

Salut am incercat alemandoua variante ...
Dar nici una nu da arme la tero , si baga prea mult dmg , adica din 2 gloante moare ...
Poti sa ma ajuti tu te rog ?
Image
CONNECT CS.PLAY4CS.RO
User avatar
Laurentiu P.
Super moderator
Super moderator
Posts: 2076
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
CS Status: Activitate scazuta !
Detinator server CS: Da
Reputatie: Super moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 1
Location: Constanta
Has thanked: 3 times
Been thanked: 2 times

08 Nov 2018, 12:30

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <ColorChat>

#define PLUGIN "Weapons Menu"
#define VERSION "1.0"
#define AUTHOR "CaTa"

#define VIP_FLAG ADMIN_LEVEL_H

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

const m_flNextSecondaryAttack =	47

new const vAreThomson[ 64 ] = "models/NewWeapons/v_hk416.mdl"
new const pAreThomson[ 64 ] = "models/NewWeapons/p_hk416.mdl"

new const vAreAug[ 64 ] = "models/NewWeapons/v_tar21.mdl"
new const pAreAug[ 64 ] = "models/NewWeapons/p_tar21.mdl"

new const vAreXm [ 64 ] = "models/NewWeapons/v_balrog11_2.mdl";
new const pAreXm [ 64 ] = "models/NewWeapons/p_balrog11.mdl";

new const vAreMp5 [ 64 ] = "models/NewWeapons/v_dualmp5.mdl";
new const pAreMp5 [ 64 ] = "models/NewWeapons/p_dualmp5.mdl";

new const vAreM3 [ 64 ] = "models/NewWeapons/v_sfgun.mdl";
new const pAreM3 [ 64 ] = "models/NewWeapons/p_sfgun.mdl";

new const vAreM249 [ 64 ] = "models/VipFurien/v_m134.mdl";
new const pAreM249 [ 64 ] = "models/VipFurien/p_m134.mdl";

new const vAreNavy [ 64 ] = "models/VipFurien/v_k1ases.mdl";
new const pAreNavy [ 64 ] = "models/VipFurien/p_k1ases.mdl";

new const vAreInfi [ 64 ] = "models/NewWeapons/v_infinity.mdl";
new const pAreInfi [ 64 ] = "models/NewWeapons/p_infinity.mdl";

new const vAreF2 [ 64 ] = "models/VipFurien/v_f2000.mdl";
new const pAreF2 [ 64 ] = "models/VipFurien/p_f2000.mdl";

new const vAreGM249 [ 64 ] = "models/VipFurien/v_goldenm2.mdl";
new const pAreGM249 [ 64 ] = "models/VipFurien/p_goldenm2.mdl";


new bool: ArmaPrimita[ 33 ]
new bool: AreThomson[ 33 ]
new bool: AreAug[ 33 ]
new bool: AreXm[ 33 ]
new bool: AreMp5[ 33 ]
new bool: AreM3[ 33 ]
new bool: AreM249[ 33 ]
new bool: AreNavy[ 33 ]
new bool: AreF2[ 33 ]
new bool: AreGM249[ 33 ]
new bool: AreInfi[ 33 ]


public plugin_init( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )
	
	register_event( "CurWeapon", "Event_CurWeapon", "be", "1=1" )
	register_event("CurWeapon", "CurrWeapon2", "be", "be", "1=1" )
	
	register_forward(FM_TraceLine,"fw_traceline");
	register_forward(FM_PlayerPostThink,"fw_playerpostthink");
	
	RegisterHam( Ham_Spawn, "player", "fwPlayerSpawn", true )
	RegisterHam( Ham_TakeDamage, "player", "fwTakeDamage" )
	
	register_clcmd( "say /weapons", "ClcmdWeaponsMenus" )
	register_clcmd( "say_team /weapons", "ClcmdWeaponsMenus" )
	register_event ( "CurWeapon", "CurrWeapon2", "be", "1=1" );

	
}

public plugin_precache( ) {
	precache_model( vAreThomson )
	precache_model( pAreThomson )
	precache_model( vAreAug )
	precache_model( pAreAug )
	precache_model( vAreXm )
	precache_model( pAreXm )
	precache_model( vAreMp5 )
	precache_model( pAreMp5 )
	precache_model ( vAreM3 );
	precache_model ( pAreM3  );
	precache_model ( vAreM249 );
	precache_model ( pAreM249  );
	precache_model ( vAreNavy );
	precache_model ( pAreNavy  );
	precache_model ( vAreF2 );
	precache_model ( pAreF2  );
	precache_model ( vAreGM249 );
	precache_model ( pAreGM249  );
	precache_model ( vAreInfi );
	precache_model ( pAreInfi  );
		
}

public fwPlayerSpawn( id ) {

	AreThomson[ id ] = false
	AreAug[ id ] = false
	AreXm[ id ] = false
	AreMp5[ id ] = false
	AreM3[ id ] = false
	AreM249[ id ] = false
	AreNavy[ id ] = false
	AreF2[ id ] = false
	AreGM249[ id ] = false
	AreInfi[ id ] = false
	ArmaPrimita[ id ] = false

	if( is_user_alive( id )) 
	{
		PopUpWeaponsMenu( id )
	}
	
}

public PopUpWeaponsMenu( id ) {
	new FurienWeaponsMenu = menu_create( "\rAnti-Furien \dWeapons", "FurienWeaponsHandler" )
	
	menu_additem( FurienWeaponsMenu, "Hunter \rGun^n", "1", 0 )
	menu_additem( FurienWeaponsMenu, "V.I.P's \rGun", "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, GREEN, "^4[Furien Weapons]^1 This weapons are only for ^3 V.I.P^1. Add^3 stelyistu_95@yahoo.com" )
				PopUpWeaponsMenu( id )
			}

		}
	}
	
	return PLUGIN_HANDLED
}
public ArmeNormale( id ) {
	
	new MeniuArmeNormale = menu_create( "\wHunter \dGuns", "ArmeNormaleHandler" )
	
	menu_additem( MeniuArmeNormale, "\wHk416", "1", 0 )
	menu_additem( MeniuArmeNormale, "\wTar21", "2", 0 )
	menu_additem( MeniuArmeNormale, "\wBalrog", "3", 0 )
	menu_additem( MeniuArmeNormale, "\wDual Mp5", "4", 0 )
	menu_additem( MeniuArmeNormale, "\wSfGun", "5", 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, GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuArmeNormale )
		return PLUGIN_HANDLED 
	}
	
	switch( item ) {
		case 0 : {
			give_item( id, "weapon_m4a1" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_M4A1, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreThomson )
			set_pev( id, pev_weaponmodel2, pAreThomson )
			AreThomson[ id ] = true
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_aug" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_AUG, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreAug )
			set_pev( id, pev_weaponmodel2, pAreAug )
			AreAug[ id ] = true
			AreInfi[ id ] = true
			ArmaPrimita[ id ] = true
			CurrWeapon2 ( id );
		}
		case 2 : {
			give_item( id, "weapon_xm1014" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_XM1014, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreXm )
			set_pev( id, pev_weaponmodel2, pAreXm )
			AreXm[ id ] = true
			AreInfi[ id ] = true
			ArmaPrimita[ id ] = true
			CurrWeapon2 ( id );
		}
		case 3 : {
			give_item( id, "weapon_mp5navy" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_MP5NAVY, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreMp5 )
			set_pev( id, pev_weaponmodel2, pAreMp5 )
			AreMp5[ id ] = true
			AreInfi[ id ] = true
			ArmaPrimita[ id ] = true
			CurrWeapon2 ( id );
		}
		
		case 4 : {
			give_item( id, "weapon_ak47" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_AK47, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreM3 )
			set_pev( id, pev_weaponmodel2, pAreM3 )
			AreM3[ id ] = true
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		
		
	}
	menu_destroy( MeniuArmeNormale )
	return PLUGIN_HANDLED
}

public ArmeVIP( id ) {
	new MeniuArmeVIP = menu_create( "\wVIP\d Guns*", "ArmeVIPHandler" )
	
	menu_additem( MeniuArmeVIP, "M134 \w[\dX3.5\w]", "1", 0 );
	menu_additem( MeniuArmeVIP, "K1ASES \w[\dX3.5\w]", "2", 0 );
	menu_additem( MeniuArmeVIP, "F2000 \w[\dX3.5\w]", "3", 0 )
	menu_additem( MeniuArmeVIP, "Gold M249 \w[\dX3.5\w]", "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, GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuArmeVIP )
		return PLUGIN_HANDLED
	}
	
	switch( item ) {
		case 0 : {
			give_item( id, "weapon_m249" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_M249, 250 )
			set_pev( id, pev_viewmodel2, vAreM249 )
			set_pev( id, pev_weaponmodel2, pAreM249 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreM249[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_mp5navy" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_MP5NAVY, 250 )
			set_pev( id, pev_viewmodel2, vAreNavy )
			set_pev( id, pev_weaponmodel2, pAreNavy )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreNavy[ id ] = true
		}
		case 2:
		{
			give_item( id, "weapon_sg552" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_SMOKEGRENADE, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_SG552, 250 )
			set_pev( id, pev_viewmodel2, vAreF2 )
			set_pev( id, pev_viewmodel2, pAreF2 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreF2[ id ] = true
		}
		case 3:
		{
			give_item( id, "weapon_m249" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_SMOKEGRENADE, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_M249, 250 )
			set_pev( id, pev_viewmodel2, vAreGM249 )
			set_pev( id, pev_weaponmodel2, pAreGM249 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreGM249[ id ] = true
		}	
	}
	menu_destroy( MeniuArmeVIP )
	return PLUGIN_HANDLED
}

public ClcmdWeaponsMenus( id ) {
	if( !is_user_alive( id ) ) {11
		ColorChat( id,GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return 
	}
	
	if( ArmaPrimita[ id ] ) {
		ColorChat( id, GREEN,"^4[Furien Weapons]^1 You've already chosen weapon in this round!" )
		return 
	}
	
		PopUpWeaponsMenu( id )
	}
}

public Event_CurWeapon( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_M4A1 && AreThomson[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreThomson )
		set_pev( id, pev_weaponmodel2, pAreThomson )
	}
	
	if( Arma == CSW_AUG && AreAug[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreAug )
		set_pev( id, pev_weaponmodel2, pAreAug )
	}
	
	if( Arma == CSW_XM1014 && AreXm[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreXm )
		set_pev( id, pev_weaponmodel2, pAreXm )

	}
	
	if( Arma == CSW_MP5NAVY && AreMp5[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreMp5 )
		set_pev( id, pev_viewmodel2, pAreMp5 )
	}
	
	if( Arma == CSW_AK47 && AreM3[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreM3 )
		set_pev( id, pev_viewmodel2, pAreM3 )
	}
	
	if( Arma == CSW_M249 && AreM249[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreM249 )
		set_pev( id, pev_viewmodel2, pAreM249 )
	}
	
	if( Arma == CSW_MP5NAVY && AreNavy[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreNavy )
		set_pev( id, pev_viewmodel2, pAreNavy )
	}
	
	if( Arma == CSW_SG552 && AreF2[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreF2 )
		set_pev( id, pev_viewmodel2, pAreF2 )
	}
	
	if( Arma == CSW_M249 && AreGM249[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreGM249 )
		set_pev( id, pev_viewmodel2, pAreGM249 )
	}
	
	if( Arma == CSW_ELITE && AreInfi[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreInfi )
		set_pev( id, pev_viewmodel2, pAreInfi )
	}
}

public CurrWeapon2 ( id ) {	
	
	if ( get_user_weapon ( id ) == CSW_M4A1 && AreThomson [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreThomson );
		set_pev ( id, pev_weaponmodel2, pAreThomson );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_AUG && AreAug [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreAug );
		set_pev ( id, pev_weaponmodel2, pAreAug );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_XM1014 && AreXm [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreXm );
		set_pev ( id, pev_weaponmodel2, pAreXm );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_MP5NAVY && AreMp5 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreMp5 );
		set_pev ( id, pev_weaponmodel2, pAreMp5 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_AK47 && AreM3 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreM3 );
		set_pev ( id, pev_weaponmodel2, pAreM3 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_M249 && AreM249 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreM249 );
		set_pev ( id, pev_weaponmodel2, pAreM249 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_MP5NAVY && AreNavy [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreNavy );
		set_pev ( id, pev_weaponmodel2, pAreNavy );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_SG552 && AreF2 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreF2 );
		set_pev ( id, pev_weaponmodel2, pAreF2 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_M249 && AreGM249 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreGM249 );
		set_pev ( id, pev_weaponmodel2, pAreGM249 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_ELITE && AreInfi [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreInfi );
		set_pev ( id, pev_weaponmodel2, pAreInfi );
		
	}
	
}

public fwTakeDamage( Victim, Inflictor, Attacker, Float:Damage ) {
	if( is_valid_player( Attacker ) && get_user_weapon( Attacker ) == CSW_M4A1 && AreThomson[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_AUG && AreAug[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_XM1014 && AreXm[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}

	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_MP5NAVY && AreMp5[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_AK47 && AreM3[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}	
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_M249 && AreM249[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}	
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_MP5NAVY && AreNavy[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}	
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_SG552 && AreF2[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_M249 && AreGM249[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_ELITE && AreInfi[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
}
Image
User avatar
kmking
Membru, skill 0
Membru, skill 0
Posts: 30
Joined: 31 Oct 2018, 22:47
Detinator Steam: Nu
Detinator server CS: CS.PLAY4CS.RO
Fond eXtream: 0
Contact:

09 Nov 2018, 03:33

Laurentiu P. wrote:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <ColorChat>

#define PLUGIN "Weapons Menu"
#define VERSION "1.0"
#define AUTHOR "CaTa"

#define VIP_FLAG ADMIN_LEVEL_H

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

const m_flNextSecondaryAttack =	47

new const vAreThomson[ 64 ] = "models/NewWeapons/v_hk416.mdl"
new const pAreThomson[ 64 ] = "models/NewWeapons/p_hk416.mdl"

new const vAreAug[ 64 ] = "models/NewWeapons/v_tar21.mdl"
new const pAreAug[ 64 ] = "models/NewWeapons/p_tar21.mdl"

new const vAreXm [ 64 ] = "models/NewWeapons/v_balrog11_2.mdl";
new const pAreXm [ 64 ] = "models/NewWeapons/p_balrog11.mdl";

new const vAreMp5 [ 64 ] = "models/NewWeapons/v_dualmp5.mdl";
new const pAreMp5 [ 64 ] = "models/NewWeapons/p_dualmp5.mdl";

new const vAreM3 [ 64 ] = "models/NewWeapons/v_sfgun.mdl";
new const pAreM3 [ 64 ] = "models/NewWeapons/p_sfgun.mdl";

new const vAreM249 [ 64 ] = "models/VipFurien/v_m134.mdl";
new const pAreM249 [ 64 ] = "models/VipFurien/p_m134.mdl";

new const vAreNavy [ 64 ] = "models/VipFurien/v_k1ases.mdl";
new const pAreNavy [ 64 ] = "models/VipFurien/p_k1ases.mdl";

new const vAreInfi [ 64 ] = "models/NewWeapons/v_infinity.mdl";
new const pAreInfi [ 64 ] = "models/NewWeapons/p_infinity.mdl";

new const vAreF2 [ 64 ] = "models/VipFurien/v_f2000.mdl";
new const pAreF2 [ 64 ] = "models/VipFurien/p_f2000.mdl";

new const vAreGM249 [ 64 ] = "models/VipFurien/v_goldenm2.mdl";
new const pAreGM249 [ 64 ] = "models/VipFurien/p_goldenm2.mdl";


new bool: ArmaPrimita[ 33 ]
new bool: AreThomson[ 33 ]
new bool: AreAug[ 33 ]
new bool: AreXm[ 33 ]
new bool: AreMp5[ 33 ]
new bool: AreM3[ 33 ]
new bool: AreM249[ 33 ]
new bool: AreNavy[ 33 ]
new bool: AreF2[ 33 ]
new bool: AreGM249[ 33 ]
new bool: AreInfi[ 33 ]


public plugin_init( ) {
	register_plugin( PLUGIN, VERSION, AUTHOR )
	
	register_event( "CurWeapon", "Event_CurWeapon", "be", "1=1" )
	register_event("CurWeapon", "CurrWeapon2", "be", "be", "1=1" )
	
	register_forward(FM_TraceLine,"fw_traceline");
	register_forward(FM_PlayerPostThink,"fw_playerpostthink");
	
	RegisterHam( Ham_Spawn, "player", "fwPlayerSpawn", true )
	RegisterHam( Ham_TakeDamage, "player", "fwTakeDamage" )
	
	register_clcmd( "say /weapons", "ClcmdWeaponsMenus" )
	register_clcmd( "say_team /weapons", "ClcmdWeaponsMenus" )
	register_event ( "CurWeapon", "CurrWeapon2", "be", "1=1" );

	
}

public plugin_precache( ) {
	precache_model( vAreThomson )
	precache_model( pAreThomson )
	precache_model( vAreAug )
	precache_model( pAreAug )
	precache_model( vAreXm )
	precache_model( pAreXm )
	precache_model( vAreMp5 )
	precache_model( pAreMp5 )
	precache_model ( vAreM3 );
	precache_model ( pAreM3  );
	precache_model ( vAreM249 );
	precache_model ( pAreM249  );
	precache_model ( vAreNavy );
	precache_model ( pAreNavy  );
	precache_model ( vAreF2 );
	precache_model ( pAreF2  );
	precache_model ( vAreGM249 );
	precache_model ( pAreGM249  );
	precache_model ( vAreInfi );
	precache_model ( pAreInfi  );
		
}

public fwPlayerSpawn( id ) {

	AreThomson[ id ] = false
	AreAug[ id ] = false
	AreXm[ id ] = false
	AreMp5[ id ] = false
	AreM3[ id ] = false
	AreM249[ id ] = false
	AreNavy[ id ] = false
	AreF2[ id ] = false
	AreGM249[ id ] = false
	AreInfi[ id ] = false
	ArmaPrimita[ id ] = false

	if( is_user_alive( id )) 
	{
		PopUpWeaponsMenu( id )
	}
	
}

public PopUpWeaponsMenu( id ) {
	new FurienWeaponsMenu = menu_create( "\rAnti-Furien \dWeapons", "FurienWeaponsHandler" )
	
	menu_additem( FurienWeaponsMenu, "Hunter \rGun^n", "1", 0 )
	menu_additem( FurienWeaponsMenu, "V.I.P's \rGun", "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, GREEN, "^4[Furien Weapons]^1 This weapons are only for ^3 V.I.P^1. Add^3 stelyistu_95@yahoo.com" )
				PopUpWeaponsMenu( id )
			}

		}
	}
	
	return PLUGIN_HANDLED
}
public ArmeNormale( id ) {
	
	new MeniuArmeNormale = menu_create( "\wHunter \dGuns", "ArmeNormaleHandler" )
	
	menu_additem( MeniuArmeNormale, "\wHk416", "1", 0 )
	menu_additem( MeniuArmeNormale, "\wTar21", "2", 0 )
	menu_additem( MeniuArmeNormale, "\wBalrog", "3", 0 )
	menu_additem( MeniuArmeNormale, "\wDual Mp5", "4", 0 )
	menu_additem( MeniuArmeNormale, "\wSfGun", "5", 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, GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuArmeNormale )
		return PLUGIN_HANDLED 
	}
	
	switch( item ) {
		case 0 : {
			give_item( id, "weapon_m4a1" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_M4A1, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreThomson )
			set_pev( id, pev_weaponmodel2, pAreThomson )
			AreThomson[ id ] = true
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_aug" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_AUG, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreAug )
			set_pev( id, pev_weaponmodel2, pAreAug )
			AreAug[ id ] = true
			AreInfi[ id ] = true
			ArmaPrimita[ id ] = true
			CurrWeapon2 ( id );
		}
		case 2 : {
			give_item( id, "weapon_xm1014" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_XM1014, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreXm )
			set_pev( id, pev_weaponmodel2, pAreXm )
			AreXm[ id ] = true
			AreInfi[ id ] = true
			ArmaPrimita[ id ] = true
			CurrWeapon2 ( id );
		}
		case 3 : {
			give_item( id, "weapon_mp5navy" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_MP5NAVY, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreMp5 )
			set_pev( id, pev_weaponmodel2, pAreMp5 )
			AreMp5[ id ] = true
			AreInfi[ id ] = true
			ArmaPrimita[ id ] = true
			CurrWeapon2 ( id );
		}
		
		case 4 : {
			give_item( id, "weapon_ak47" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_AK47, 250 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			set_pev( id, pev_viewmodel2, vAreM3 )
			set_pev( id, pev_weaponmodel2, pAreM3 )
			AreM3[ id ] = true
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		
		
	}
	menu_destroy( MeniuArmeNormale )
	return PLUGIN_HANDLED
}

public ArmeVIP( id ) {
	new MeniuArmeVIP = menu_create( "\wVIP\d Guns*", "ArmeVIPHandler" )
	
	menu_additem( MeniuArmeVIP, "M134 \w[\dX3.5\w]", "1", 0 );
	menu_additem( MeniuArmeVIP, "K1ASES \w[\dX3.5\w]", "2", 0 );
	menu_additem( MeniuArmeVIP, "F2000 \w[\dX3.5\w]", "3", 0 )
	menu_additem( MeniuArmeVIP, "Gold M249 \w[\dX3.5\w]", "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, GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return PLUGIN_HANDLED
	}
	
	if( item == MENU_EXIT ) {
		menu_destroy( MeniuArmeVIP )
		return PLUGIN_HANDLED
	}
	
	switch( item ) {
		case 0 : {
			give_item( id, "weapon_m249" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_M249, 250 )
			set_pev( id, pev_viewmodel2, vAreM249 )
			set_pev( id, pev_weaponmodel2, pAreM249 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreM249[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_mp5navy" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_flashbang" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_FLASHBANG, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_MP5NAVY, 250 )
			set_pev( id, pev_viewmodel2, vAreNavy )
			set_pev( id, pev_weaponmodel2, pAreNavy )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreNavy[ id ] = true
		}
		case 2:
		{
			give_item( id, "weapon_sg552" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_SMOKEGRENADE, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_SG552, 250 )
			set_pev( id, pev_viewmodel2, vAreF2 )
			set_pev( id, pev_viewmodel2, pAreF2 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreF2[ id ] = true
		}
		case 3:
		{
			give_item( id, "weapon_m249" )
			give_item( id, "weapon_elite" )
			give_item( id, "weapon_hegrenade" )
			give_item( id, "weapon_smokegrenade" )
			cs_set_user_bpammo( id, CSW_SMOKEGRENADE, 2 )
			cs_set_user_bpammo( id, CSW_ELITE, 100 )
			cs_set_user_bpammo( id, CSW_M249, 250 )
			set_pev( id, pev_viewmodel2, vAreGM249 )
			set_pev( id, pev_weaponmodel2, pAreGM249 )
			set_pev( id, pev_viewmodel2, vAreInfi )
			set_pev( id, pev_weaponmodel2, pAreInfi )
			AreInfi[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreGM249[ id ] = true
		}	
	}
	menu_destroy( MeniuArmeVIP )
	return PLUGIN_HANDLED
}

public ClcmdWeaponsMenus( id ) {
	if( !is_user_alive( id ) ) {11
		ColorChat( id,GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return 
	}
	
	if( ArmaPrimita[ id ] ) {
		ColorChat( id, GREEN,"^4[Furien Weapons]^1 You've already chosen weapon in this round!" )
		return 
	}
	
		PopUpWeaponsMenu( id )
	}
}

public Event_CurWeapon( id ) {
	new Arma = read_data( 2 )
	
	if( Arma == CSW_M4A1 && AreThomson[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreThomson )
		set_pev( id, pev_weaponmodel2, pAreThomson )
	}
	
	if( Arma == CSW_AUG && AreAug[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreAug )
		set_pev( id, pev_weaponmodel2, pAreAug )
	}
	
	if( Arma == CSW_XM1014 && AreXm[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreXm )
		set_pev( id, pev_weaponmodel2, pAreXm )

	}
	
	if( Arma == CSW_MP5NAVY && AreMp5[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreMp5 )
		set_pev( id, pev_viewmodel2, pAreMp5 )
	}
	
	if( Arma == CSW_AK47 && AreM3[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreM3 )
		set_pev( id, pev_viewmodel2, pAreM3 )
	}
	
	if( Arma == CSW_M249 && AreM249[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreM249 )
		set_pev( id, pev_viewmodel2, pAreM249 )
	}
	
	if( Arma == CSW_MP5NAVY && AreNavy[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreNavy )
		set_pev( id, pev_viewmodel2, pAreNavy )
	}
	
	if( Arma == CSW_SG552 && AreF2[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreF2 )
		set_pev( id, pev_viewmodel2, pAreF2 )
	}
	
	if( Arma == CSW_M249 && AreGM249[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreGM249 )
		set_pev( id, pev_viewmodel2, pAreGM249 )
	}
	
	if( Arma == CSW_ELITE && AreInfi[ id ] ) {
		set_pev( id, pev_viewmodel2, vAreInfi )
		set_pev( id, pev_viewmodel2, pAreInfi )
	}
}

public CurrWeapon2 ( id ) {	
	
	if ( get_user_weapon ( id ) == CSW_M4A1 && AreThomson [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreThomson );
		set_pev ( id, pev_weaponmodel2, pAreThomson );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_AUG && AreAug [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreAug );
		set_pev ( id, pev_weaponmodel2, pAreAug );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_XM1014 && AreXm [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreXm );
		set_pev ( id, pev_weaponmodel2, pAreXm );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_MP5NAVY && AreMp5 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreMp5 );
		set_pev ( id, pev_weaponmodel2, pAreMp5 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_AK47 && AreM3 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreM3 );
		set_pev ( id, pev_weaponmodel2, pAreM3 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_M249 && AreM249 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreM249 );
		set_pev ( id, pev_weaponmodel2, pAreM249 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_MP5NAVY && AreNavy [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreNavy );
		set_pev ( id, pev_weaponmodel2, pAreNavy );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_SG552 && AreF2 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreF2 );
		set_pev ( id, pev_weaponmodel2, pAreF2 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_M249 && AreGM249 [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreGM249 );
		set_pev ( id, pev_weaponmodel2, pAreGM249 );
		
	}
	
	if ( get_user_weapon ( id ) == CSW_ELITE && AreInfi [ id ] ) {
		
		set_pev ( id, pev_viewmodel2, vAreInfi );
		set_pev ( id, pev_weaponmodel2, pAreInfi );
		
	}
	
}

public fwTakeDamage( Victim, Inflictor, Attacker, Float:Damage ) {
	if( is_valid_player( Attacker ) && get_user_weapon( Attacker ) == CSW_M4A1 && AreThomson[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_AUG && AreAug[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_XM1014 && AreXm[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}

	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_MP5NAVY && AreMp5[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_AK47 && AreM3[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}	
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_M249 && AreM249[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}	
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_MP5NAVY && AreNavy[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}	
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_SG552 && AreF2[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_M249 && AreGM249[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
	
	if( is_valid_player( Attacker) && get_user_weapon( Attacker ) == CSW_ELITE && AreInfi[ Attacker ] ) {
		SetHamParamFloat( 4, Damage * 1.0 )
	}
}
Poti pune te rog armele astea in Arme VIP :

p_golden_ak47.mdl
p_golden_deagle.mdl
p_golden_m4a1.mdl
p_minigun.mdl
v_golden_ak47.mdl
v_golden_deagle.mdl
v_golden_m4a1.mdl
v_minigun.mdl

Si in cel de player sa fie armele classice :
M4a1
Ak47
Deagle
Awp
Mp5
Etc...

Deci doar sa le adaugi in plugin , ca la cele care le'ai pus in plugin nu gasesc modelele :(
Sau daca e prea mult fa doar un meniu pentru VIP care sa se deschida cu o comanda si sa aiba doar armele astea :
p_golden_ak47.mdl
p_golden_deagle.mdl
p_golden_m4a1.mdl
p_minigun.mdl
v_golden_ak47.mdl
v_golden_deagle.mdl
v_golden_m4a1.mdl
v_minigun.mdl
Image
CONNECT CS.PLAY4CS.RO
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2039
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: 33 times
Been thanked: 330 times
Contact:

09 Nov 2018, 10:58

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

#define VIP_FLAG ADMIN_LEVEL_H

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

const m_flNextSecondaryAttack =	47

new const ArmeVIP[][]=
{
	"models/NewWeapons/v_golden_ak47.mdl",
	"models/NewWeapons/p_golden_ak47.mdl",
	
	"models/NewWeapons/v_golden_m4a1.mdl",
	"models/NewWeapons/p_golden_m4a1.mdl",
	
	"models/NewWeapons/v_golden_deagle.mdl",
	"models/NewWeapons/p_golden_deagle.mdl",
	
	"models/NewWeapons/v_minigun.mdl",
	"models/NewWeapons/p_minigun.mdl"
}


new bool: ArmaPrimita[ 33 ]

new bool: GoldenAK[ 33 ]
new bool: GoldenDG[ 33 ]
new bool: GoldenM4[ 33 ]

new bool: AreMG[ 33 ]



// Null ( do not modify )
#define 	NULL			0


// Max number of secondary weapons ( Pistols.. ). Do not modify.
#define		MAX_SECONDARY		7

// These determine if these secondary weapons ( Pistols.. ) should be enabled or disabled.
// 1 = enabled
// 0 = disabled

#define		ENABLE_USP		1
#define		ENABLE_GLOCK		1
#define		ENABLE_DEAGLE		1
#define		ENABLE_P228		1
#define		ENABLE_ELITE		1
#define		ENABLE_FIVESEVEN	1




// Max number of primary weapons ( Guns.. ). Do not modify.
#define 	MAX_PRIMARY		19

// These determine if these primary weapons ( Guns.. ) should be enabled or disabled.
// 1 = enabled
// 0 = disabled

#define		ENABLE_M4A1		1
#define		ENABLE_AK47		1
#define		ENABLE_AUG		1
#define		ENABLE_SG552		1
#define		ENABLE_GALIL		1
#define		ENABLE_FAMAS		1
#define		ENABLE_SCOUT		1
#define		ENABLE_AWP		0
#define		ENABLE_SG550		1
#define		ENABLE_M249		0
#define		ENABLE_G3SG1		1
#define		ENABLE_UMP45		1
#define		ENABLE_MP5NAVY		1
#define		ENABLE_M3		1
#define		ENABLE_XM1014		1
#define		ENABLE_TMP		1
#define		ENABLE_MAC10		1
#define		ENABLE_P90		1




/*======================================= - | Askhanar | - =======================================*/

new const gSecondaryWeaponsEnabled[  MAX_SECONDARY  ]  =
{
	NULL,
	ENABLE_USP,
	ENABLE_GLOCK,
	ENABLE_DEAGLE,
	ENABLE_P228,
	ENABLE_ELITE,
	ENABLE_FIVESEVEN
};

/*======================================= - | Askhanar | - =======================================*/

new const gSecondaryWeaponsName[  MAX_SECONDARY  ][    ]  =
{
	"",
	"USP",
	"Glock",
	"Deagle",
	"P228",
	"Elite",
	"Five Seven"
};

/*======================================= - | Askhanar | - =======================================*/

new const gSecondaryWeaponsItemName[  MAX_SECONDARY  ][    ]  =
{
	"",
	"weapon_usp",
	"weapon_glock18",
	"weapon_deagle",
	"weapon_p228",
	"weapon_elite",
	"weapon_fiveseven"
};

/*======================================= - | Askhanar | - =======================================*/

new const gSecondaryWeaponsItemNum[  MAX_SECONDARY  ]  =
{
	NULL,
	CSW_USP,
	CSW_GLOCK18,
	CSW_DEAGLE,
	CSW_P228,
	CSW_ELITE,
	CSW_FIVESEVEN
};

/*======================================= - | Askhanar | - =======================================*/

new const gSecondaryWeaponsMaxClip[  MAX_SECONDARY  ]  =
{
	NULL,
	12,
	20,
	7,
	13,
	30,
	20
};

/*======================================= - | Askhanar | - =======================================*/

new const gSecondaryWeaponsMaxAmmo[  MAX_SECONDARY  ]  =
{
	NULL,
	100,
	120,
	35,
	52,
	120,
	100
};

/*======================================= - | Askhanar | - =======================================*/

new const gPrimaryWeaponsEnabled[  MAX_PRIMARY  ]  =
{
	NULL,
	ENABLE_M4A1,
	ENABLE_AK47,
	ENABLE_AUG,
	ENABLE_SG552,
	ENABLE_GALIL,
	ENABLE_FAMAS,
	ENABLE_SCOUT,
	ENABLE_AWP,
	ENABLE_SG550,
	ENABLE_M249,
	ENABLE_G3SG1,
	ENABLE_UMP45,
	ENABLE_MP5NAVY,
	ENABLE_M3,
	ENABLE_XM1014,
	ENABLE_TMP,
	ENABLE_MAC10,
	ENABLE_P90
};

/*======================================= - | Askhanar | - =======================================*/

new const gPrimaryWeaponsName[  MAX_PRIMARY  ][    ]  =
{
	"",
	"M4A1",
	"AK47",
	"AUG",
	"SG552",
	"Galil",
	"Famas",
	"Scout",
	"AWP",
	"SG550",
	"M249",
	"G3SG1",
	"UMP 45",
	"MP5 Navy",
	"M3",
	"XM1014",
	"TMP",
	"Mac 10",
	"P90"
};

/*======================================= - | Askhanar | - =======================================*/

new const gPrimaryWeaponsItemName[  MAX_PRIMARY  ][    ]  =
{
	"",
	"weapon_m4a1",
	"weapon_ak47",
	"weapon_aug",
	"weapon_sg552",
	"weapon_galil",
	"weapon_famas",
	"weapon_scout",
	"weapon_awp",
	"weapon_sg550",
	"weapon_m249",
	"weapon_g3sg1",
	"weapon_ump45",
	"weapon_mp5navy",
	"weapon_m3",
	"weapon_xm1014",
	"weapon_tmp",
	"weapon_mac10",
	"weapon_p90"
};

/*======================================= - | Askhanar | - =======================================*/

new const gPrimaryWeaponsItemNum[  MAX_PRIMARY  ]  =
{
	NULL,
	CSW_M4A1,
	CSW_AK47,
	CSW_AUG,
	CSW_SG552,
	CSW_GALIL,
	CSW_FAMAS,
	CSW_SCOUT,
	CSW_AWP,
	CSW_SG550,
	CSW_M249,
	CSW_G3SG1,
	CSW_UMP45,
	CSW_MP5NAVY,
	CSW_M3,
	CSW_XM1014,
	CSW_TMP,
	CSW_MAC10,
	CSW_P90
};

/*======================================= - | Askhanar | - =======================================*/

new const gPrimaryWeaponsMaxClip[  MAX_PRIMARY  ]  =
{
	NULL,
	30,
	30,
	30,
	30,
	35,
	25,
	10,
	10,
	30,
	100,
	20,
	25,
	30,
	8,
	7,
	30,
	30,
	50
};

/*======================================= - | Askhanar | - =======================================*/

new const gPrimaryWeaponsMaxAmmo[  MAX_PRIMARY  ]  =
{
	NULL,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
	200,
};

/*======================================= - | Askhanar | - =======================================*/

new gUserLastSecondaryWeapons[  33  ];
new gUserLastPrimaryWeapons[  33  ];

/*======================================= - | Askhanar | - =======================================*/


public plugin_init( ) {
	register_event( "CurWeapon", "CurrWeapon2", "be", "1=1" )
	
	RegisterHam( Ham_Spawn, "player", "fwPlayerSpawn", true )
	RegisterHam( Ham_TakeDamage, "player", "fwTakeDamage" )
	
	register_clcmd( "say /weapons", "ClcmdWeaponsMenus" )
	register_clcmd( "say_team /weapons", "ClcmdWeaponsMenus" )
}

public plugin_precache( )	for(new i=0;i<sizeof ArmeVIP;i++)	precache_model(ArmeVIP)

public client_putinserver(  id  )
{
	if(  is_user_bot(  id  )  ||  is_user_hltv(  id  )  )  return 0;
	
	gUserLastSecondaryWeapons[  id  ]  =  0;
	gUserLastPrimaryWeapons[  id  ]  =  0;
		
	return 0;
}

/*======================================= - | Askhanar | - =======================================*/

public client_disconnect(  id  )
{
	if(  is_user_bot(  id  )  ||  is_user_hltv(  id  )  )  return 0;
	
	gUserLastSecondaryWeapons[  id  ]  =  0;
	gUserLastPrimaryWeapons[  id  ]  =  0;
		
	return 0;
}

public fwPlayerSpawn( id ) {
	GoldenAK[ id ] = false
	GoldenM4[ id ] = false
	GoldenDG[ id ] = false
	
	AreMG[ id ] = false

	ArmaPrimita[ id ] = false

	if( is_user_alive( id )&&get_user_team(id)==2) 
	{
		PopUpWeaponsMenu( id )
	}
}

public PopUpWeaponsMenu( id ) {
	new FurienWeaponsMenu = menu_create( "\rAnti-Furien \dWeapons", "FurienWeaponsHandler" )
	
	menu_additem( FurienWeaponsMenu, "Hunter \rGun", "1", 0 )
	menu_additem( FurienWeaponsMenu, "V.I.P's \rGun", "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) )	ArmeVIP2( id )
			else 	ColorChat( id, GREEN, "^4[Furien Weapons]^1 This weapons are only for ^3 V.I.P^1. Add^3 stelyistu_95@yahoo.com" )
		}
	}
	
	return PLUGIN_HANDLED
}
public ArmeNormale( id ) {
	new menu = menu_create(  "\rAnti-Furien:\d Alegere", "WeaponsMenuHandler" );	
	
	menu_additem(  menu,  "Set Nou",  "1", 0  );
	menu_additem(  menu,  "Set Vechi",  "2", 0  );
	
	menu_setprop( menu, MPROP_EXIT , MEXIT_NEVER );
	menu_display(  id,  menu,  0 );
}

public WeaponsMenuHandler(  id,  menu,  item  )
{
	new data[ 6 ], iName[ 64 ];
	new iaccess, callback;
	
	menu_item_getinfo(  menu,  item,  iaccess,  data,  5,  iName,  63,  callback );
	menu_destroy(  menu  );
	
	new key = str_to_num(  data  );
	
	switch(  key  )
	{
		case 1:
		{
			if(  IsUserAntiFurien(  id  )  )
			{
				ShowSecondaryWeaponsMenu(  id,  0  );
				ArmaPrimita[id]=true
			}
			return 1;
		}

		case 2:
		{
			if(  IsUserAntiFurien(  id  )  )
			{
				if(  gUserLastPrimaryWeapons[  id  ]  <=  0  ||  gUserLastSecondaryWeapons[  id  ]  <=  0  )
				{
					ArmeNormale(  id  );
					ColorChat(  id,  NORMAL, "^x04[Furien Ultimate]^x03 Prima data trebuie sa iti alegi armele !"  );
					return 1;
				}
				
				GiveWeaponAndSetClipAndAmmo(  id,  gSecondaryWeaponsItemName[  gUserLastSecondaryWeapons[  id  ]  ],  gSecondaryWeaponsItemNum[  gUserLastSecondaryWeapons[  id  ]  ],
						gSecondaryWeaponsMaxClip[  gUserLastSecondaryWeapons[  id  ]  ],  gSecondaryWeaponsMaxAmmo[  gUserLastSecondaryWeapons[  id  ]  ]  );
						
				GiveWeaponAndSetClipAndAmmo(  id,  gPrimaryWeaponsItemName[  gUserLastPrimaryWeapons[  id  ]  ],  gPrimaryWeaponsItemNum[  gUserLastPrimaryWeapons[  id  ]  ],
						gPrimaryWeaponsMaxClip[  gUserLastPrimaryWeapons[  id  ]  ],  gPrimaryWeaponsMaxAmmo[  gUserLastPrimaryWeapons[  id  ]  ]  );
				

				ArmaPrimita[id]=true
				return 1;
			}
		}
	}
	
	return 1;
}

/*======================================= - | Askhanar | - =======================================*/

public ShowSecondaryWeaponsMenu(  id,  page  )
{
	new menu = menu_create(  "\rAnti-Furien:\d Pistoale", "SecondaryWeaponsMenuHandler" );	
	new callback = menu_makecallback(  "CallbackSecondaryWeapons"  );
	
	for(  new i = 1; i  <  MAX_SECONDARY;  i++  )
	{
		new  szMenuKey[  32  ];
		num_to_str(  i,  szMenuKey,  sizeof  (  szMenuKey  )  );
		
		menu_additem(  menu,  gSecondaryWeaponsName[  i  ],  szMenuKey,  _,  callback  );
	}
	
	menu_setprop( menu, MPROP_EXIT , MEXIT_NEVER );
	menu_display(  id,  menu,  page );
}

/*======================================= - | Askhanar | - =======================================*/

public SecondaryWeaponsMenuHandler(  id,  menu,  item  )
{
	new data[ 6 ], iName[ 64 ];
	new iaccess, callback;
	
	menu_item_getinfo(  menu,  item,  iaccess,  data,  5,  iName,  63,  callback );
	menu_destroy(  menu  );
	
	new key = str_to_num(  data  );
	
	if(  IsUserAntiFurien(  id  )  )
	{
		GiveWeaponAndSetClipAndAmmo(  id,  gSecondaryWeaponsItemName[  key  ],  gSecondaryWeaponsItemNum[  key  ],
						gSecondaryWeaponsMaxClip[  key  ],  gSecondaryWeaponsMaxAmmo[  key  ]  );
		gUserLastSecondaryWeapons[  id  ]  =  key;
		ShowPrimaryWeaponsMenu(  id,  0  );
	}
	
	return 1;
}

/*======================================= - | Askhanar | - =======================================*/

public CallbackSecondaryWeapons(  id,  menu,  item  )
{
	static  _access,  info[  4  ],  callback;
	menu_item_getinfo(  menu,  item,  _access,  info,  sizeof (  info  )  - 1,  _,  _,  callback  );
	
	if(  !gSecondaryWeaponsEnabled[  str_to_num(  info  )  ]  )  return ITEM_DISABLED;
	
	return ITEM_ENABLED;
}

/*======================================= - | Askhanar | - =======================================*/

public ShowPrimaryWeaponsMenu(  id,  page  )
{
	new menu = menu_create(  "\rAnti-Furien:\d Arme", "PrimaryWeaponsMenuHandler" );	
	new callback = menu_makecallback(  "CallbackPrimaryWeapons"  );
	
	for(  new i = 1; i  <  MAX_PRIMARY;  i++  )
	{
		new  szMenuKey[  32  ];
		num_to_str(  i,  szMenuKey,  sizeof  (  szMenuKey  )  );
		
		menu_additem(  menu,  gPrimaryWeaponsName[  i  ],  szMenuKey,  _,  callback  );
	}
	
	menu_setprop( menu, MPROP_EXIT , MEXIT_NEVER );
	menu_display(  id,  menu,  page );

}

/*======================================= - | Askhanar | - =======================================*/

public PrimaryWeaponsMenuHandler(  id,  menu,  item  )
{
	new data[ 6 ], iName[ 64 ];
	new iaccess, callback;
	
	menu_item_getinfo(  menu,  item,  iaccess,  data,  5,  iName,  63,  callback  );
	menu_destroy(  menu  );
	
	new key = str_to_num( data );
	
	if(  IsUserAntiFurien(  id  )  )
	{
		GiveWeaponAndSetClipAndAmmo(  id,  gPrimaryWeaponsItemName[  key  ],  gPrimaryWeaponsItemNum[  key  ],
						gPrimaryWeaponsMaxClip[  key  ],  gPrimaryWeaponsMaxAmmo[  key  ]  );
		
		gUserLastPrimaryWeapons[  id  ]  =  key;
	
	}
	
	return 1;
}

/*======================================= - | Askhanar | - =======================================*/

public CallbackPrimaryWeapons(  id,  menu,  item  )
{
	static _access, info[4], callback;
	menu_item_getinfo(menu, item, _access, info, sizeof(info) - 1, _, _, callback);
	
	if(  !gPrimaryWeaponsEnabled[  str_to_num(  info  )  ]  )  return ITEM_DISABLED;
	
	return ITEM_ENABLED;
}

/*======================================= - | Askhanar | - =======================================*/

public GiveWeaponAndSetClipAndAmmo(  id,  const WeaponName[    ],  const WeaponId,  const WeaponMaxClip,  const WeaponMaxAmmo  )
{
	if( !is_user_alive(  id  )  )  return 1;
	
	give_item(  id,  WeaponName  );
	new WeapId  =  find_ent_by_owner(  -1,  WeaponName,  id  );
	
	if(  WeapId  )
	{
		cs_set_weapon_ammo(  WeapId, WeaponMaxClip  );
	} 
	
	if(  WeaponId  !=  0  )
		cs_set_user_bpammo(  id,  WeaponId,  WeaponMaxAmmo  );
	
	return 0;
}

/*======================================= - | Askhanar | - =======================================*/

stock bool:IsUserAntiFurien(  id  )
{
	if(  get_user_team(  id  )  ==  2  )
		return true;
		
	return false;
}

/*======================================= - | Askhanar | - =======================================*/

stock bool:UserHasNoWeapon(  id  )
{
	new bool:WeaponFound  =  false;
	
	for(  new i  =  1;  i <  MAX_PRIMARY ; i++  )
	{
		if( user_has_weapon(  id,  gPrimaryWeaponsItemNum[  i  ]  )  )
		{
			WeaponFound  =  true;
			break;
		}
	}
	
	for(  new i  =  1;  i <  MAX_SECONDARY; i++  )
	{
		if( user_has_weapon(  id,  gSecondaryWeaponsItemNum[  i  ]  )  )
		{
			WeaponFound  =  true;
			break;
		}
	}
	
	return WeaponFound  ?  false  :  true;
}		

/*======================================= - | Askhanar | - =======================================*/

public ArmeVIP2( id ) {
	new MeniuArmeVIP = menu_create( "\wVIP\d Guns*", "ArmeVIPHandler" )
	
	menu_additem( MeniuArmeVIP, "\yGolden\r AK47", "1" );
	menu_additem( MeniuArmeVIP, "\yGolden\r M4A1", "2" );
	menu_additem( MeniuArmeVIP, "\yGolden\r DEAGLE", "3" )
	menu_additem( MeniuArmeVIP, "\wSPECIAL\r MINIGUN", "4" )
	
	menu_setprop( MeniuArmeVIP, MPROP_EXIT, MEXIT_ALL )
	menu_display( id, MeniuArmeVIP, 0 )
}

public ArmeVIPHandler( id, MeniuArmeVIP, item ) {
	if( !is_user_alive( id ) ) {
		ColorChat( id, GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		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, ArmeVIP[0] )
			set_pev( id, pev_weaponmodel2, ArmeVIP[1] )
			GoldenAK[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		case 1 : {
			give_item( id, "weapon_m4a1" )
			cs_set_user_bpammo( id, CSW_M4A1, 90 )
			set_pev( id, pev_viewmodel2, ArmeVIP[2] )
			set_pev( id, pev_weaponmodel2, ArmeVIP[3] )
			GoldenM4[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		case 2:
		{
			give_item( id, "weapon_deagle" )
			cs_set_user_bpammo( id, CSW_DEAGLE, 35 )
			set_pev( id, pev_viewmodel2, ArmeVIP[4] )
			set_pev( id, pev_weaponmodel2, ArmeVIP[5] )
			GoldenDG[ id ] = true
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
		}
		case 3:
		{
			give_item( id, "weapon_m249" )
			cs_set_user_bpammo( id, CSW_M249, 250 )
			set_pev( id, pev_viewmodel2, ArmeVIP[6] )
			set_pev( id, pev_weaponmodel2, ArmeVIP[7] )
			CurrWeapon2 ( id );
			ArmaPrimita[ id ] = true
			AreMG[ id ] = true
		}	
	}
	menu_destroy( MeniuArmeVIP )
	return PLUGIN_HANDLED
}

public ClcmdWeaponsMenus( id ) {
	if( !is_user_alive( id ) ) {
		ColorChat( id,GREEN, "^4[Furien Weapons]^1 You can not choose your weapon when you're dead!" )
		return 
	}
	
	if( ArmaPrimita[ id ] ) {
		ColorChat( id, GREEN,"^4[Furien Weapons]^1 You've already chosen weapon in this round!" )
		return 
	}
	
	PopUpWeaponsMenu( id )
}

public CurrWeapon2 ( id ) {
	switch(get_user_weapon(id))
	{
		case CSW_AK47:
		{
			if ( GoldenAK [ id ] ) {
				set_pev ( id, pev_viewmodel2, ArmeVIP[0] );
				set_pev ( id, pev_weaponmodel2, ArmeVIP[1] );
			}
		}
		
		case CSW_M4A1:
		{
			if ( GoldenM4 [ id ] ) {
				set_pev ( id, pev_viewmodel2, ArmeVIP[2] );
				set_pev ( id, pev_weaponmodel2, ArmeVIP[3] );
			}
		}
		
		case CSW_DEAGLE:
		{
			if (GoldenDG [ id ] ) {
				set_pev ( id, pev_viewmodel2, ArmeVIP[4] );
				set_pev( id, pev_weaponmodel2, ArmeVIP[5] );
			}
		}
	
		case CSW_M249:
		{
			if ( AreMG [ id ] ) {
				set_pev ( id, pev_viewmodel2, ArmeVIP[6] );
				set_pev ( id, pev_weaponmodel2, ArmeVIP[7] );
			}
		}
	}
}

public fwTakeDamage( Victim, Inflictor, Attacker, Float:Damage ) {
	switch(get_user_weapon(Attacker))
	{
		case CSW_AK47:
		{
			if( is_valid_player( Attacker) && GoldenAK[ Attacker ] )	SetHamParamFloat( 4, Damage * 1.0 )
		}
		
		case CSW_M4A1:
		{
			if( is_valid_player( Attacker ) &&  GoldenM4[ Attacker ] )	SetHamParamFloat( 4, Damage * 1.0 )
		}
		
		case CSW_DEAGLE:
		{
			if( is_valid_player( Attacker)&& GoldenDG[ Attacker ] ) 	SetHamParamFloat( 4, Damage * 1.0 )
		}
	
		case CSW_M249:
		{
			if( is_valid_player( Attacker) && AreMG[ Attacker ] )	SetHamParamFloat( 4, Damage * 1.0 )
		}
	}
}
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 14 guests