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:

09 Nov 2018, 13:32

Adryyy wrote:
| 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 )
		}
	}
}


Imi da eroare la compilare :

AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Modified for www.Freakz.ro / amx.freakz.ro

include_183/ham_const.inc(1859) : warning 200: symbol "Ham_DOD_Weapon_PlayerIsWaterSni" is truncated to 31 characters
include_183/ham_const.inc(2628) : warning 200: symbol "Ham_ESF_Weapon_HolsterWhenMelee" is truncated to 31 characters
include_183/ham_const.inc(2697) : warning 200: symbol "Ham_NS_EffectivePlayerClassChan" is truncated to 31 characters
include_183/ham_const.inc(2802) : warning 200: symbol "Ham_NS_Weapon_GetWeaponPrimeTim" is truncated to 31 characters
include_183/ham_const.inc(2826) : warning 200: symbol "Ham_NS_Weapon_GetIsWeaponPrimin" is truncated to 31 characters
include_183/ham_const.inc(3271) : warning 200: symbol "Ham_SC_CheckAndApplyGenericAtta" is truncated to 31 characters
include_183/ham_const.inc(3320) : warning 200: symbol "Ham_SC_Player_MenuInputPerforme" is truncated to 31 characters
include_183/ham_const.inc(3416) : warning 200: symbol "Ham_SC_Player_TimeToStartNextVo" is truncated to 31 characters
include_183/ham_const.inc(3448) : warning 200: symbol "Ham_SC_Player_DisableCollisionW" is truncated to 31 characters
include_183/ham_const.inc(3456) : warning 200: symbol "Ham_SC_Player_EnableCollisionWi" is truncated to 31 characters
include_183/ham_const.inc(3530) : warning 200: symbol "Ham_SC_Weapon_PrecacheCustomMod" is truncated to 31 characters
include_183/ham_const.inc(3631) : warning 200: symbol "Ham_TFC_Weapon_GetNextAttackDel" is truncated to 31 characters
include_183/ham_const.inc(3699) : warning 200: symbol "Ham_OPF_MySquadTalkMonsterPoint" is truncated to 31 characters
NewWeapons.sma(445) : error 017: undefined symbol "NORMAL"
NewWeapons.sma(445) : warning 215: expression has no effect
NewWeapons.sma(445) : error 001: expected token: ";", but found ")"
NewWeapons.sma(445) : error 029: invalid expression, assumed zero
NewWeapons.sma(445) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
Done.
Image
CONNECT CS.PLAY4CS.RO
User avatar
Laurentiu P.
Super moderator
Super moderator
Posts: 2091
Joined: 10 Jul 2013, 20:26
Detinator Steam: Da
CS Status: Activitate scazuta !
Detinator server CS: Da
SteamID: trust_ro
Reputatie: Moderator > Super moderator
Nume anterior: Do[N]e ;3
Fond eXtream: 1
Location: Constanta
Has thanked: 4 times
Been thanked: 3 times

09 Nov 2018, 15:29

kmking wrote:
Adryyy wrote:
| 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 )
		}
	}
}


Imi da eroare la compilare :

AMX Mod X Compiler 1.8.3-manual
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2013 AMX Mod X Team

Modified for http://www.Freakz.ro / amx.freakz.ro

include_183/ham_const.inc(1859) : warning 200: symbol "Ham_DOD_Weapon_PlayerIsWaterSni" is truncated to 31 characters
include_183/ham_const.inc(2628) : warning 200: symbol "Ham_ESF_Weapon_HolsterWhenMelee" is truncated to 31 characters
include_183/ham_const.inc(2697) : warning 200: symbol "Ham_NS_EffectivePlayerClassChan" is truncated to 31 characters
include_183/ham_const.inc(2802) : warning 200: symbol "Ham_NS_Weapon_GetWeaponPrimeTim" is truncated to 31 characters
include_183/ham_const.inc(2826) : warning 200: symbol "Ham_NS_Weapon_GetIsWeaponPrimin" is truncated to 31 characters
include_183/ham_const.inc(3271) : warning 200: symbol "Ham_SC_CheckAndApplyGenericAtta" is truncated to 31 characters
include_183/ham_const.inc(3320) : warning 200: symbol "Ham_SC_Player_MenuInputPerforme" is truncated to 31 characters
include_183/ham_const.inc(3416) : warning 200: symbol "Ham_SC_Player_TimeToStartNextVo" is truncated to 31 characters
include_183/ham_const.inc(3448) : warning 200: symbol "Ham_SC_Player_DisableCollisionW" is truncated to 31 characters
include_183/ham_const.inc(3456) : warning 200: symbol "Ham_SC_Player_EnableCollisionWi" is truncated to 31 characters
include_183/ham_const.inc(3530) : warning 200: symbol "Ham_SC_Weapon_PrecacheCustomMod" is truncated to 31 characters
include_183/ham_const.inc(3631) : warning 200: symbol "Ham_TFC_Weapon_GetNextAttackDel" is truncated to 31 characters
include_183/ham_const.inc(3699) : warning 200: symbol "Ham_OPF_MySquadTalkMonsterPoint" is truncated to 31 characters
NewWeapons.sma(445) : error 017: undefined symbol "NORMAL"
NewWeapons.sma(445) : warning 215: expression has no effect
NewWeapons.sma(445) : error 001: expected token: ";", but found ")"
NewWeapons.sma(445) : error 029: invalid expression, assumed zero
NewWeapons.sma(445) : fatal error 107: too many error messages on one line

Compilation aborted.
4 Errors.
Done.


Compileaza-l cu AMXX 1.8.2 si o sa funcționeze.
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, 16:11

Gata am reusit .

Dar problema e ca daca iti dispare daca scri /weapons si vrei sa iei arme clasice nu te mai lasa
Image
CONNECT CS.PLAY4CS.RO
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2149
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: 348 times
Contact:

09 Nov 2018, 17:26

kmking wrote:Gata am reusit .

Dar problema e ca daca iti dispare daca scri /weapons si vrei sa iei arme clasice nu te mai lasa
ă??????????????????????????????????????????????????????
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
Post Reply

Return to “Cereri”

  • Information