[Cerere Plugin] Vip Furien / Anti-Furien

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

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

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
User avatar
paraParaschiv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 12 Jun 2019, 17:06
Detinator Steam: Da
CS Status: ~MDFK~ [Wicked.]
Detinator server CS: RED.CSPOWER.RO
SteamID: STEAM_0:0:523732417
Fond eXtream: 0
Been thanked: 1 time
Contact:

19 Mar 2020, 17:24

Plugin Cerut: vip furien si anti furien
Descriere (adica ce face el mai exact):deci la anti-furien el cand testeaza in chat /vmenu sa apara un meniu cu 3 arme gold acestea:ak47 + Deagle,Awp + Deagle,M4A1 + Deagle si sa poata folosi doar odata pe runda,la Furien sa contina tot prin /vmenu:un SuperKnife (il pun eu modelu)100HP. pluginu vreau sa fie pe flagu-l "v" si armele de la ct sa aibe x2 dmg si la furien sk-ul x2 dmg.
Serverul impune conditii strict HLDS/REHLDS?:REHLDS
Ai cautat pluginul?(daca da, precizeaza cum):nu
Necesita mod special?:FURIEN
  • Respecta si vei fi respectat. :goblin: :clapping_hands:
Sigilat.ro
User avatar
paraParaschiv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 12 Jun 2019, 17:06
Detinator Steam: Da
CS Status: ~MDFK~ [Wicked.]
Detinator server CS: RED.CSPOWER.RO
SteamID: STEAM_0:0:523732417
Fond eXtream: 0
Been thanked: 1 time
Contact:

19 Mar 2020, 23:10

SUSSSS !!!
  • Respecta si vei fi respectat. :goblin: :clapping_hands:
User avatar
eMeKa.eXe
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 600
Joined: 12 Jan 2016, 03:59
Detinator Steam: Da
Reputatie: Utilizator neserios (tepar!)
Nume anterior: SkeletoN2016
Membru Club eXtreamCS (20 Feb - 20 Apr)
Fond eXtream: 0
Has thanked: 2 times
Been thanked: 10 times

20 Mar 2020, 20:08

paraParaschiv wrote:
19 Mar 2020, 23:10
SUSSSS !!!
Ceva asemănător
cereri-pluginuri/cerere-plugin-vip-furien-t255349.html
semnatură
PROJECTS CS
Zombie Outstanding addons configuration done
Premium website panel MySQL Project 10% testing (pre-alpha beta 1.0B)

**[COMMING SOON PROJECTS] ×
ZP 6.2 CSBD WEB Panel 3% soon no testing
ZP 6.3 BETA WEB Panel 1% soon no testing

**Info**
Odată pe lună voi reveni cu upadate și informații
Posibil să fie terminate până în 2021 nu promit!
Nu lucrez la ele non-stop dc nu îmi dați PM când sunt gata
User avatar
paraParaschiv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 12 Jun 2019, 17:06
Detinator Steam: Da
CS Status: ~MDFK~ [Wicked.]
Detinator server CS: RED.CSPOWER.RO
SteamID: STEAM_0:0:523732417
Fond eXtream: 0
Been thanked: 1 time
Contact:

20 Mar 2020, 20:14

nu,exact ce am cerut eu daca se poate,multumesc <3
  • Respecta si vei fi respectat. :goblin: :clapping_hands:
User avatar
eMeKa.eXe
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 600
Joined: 12 Jan 2016, 03:59
Detinator Steam: Da
Reputatie: Utilizator neserios (tepar!)
Nume anterior: SkeletoN2016
Membru Club eXtreamCS (20 Feb - 20 Apr)
Fond eXtream: 0
Has thanked: 2 times
Been thanked: 10 times

20 Mar 2020, 20:22

paraParaschiv wrote:
20 Mar 2020, 20:14
nu,exact ce am cerut eu daca se poate,multumesc <3
https://forums.alliedmods.net/showthread.php?t=283510
Poti modifica și tu și în loc de /weapons pui vmenu și pui acces sa aibe doar vip
semnatură
PROJECTS CS
Zombie Outstanding addons configuration done
Premium website panel MySQL Project 10% testing (pre-alpha beta 1.0B)

