[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 .
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

25 Mar 2020, 11:23

Pune modelele si scrie debug dupa pluginul din plugins.ini. Vezi ce eroare iti da.
eXtreamSHOP
User avatar
FizZle
Membru, skill +3
Membru, skill +3
Posts: 1388
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, 11:27

BiNECUVANTAT wrote:
25 Mar 2020, 11:23
Pune modelele si scrie debug dupa pluginul din plugins.ini. Vezi ce eroare iti da.
Fix asta am facut inainte sa postez aici
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

25 Mar 2020, 18:01

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 && szWeapon(id) == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && szWeapon(id)  == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && szWeapon(id) == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}		
vezi acum.
User avatar
FizZle
Membru, skill +3
Membru, skill +3
Posts: 1388
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, 19:51

Code: Select all

Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : error 012: invalid function call, not a valid address
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : warning 215: expression has no effect
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : error 001: expected token: ";", but found ")"
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : error 029: invalid expression, assumed zero
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : fatal error 107: too many error messages on one line
BiNECUVANTAT
Membru, skill 0
Membru, skill 0
Posts: 19
Joined: 04 Nov 2018, 16:40
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

25 Mar 2020, 20:30

FizZle wrote:
25 Mar 2020, 19:51

Code: Select all

Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : error 012: invalid function call, not a valid address
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : warning 215: expression has no effect
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : error 001: expected token: ";", but found ")"
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : error 029: invalid expression, assumed zero
Desktop\amxmodx-amxmodx-1.8.2\plugins\vipfur.sma(267) : fatal error 107: too many error messages on one line

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 && szWeapon == CSW_AK47 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[0] );
		}
		if ( eGoldenM4a1[id] == 1 && szWeapon  == CSW_M4A1 )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[1] );
		}
		if ( eGoldenM4a1[id] == 1 && szWeapon == CSW_AWP )
		{
			set_pev (id, pev_viewmodel2, v_gun_model[2] );
		}
	}
}
User avatar
FizZle
Membru, skill +3
Membru, skill +3
Posts: 1388
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, 22:47

pica server-ul cand aleg ceva din meniu
Post Reply

Return to “Cereri”

  • Information