**[COMMING SOON PROJECTS] ×
ZP 6.2 CSBD WEB Panel 3% soon no testing
ZP 6.3 BETA WEB Panel 1% soon no testing

**Info**
Odată pe lună voi reveni cu upadate și informații
Posibil să fie terminate până în 2021 nu promit!
Nu lucrez la ele non-stop dc nu îmi dați PM când sunt gata
User avatar
paraParaschiv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 12 Jun 2019, 17:06
Detinator Steam: Da
CS Status: ~MDFK~ [Wicked.]
Detinator server CS: RED.CSPOWER.RO
SteamID: STEAM_0:0:523732417
Fond eXtream: 0
Been thanked: 1 time
Contact:

20 Mar 2020, 20:24

eMeKa.eXe wrote:
20 Mar 2020, 20:22
paraParaschiv wrote:
20 Mar 2020, 20:14
nu,exact ce am cerut eu daca se poate,multumesc <3
https://forums.alliedmods.net/showthread.php?t=283510
Poti modifica și tu și în loc de /weapons pui vmenu și pui acces sa aibe doar vip
mane nu e ceea ce am cerut eu,acolo sunt mai multe arme,eu vreau doar ak47 + Deagle,m4a1 + Deagle,Awp + Deagle.
  • Respecta si vei fi respectat. :goblin: :clapping_hands:
User avatar
paraParaschiv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 12 Jun 2019, 17:06
Detinator Steam: Da
CS Status: ~MDFK~ [Wicked.]
Detinator server CS: RED.CSPOWER.RO
SteamID: STEAM_0:0:523732417
Fond eXtream: 0
Been thanked: 1 time
Contact:

20 Mar 2020, 23:42

SUSSSS
  • Respecta si vei fi respectat. :goblin: :clapping_hands:
User avatar
paraParaschiv
Membru, skill 0
Membru, skill 0
Posts: 93
Joined: 12 Jun 2019, 17:06
Detinator Steam: Da
CS Status: ~MDFK~ [Wicked.]
Detinator server CS: RED.CSPOWER.RO
SteamID: STEAM_0:0:523732417
Fond eXtream: 0
Been thanked: 1 time
Contact:

21 Mar 2020, 18:16

suSSssS
  • Respecta si vei fi respectat. :goblin: :clapping_hands:
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 18
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

22 Mar 2020, 12:21

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "KillerElite aka BiNECUVANTAT"

new v_gun_model[][] = 
{ 	
	"models/goldenguns/v_goldenak.mdl",
	"models/goldenguns/v_goldenm4a1.mdl",
	"models/goldenguns/v_goldenawp.mdl",
	"models/goldenguns/v_superknife.mdl"

}

new eSuperKnife[33];
new eGoldenAk[33];
new eGoldenM4a1[33];
new eGoldenAwp[33];
new eVmenu[33];

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /vmenu", "cmdVmenu" );
	register_clcmd ( "say_team /vmenu", "cmdVmenu" );

	RegisterHam ( Ham_TakeDamage, "player", "ham_PlayerTakeDamage");
	RegisterHam ( Ham_Spawn, "player", "Settings", 1 );

	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public cmdVmenu ( id, menu, item ) 
{

    if( ( get_user_flags( id ) & ADMIN_LEVEL_H ) )
    {
    	if ( cs_get_user_team(id) == CS_TEAM_T)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveT" );
			menu_additem ( menu, "\ySuper Knife [\rx2 DMG\y]", "1", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}

    	if ( cs_get_user_team(id) == CS_TEAM_CT)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveCT" );
			menu_additem ( menu, "\yGolden AK-47 \r+ \yDeagle", "1", 0 );
			menu_additem ( menu, "\yGolden M4A1 \r+ \yDeagle", "2", 0 );
			menu_additem ( menu, "\yGolden AWP \r+ \yDeagle", "3", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}
	}

	else
	{
			client_cmd(id, "echo NU ai acces la aceasta comanda!" );
			return PLUGIN_HANDLED;
	}

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public cmdVipMenu_giveT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				eSuperKnife[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public cmdVipMenu_giveCT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_ak47")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AK47, 300) 
				eGoldenAk[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 2:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_m4a1")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_M4A1, 300) 
				eGoldenM4a1[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 3:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_awp")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AWP, 300) 
				eGoldenAwp[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public Settings(id)
{
	if ( cs_get_user_team(id) == CS_TEAM_T)
	{
		eVmenu[id] = 0;
		eSuperKnife[id] = 0;
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT)
	{
		eVmenu[id] = 0;
		eGoldenAk[id] = 0;
		eGoldenM4a1[id] = 0;
		eGoldenAwp[id] = 0;
	}

	return 1;
}

public ham_PlayerTakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if( get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T )
	{
		if ( eSuperKnife[iAttacker] == 1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}

	if( cs_get_user_team(iAttacker) == CS_TEAM_CT )
	{
		if ( eGoldenAk[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenM4a1[iAttacker] && get_user_weapon(iAttacker) == CSW_M4A1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenAwp[iAttacker] && get_user_weapon(iAttacker) == CSW_AWP )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}	

	return 1;
}

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon ( id );
	
	
	if ( szWeapon == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T ) 
	{
		if ( eSuperKnife[id] == 1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[3] );
		}
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT ) 
	{
		if ( eGoldenAk[id] == 1 && get_user_weapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
de compilat, merge. Testeaza-l si zi-mi daca e ok, ti-am pus flagul pe "T".
User avatar
FizZle
Membru, skill +3
Membru, skill +3
Posts: 1389
Joined: 17 Jan 2015, 19:33
Detinator Steam: Da
Fond eXtream: 0
Location: Iasi
Has thanked: 2 times
Been thanked: 2 times
Contact:

24 Mar 2020, 09:33

BiNECUVANTAT wrote:
22 Mar 2020, 12:21

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "KillerElite aka BiNECUVANTAT"

new v_gun_model[][] = 
{ 	
	"models/goldenguns/v_goldenak.mdl",
	"models/goldenguns/v_goldenm4a1.mdl",
	"models/goldenguns/v_goldenawp.mdl",
	"models/goldenguns/v_superknife.mdl"

}

new eSuperKnife[33];
new eGoldenAk[33];
new eGoldenM4a1[33];
new eGoldenAwp[33];
new eVmenu[33];

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /vmenu", "cmdVmenu" );
	register_clcmd ( "say_team /vmenu", "cmdVmenu" );

	RegisterHam ( Ham_TakeDamage, "player", "ham_PlayerTakeDamage");
	RegisterHam ( Ham_Spawn, "player", "Settings", 1 );

	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public cmdVmenu ( id, menu, item ) 
{

    if( ( get_user_flags( id ) & ADMIN_LEVEL_H ) )
    {
    	if ( cs_get_user_team(id) == CS_TEAM_T)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveT" );
			menu_additem ( menu, "\ySuper Knife [\rx2 DMG\y]", "1", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}

    	if ( cs_get_user_team(id) == CS_TEAM_CT)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveCT" );
			menu_additem ( menu, "\yGolden AK-47 \r+ \yDeagle", "1", 0 );
			menu_additem ( menu, "\yGolden M4A1 \r+ \yDeagle", "2", 0 );
			menu_additem ( menu, "\yGolden AWP \r+ \yDeagle", "3", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}
	}

	else
	{
			client_cmd(id, "echo NU ai acces la aceasta comanda!" );
			return PLUGIN_HANDLED;
	}

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public cmdVipMenu_giveT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				eSuperKnife[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public cmdVipMenu_giveCT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_ak47")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AK47, 300) 
				eGoldenAk[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 2:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_m4a1")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_M4A1, 300) 
				eGoldenM4a1[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 3:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_awp")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AWP, 300) 
				eGoldenAwp[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public Settings(id)
{
	if ( cs_get_user_team(id) == CS_TEAM_T)
	{
		eVmenu[id] = 0;
		eSuperKnife[id] = 0;
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT)
	{
		eVmenu[id] = 0;
		eGoldenAk[id] = 0;
		eGoldenM4a1[id] = 0;
		eGoldenAwp[id] = 0;
	}

	return 1;
}

public ham_PlayerTakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if( get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T )
	{
		if ( eSuperKnife[iAttacker] == 1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}

	if( cs_get_user_team(iAttacker) == CS_TEAM_CT )
	{
		if ( eGoldenAk[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenM4a1[iAttacker] && get_user_weapon(iAttacker) == CSW_M4A1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenAwp[iAttacker] && get_user_weapon(iAttacker) == CSW_AWP )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}	

	return 1;
}

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon ( id );
	
	
	if ( szWeapon == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T ) 
	{
		if ( eSuperKnife[id] == 1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[3] );
		}
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT ) 
	{
		if ( eGoldenAk[id] == 1 && get_user_weapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
de compilat, merge. Testeaza-l si zi-mi daca e ok, ti-am pus flagul pe "T".
dau la inceput de runda sa imi iau ceva din vmenu imi spune ca am ales deja din meniu
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 18
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

24 Mar 2020, 14:18

FizZle wrote:
24 Mar 2020, 09:33
BiNECUVANTAT wrote:
22 Mar 2020, 12:21

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "KillerElite aka BiNECUVANTAT"

new v_gun_model[][] = 
{ 	
	"models/goldenguns/v_goldenak.mdl",
	"models/goldenguns/v_goldenm4a1.mdl",
	"models/goldenguns/v_goldenawp.mdl",
	"models/goldenguns/v_superknife.mdl"

}

new eSuperKnife[33];
new eGoldenAk[33];
new eGoldenM4a1[33];
new eGoldenAwp[33];
new eVmenu[33];

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /vmenu", "cmdVmenu" );
	register_clcmd ( "say_team /vmenu", "cmdVmenu" );

	RegisterHam ( Ham_TakeDamage, "player", "ham_PlayerTakeDamage");
	RegisterHam ( Ham_Spawn, "player", "Settings", 1 );

	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public cmdVmenu ( id, menu, item ) 
{

    if( ( get_user_flags( id ) & ADMIN_LEVEL_H ) )
    {
    	if ( cs_get_user_team(id) == CS_TEAM_T)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveT" );
			menu_additem ( menu, "\ySuper Knife [\rx2 DMG\y]", "1", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}

    	if ( cs_get_user_team(id) == CS_TEAM_CT)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveCT" );
			menu_additem ( menu, "\yGolden AK-47 \r+ \yDeagle", "1", 0 );
			menu_additem ( menu, "\yGolden M4A1 \r+ \yDeagle", "2", 0 );
			menu_additem ( menu, "\yGolden AWP \r+ \yDeagle", "3", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}
	}

	else
	{
			client_cmd(id, "echo NU ai acces la aceasta comanda!" );
			return PLUGIN_HANDLED;
	}

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public cmdVipMenu_giveT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				eSuperKnife[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public cmdVipMenu_giveCT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_ak47")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AK47, 300) 
				eGoldenAk[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 2:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_m4a1")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_M4A1, 300) 
				eGoldenM4a1[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 3:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_awp")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AWP, 300) 
				eGoldenAwp[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public Settings(id)
{
	if ( cs_get_user_team(id) == CS_TEAM_T)
	{
		eVmenu[id] = 0;
		eSuperKnife[id] = 0;
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT)
	{
		eVmenu[id] = 0;
		eGoldenAk[id] = 0;
		eGoldenM4a1[id] = 0;
		eGoldenAwp[id] = 0;
	}

	return 1;
}

public ham_PlayerTakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if( get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T )
	{
		if ( eSuperKnife[iAttacker] == 1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}

	if( cs_get_user_team(iAttacker) == CS_TEAM_CT )
	{
		if ( eGoldenAk[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenM4a1[iAttacker] && get_user_weapon(iAttacker) == CSW_M4A1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenAwp[iAttacker] && get_user_weapon(iAttacker) == CSW_AWP )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}	

	return 1;
}

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon ( id );
	
	
	if ( szWeapon == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T ) 
	{
		if ( eSuperKnife[id] == 1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[3] );
		}
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT ) 
	{
		if ( eGoldenAk[id] == 1 && get_user_weapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
de compilat, merge. Testeaza-l si zi-mi daca e ok, ti-am pus flagul pe "T".
dau la inceput de runda sa imi iau ceva din vmenu imi spune ca am ales deja din meniu

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "KillerElite aka BiNECUVANTAT"

new v_gun_model[][] = 
{ 	
	"models/goldenguns/v_goldenak.mdl",
	"models/goldenguns/v_goldenm4a1.mdl",
	"models/goldenguns/v_goldenawp.mdl",
	"models/goldenguns/v_superknife.mdl"

}

new eSuperKnife[33];
new eGoldenAk[33];
new eGoldenM4a1[33];
new eGoldenAwp[33];
new eVmenu[33];

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /vmenu", "cmdVmenu" );
	register_clcmd ( "say_team /vmenu", "cmdVmenu" );

	RegisterHam ( Ham_TakeDamage, "player", "ham_PlayerTakeDamage");
	RegisterHam ( Ham_Spawn, "player", "Settings", 1 );

	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public Settings(id)
{
	if ( cs_get_user_team(id) == CS_TEAM_T)
	{
		eVmenu[id] = 0;
		eSuperKnife[id] = 0;
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT)
	{
		eVmenu[id] = 0;
		eGoldenAk[id] = 0;
		eGoldenM4a1[id] = 0;
		eGoldenAwp[id] = 0;
	}

	return 1;
}

public cmdVmenu ( id, menu, item ) 
{

    if( ( get_user_flags( id ) & ADMIN_LEVEL_H ) )
    {
    	if ( cs_get_user_team(id) == CS_TEAM_T)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveT" );
			menu_additem ( menu, "\ySuper Knife [\rx2 DMG\y]", "1", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}

    	if ( cs_get_user_team(id) == CS_TEAM_CT)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveCT" );
			menu_additem ( menu, "\yGolden AK-47 \r+ \yDeagle", "1", 0 );
			menu_additem ( menu, "\yGolden M4A1 \r+ \yDeagle", "2", 0 );
			menu_additem ( menu, "\yGolden AWP \r+ \yDeagle", "3", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}
	}

	else
	{
			client_cmd(id, "echo NU ai acces la aceasta comanda!" );
			return PLUGIN_HANDLED;
	}

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public cmdVipMenu_giveT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				eSuperKnife[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public cmdVipMenu_giveCT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_ak47")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AK47, 300) 
				eGoldenAk[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 2:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_m4a1")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_M4A1, 300) 
				eGoldenM4a1[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 3:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_awp")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AWP, 300) 
				eGoldenAwp[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}


public ham_PlayerTakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if( get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T )
	{
		if ( eSuperKnife[iAttacker] == 1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}

	if( cs_get_user_team(iAttacker) == CS_TEAM_CT )
	{
		if ( eGoldenAk[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenM4a1[iAttacker] && get_user_weapon(iAttacker) == CSW_M4A1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenAwp[iAttacker] && get_user_weapon(iAttacker) == CSW_AWP )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}	

	return 1;
}

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon ( id );
	
	
	if ( szWeapon == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T ) 
	{
		if ( eSuperKnife[id] == 1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[3] );
		}
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT ) 
	{
		if ( eGoldenAk[id] == 1 && get_user_weapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
Greseala mea. Pusesem fix invers :))..vezi acum
User avatar
FizZle
Membru, skill +3
Membru, skill +3
Posts: 1389
Joined: 17 Jan 2015, 19:33
Detinator Steam: Da
Fond eXtream: 0
Location: Iasi
Has thanked: 2 times
Been thanked: 2 times
Contact:

25 Mar 2020, 07:59

BiNECUVANTAT wrote:
24 Mar 2020, 14:18
FizZle wrote:
24 Mar 2020, 09:33
BiNECUVANTAT wrote:
22 Mar 2020, 12:21

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "KillerElite aka BiNECUVANTAT"

new v_gun_model[][] = 
{ 	
	"models/goldenguns/v_goldenak.mdl",
	"models/goldenguns/v_goldenm4a1.mdl",
	"models/goldenguns/v_goldenawp.mdl",
	"models/goldenguns/v_superknife.mdl"

}

new eSuperKnife[33];
new eGoldenAk[33];
new eGoldenM4a1[33];
new eGoldenAwp[33];
new eVmenu[33];

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /vmenu", "cmdVmenu" );
	register_clcmd ( "say_team /vmenu", "cmdVmenu" );

	RegisterHam ( Ham_TakeDamage, "player", "ham_PlayerTakeDamage");
	RegisterHam ( Ham_Spawn, "player", "Settings", 1 );

	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public cmdVmenu ( id, menu, item ) 
{

    if( ( get_user_flags( id ) & ADMIN_LEVEL_H ) )
    {
    	if ( cs_get_user_team(id) == CS_TEAM_T)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveT" );
			menu_additem ( menu, "\ySuper Knife [\rx2 DMG\y]", "1", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}

    	if ( cs_get_user_team(id) == CS_TEAM_CT)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveCT" );
			menu_additem ( menu, "\yGolden AK-47 \r+ \yDeagle", "1", 0 );
			menu_additem ( menu, "\yGolden M4A1 \r+ \yDeagle", "2", 0 );
			menu_additem ( menu, "\yGolden AWP \r+ \yDeagle", "3", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}
	}

	else
	{
			client_cmd(id, "echo NU ai acces la aceasta comanda!" );
			return PLUGIN_HANDLED;
	}

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public cmdVipMenu_giveT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				eSuperKnife[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public cmdVipMenu_giveCT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_ak47")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AK47, 300) 
				eGoldenAk[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 2:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_m4a1")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_M4A1, 300) 
				eGoldenM4a1[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 3:
		{
			if ( eVmenu[id] > 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_awp")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AWP, 300) 
				eGoldenAwp[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public Settings(id)
{
	if ( cs_get_user_team(id) == CS_TEAM_T)
	{
		eVmenu[id] = 0;
		eSuperKnife[id] = 0;
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT)
	{
		eVmenu[id] = 0;
		eGoldenAk[id] = 0;
		eGoldenM4a1[id] = 0;
		eGoldenAwp[id] = 0;
	}

	return 1;
}

public ham_PlayerTakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if( get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T )
	{
		if ( eSuperKnife[iAttacker] == 1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}

	if( cs_get_user_team(iAttacker) == CS_TEAM_CT )
	{
		if ( eGoldenAk[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenM4a1[iAttacker] && get_user_weapon(iAttacker) == CSW_M4A1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenAwp[iAttacker] && get_user_weapon(iAttacker) == CSW_AWP )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}	

	return 1;
}

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon ( id );
	
	
	if ( szWeapon == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T ) 
	{
		if ( eSuperKnife[id] == 1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[3] );
		}
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT ) 
	{
		if ( eGoldenAk[id] == 1 && get_user_weapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
de compilat, merge. Testeaza-l si zi-mi daca e ok, ti-am pus flagul pe "T".
dau la inceput de runda sa imi iau ceva din vmenu imi spune ca am ales deja din meniu

Code: Select all

#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#include < colorchat >
#include < fakemeta >
#include < fakemeta_util >
#include < hamsandwich >
#include < engine >

#define PLUGIN "VIP Menu"
#define VERSION "1.0"
#define AUTHOR "KillerElite aka BiNECUVANTAT"

new v_gun_model[][] = 
{ 	
	"models/goldenguns/v_goldenak.mdl",
	"models/goldenguns/v_goldenm4a1.mdl",
	"models/goldenguns/v_goldenawp.mdl",
	"models/goldenguns/v_superknife.mdl"

}

new eSuperKnife[33];
new eGoldenAk[33];
new eGoldenM4a1[33];
new eGoldenAwp[33];
new eVmenu[33];

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_clcmd ( "say /vmenu", "cmdVmenu" );
	register_clcmd ( "say_team /vmenu", "cmdVmenu" );

	RegisterHam ( Ham_TakeDamage, "player", "ham_PlayerTakeDamage");
	RegisterHam ( Ham_Spawn, "player", "Settings", 1 );

	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

}

public Settings(id)
{
	if ( cs_get_user_team(id) == CS_TEAM_T)
	{
		eVmenu[id] = 0;
		eSuperKnife[id] = 0;
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT)
	{
		eVmenu[id] = 0;
		eGoldenAk[id] = 0;
		eGoldenM4a1[id] = 0;
		eGoldenAwp[id] = 0;
	}

	return 1;
}

public cmdVmenu ( id, menu, item ) 
{

    if( ( get_user_flags( id ) & ADMIN_LEVEL_H ) )
    {
    	if ( cs_get_user_team(id) == CS_TEAM_T)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveT" );
			menu_additem ( menu, "\ySuper Knife [\rx2 DMG\y]", "1", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}

    	if ( cs_get_user_team(id) == CS_TEAM_CT)
    	{
			new menu = menu_create ( "VIP Menu:", "cmdVipMenu_giveCT" );
			menu_additem ( menu, "\yGolden AK-47 \r+ \yDeagle", "1", 0 );
			menu_additem ( menu, "\yGolden M4A1 \r+ \yDeagle", "2", 0 );
			menu_additem ( menu, "\yGolden AWP \r+ \yDeagle", "3", 0 );
    
			menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
			menu_display ( id, menu, 0 );
	
			return 1;
		}
	}

	else
	{
			client_cmd(id, "echo NU ai acces la aceasta comanda!" );
			return PLUGIN_HANDLED;
	}

    menu_destroy( menu );
    return PLUGIN_HANDLED;
}

public cmdVipMenu_giveT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				eSuperKnife[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}

public cmdVipMenu_giveCT ( id, menu, item ) 
{
	
	if( item == MENU_EXIT )
	{
		return 1;
	}
    
	new data [ 6 ], szName [ 64 ];
	new access, callback; 
	menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
	new key = str_to_num ( data );
    
	switch ( key )
	{
		case 1:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_ak47")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AK47, 300) 
				eGoldenAk[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 2:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_m4a1")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_M4A1, 300) 
				eGoldenM4a1[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
		case 3:
		{
			if ( eVmenu[id] == 0)
			{
				strip_user_weapons(id)
				give_item(id, "weapon_knife")
				give_item(id, "weapon_awp")
				give_item(id, "weapon_deagle")
				cs_set_user_bpammo(id, CSW_DEAGLE, 300) 
				cs_set_user_bpammo(id, CSW_AWP, 300) 
				eGoldenAwp[id] = 1;
				eVmenu[id]++;
				menu_destroy ( menu );
				return 1;
			}
			else
			{
				client_print(id, print_chat, "Ai ales deja din acest meniu.")
			}
		}
	}

	return 1;
}


public ham_PlayerTakeDamage( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if( get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T )
	{
		if ( eSuperKnife[iAttacker] == 1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}

	if( cs_get_user_team(iAttacker) == CS_TEAM_CT )
	{
		if ( eGoldenAk[iAttacker] && get_user_weapon(iAttacker) == CSW_AK47 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenM4a1[iAttacker] && get_user_weapon(iAttacker) == CSW_M4A1 )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
		if ( eGoldenAwp[iAttacker] && get_user_weapon(iAttacker) == CSW_AWP )
		{
			SetHamParamFloat( 4, fDamage * 2.0 ); 	
			return HAM_HANDLED;
		}
	}	

	return 1;
}

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon ( id );
	
	
	if ( szWeapon == CSW_KNIFE && cs_get_user_team(id) == CS_TEAM_T ) 
	{
		if ( eSuperKnife[id] == 1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[3] );
		}
	}

	if ( cs_get_user_team(id) == CS_TEAM_CT ) 
	{
		if ( eGoldenAk[id] == 1 && get_user_weapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && get_user_weapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
Greseala mea. Pusesem fix invers :))..vezi acum
Cand selectez ceva din meniu se blocheaza adica nu ma mai pot misca deloc si tre sa ma reconectez pe sv
PS :

Code: Select all

L 03/25/2020 - 07:58:23: [AMXX] Run time error 10 (plugin "vipfurien.amxx") (native "cs_get_user_team") - debug not enabled!
L 03/25/2020 - 07:58:23: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
Am gasit astain log am facut cum a zis insa tot aceeasi eroare imi da
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests