Problema Compilare Plugin Shop

Discutii despre problemele aparute in jocul Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
sammi1
Membru, skill 0
Membru, skill 0
Posts: 49
Joined: 30 Jan 2021, 22:38
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Zm.CsPower.Ro
Fond eXtream: 0
Has thanked: 23 times

14 Feb 2021, 14:26

Salutare din nou, am o mica problema la compilarea unu plugin si nu-i dau de cap, am adaugt in un "item" in shop si nu mai vrea sa mi-l compileze, nu-mi dau seama unde am gresit, daca puteti sa vedeti unde am gresit si sa repar, mersi anticipat.
Eroare compilare:

Code: Select all

//AMXXPC compile.exe
// by the AMX Mod X Dev Team


//// bio_shop_menu.sma
// C:\Users\forgh\Desktop\Server Biohazard\cstrike\addons\amxmodx\scripting\bio_shop_menu.sma(241) : error 014: invalid statement; not in switch
// C:\Users\forgh\Desktop\Server Biohazard\cstrike\addons\amxmodx\scripting\bio_shop_menu.sma(241) : warning 215: expression has no effect
// C:\Users\forgh\Desktop\Server Biohazard\cstrike\addons\amxmodx\scripting\bio_shop_menu.sma(241) : error 001: expected token: ";", but found ":"
// C:\Users\forgh\Desktop\Server Biohazard\cstrike\addons\amxmodx\scripting\bio_shop_menu.sma(241) : error 029: invalid expression, assumed zero
// C:\Users\forgh\Desktop\Server Biohazard\cstrike\addons\amxmodx\scripting\bio_shop_menu.sma(241) : fatal error 107: too many error messages on one line
//
// Compilation aborted.
// 4 Errors.
// Could not locate output file C:\Users\forgh\Desktop\Server Biohazard\cstrike\addons\amxmodx\scripting\compiled\bio_shop_menu.amx (compile failed).
//
// Compilation Time: 0,31 sec
// ----------------------------------------

Press enter to exit ...
SMA:

Code: Select all

#include <amxmodx>
#include <fun>
#include <engine>
#include <cstrike>
#include <fakemeta>
#include <biohazard>
#include <hamsandwich> 
#include <fakemeta_util>

native set_user_infection_nade(id);


#define XO_WEAPON    4
#define m_pPlayer    41
#define XO_PLAYER        5
#define m_bResumeZoom    110
#define get_money(%1)	(cs_get_user_money(%1))
#define is_zombie(%1)	(is_user_zombie(%1))
#define is_human(%1)	(!is_user_zombie(%1))
#define get_health(%1)	(get_user_health(%1))
#define set_health(%1,%2)	(set_user_health(%1,%2))
#define get_armor(%1)	(get_user_armor(%1))
#define set_armor(%1,%2)	(set_user_armor(%1,%2))
#define set_money(%1,%2)	(cs_set_user_money(%1,%2))


new HavePara[33];

public plugin_init( ) {

				     // dd mm yyyy
	register_plugin( "[BIO] Shop", "12.28.2015", "alkaline" );

	if( is_biomod_active() ) {

		RegisterHam( Ham_Killed, "player", "fw_Killed" );

		register_clcmd( "say shop", "ShopMenu" );
		register_clcmd( "say /shop", "ShopMenu" );

	} else { set_fail_state( "[MOD] Biohazard Need to be enable !" ); }

}

public client_putinserver( id ) {
	HavePara[id] = 0;
}



public event_infect( id, attacker ) {
	if( !is_user_alive( id ) ) return;
	strip_user_weapons( id ); set_pdata_int( id, 116, 0 ); 
	give_item( id, "weapon_knife" );
	/* Fix ZOOm SCope On zm Infect by Alkaline 2016*/ 
	set_task( 0.5, "FixZMZoom", id ); cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 1 );
} 

public ShopMenu( id ) {

	new menu = menu_create ( "\y--== | \rBiohazard Shop \y| ==--^n  \y--==|\rZm.CsPower.Ro\y|==--", "ShopMenuHandler" );
                                  
	if( is_user_alive( id ) ) {
	if( !HavePara[id] ) {
		if( get_money( id ) >= 100 )
			menu_additem( menu, "\yParachute \w[ \r100 $ \w]", "1", 0 );
		else	menu_additem( menu, "\yParachute \w[ \d100 $ \w]", "1", 0 );
	} else menu_additem( menu, "\dParachute [ \rReady \d]", "1", 0 );

	if( is_user_alive( id ) ) {
	if( get_health( id ) < 400 ) {
		if( get_money( id ) >= 2000 ) 
			menu_additem( menu, "\yHP 50 \w[ \r2000 $ \w]", "2", 0 );
		else	menu_additem( menu, "\dHP 50 \w[ \r2000 $ \w]", "2", 0 );
	} else menu_additem( menu, "\dHP 50 [ \rMax. \d]", "2", 0 );
	if( get_armor( id ) < 200 ) {
		if( get_money( id ) >= 2000 )
			menu_additem( menu, "\yArmor 50 \w[ \r2000 $ \w]", "3", 0 );
		else	menu_additem( menu, "\dArmor 50 \w[ \r2000 $ \w]", "3", 0 );
	} else menu_additem( menu, "\dArmor 50 [ \rMax. \d]", "3", 0 );
	} else {
		menu_additem( menu, "\dHP 50 [ \d2000 $ ] \y->\r Not available", "2", 0 );
		menu_additem( menu, "\dArmor 50 [ \d2000 $ ] \y->\r Not available", "3", 0 );
	} 
	if( is_zombie( id ) ) {
		if( LastZM() == 1 ) { menu_additem( menu, "\dAntidote  [ \d10000 $ ] \y->\r Last Zombie, Not available", "4", 0 ); }
		else {
			if( get_money( id ) >= 10000 )
				menu_additem( menu, "\yAntidote  \w[ \r10000 $ \w]", "4", 0 );
			else 	menu_additem( menu, "\dAntidote  \w[ \r10000 $ \w]", "4", 0 );
		}
	} else menu_additem( menu, "\dAntidote  [ \d10000 $ ] \y->\r Not available", "4", 0 );

	if( is_human( id ) ) {
		if( !user_has_weapon( id, CSW_HEGRENADE ) && !user_has_weapon( id, CSW_FLASHBANG ) && !user_has_weapon( id, CSW_SMOKEGRENADE ) ) {
			if( get_money( id ) >= 4000 )
				menu_additem( menu, "\yHe/Flash/Smoke \w[ \r4000 $ \w]", "5", 0 );
			else	menu_additem( menu, "\dHe/Flash/Smoke \w[ \r4000 $ \w]", "5", 0 );
		} else menu_additem( menu, "\dHe/Flash/Smoke [ \rAll Ready \d]", "5", 0 );
	} else menu_additem( menu, "\dHe/Flash/Smoke [ \d4000 $ ] \y->\r Not available", "5", 0 );
	} else if( !is_user_alive( id ) ) {
		menu_additem( menu, "\dParachute [ 100 $ ] \y->\r Only Alive", "1", 0 );
		menu_additem( menu, "\dHP 50 [ 2000 $ ] \y->\r Only Alive", "2", 0 );
		menu_additem( menu, "\dArmor 50 [ 2000 $ ] \y->\r Only Alive", "3", 0 );
		menu_additem( menu, "\dAntidote [ 10000 $ ] \y->\r Only Alive", "4", 0 );
		menu_additem( menu, "\dHe/Flash/Smoke [ 4000 $ ] \y->\r Only Alive", "5", 0 );
		menu_additem( menu, "\dLife \r(\dRespawn\r) \w[ \d10000 $ \w] \y->\r Only Me", "6", 0 );
		menu_additem( menu, "\dInfection Nade [ 10000 $ ] \y->\r Only Alive", "7", 0 );
		menu_additem( menu, "\dSnark Infector [ 12000 $ ] \y->\r Only Alive", "8", 0 );
	}
	if( !is_user_alive( id ) ) {
		if( get_money( id ) >= 10000 )
			menu_additem( menu, "\yLife \r(\yRespawn\r) \w[ \r10000 $ \w] \y-> \y *\rBuy Now\y*", "6", 0 );
	} else menu_additem( menu, "\dLife \r(\dRespawn\r) \w[ \rYou need to be dead \y:) \w]", "6", 0 );
	
	if( is_zombie( id ) ) {
			if( get_money( id ) >= 10000 )
				menu_additem( menu, "\yInfection Nade  \w[ \r10000 $ \w] \y-> \rLast human alive, no have effect", "7", 0 );
			else 	menu_additem( menu, "\dInfection Nade  \w[ \r10000 $ \w] \y-> \rLast human alive, no have effect", "7", 0 );
		}
	
	if( is_zombie( id ) ) {
			if( get_money( id ) >= 12000 )
				menu_additem( menu, "\ySnark Infector  \w[ \r12000 $ \w] \y-> \rLive 15 Seconds", "8", 0 );
			else 	menu_additem( menu, "\dSnark Infector  \w[ \r12000 $ \w] \y-> \rLive 15 Seconds", "8", 0 );
		}
	
	menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
	menu_display( id, menu, 0 );
	return 1;
}

public ShopMenuHandler( 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 );
	new money; 

	switch( key ){

		case 1: {
			if( is_user_alive( id ) ) {
			if( !HavePara[id] ) {
				money = get_money( id ) - 100;
				if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 100 $ !1!" ); return 1; } else
				HavePara[id] = 1;
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat !3Parasuta !1!" );
				ShopMenu( id );
			} else Color( id, "!4[Biohazard Shop] !1Ai deja !3Parasuta !1!" );
			} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi !3Parasuta !1!" );
		}
		case 2: {
		if( is_user_alive( id )) {
			money = get_money( id ) - 2000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 2000 $ !1!" ); return 1; } else
			if( get_health( id ) < 400 ) {
				set_health( id, min( (get_health( id ) + 50), 400) );
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 50 HP !1!" );
				ShopMenu( id );
			} else Color( id, "!4[Biohazard Shop]!1 Ai HP Maxim !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 50 HP !1!" );
		} case 3: {
		if( is_user_alive( id ) ) {
		if( is_human( id ) ) {
			money = get_money( id ) - 2000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 2000 $ !1!" ); return 1; } else
			if( get_armor( id ) < 200 ) {
				set_armor( id, min( (get_armor( id ) + 50), 200) );
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 50 Armura !1!" );
				ShopMenu( id );
			} else Color( id, "!4[Biohazard Shop]!1 Ai Armura Maxim !" );
		} else Color( id, "!4[Biohazard Shop]!1 Doar !3Human !1pot cumpara !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 50 Armura !1!" );
		} case 4: {
		if( is_user_alive( id ) ) {
		if( is_zombie( id ) ) {
			money = get_money( id ) - 10000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 10000 $ !1!" ); return 1; } else
			if( is_zombie( id ) ) {
				if( LastZM() == 1 ) Color( id, "!4[Biohazard Shop]!1 Nu poti cumpara! Deoarece esti singurul !3Zombie !1!" );
				else {
					cure_user( id );
					set_user_health( id, 100 );
					cs_set_user_team( id, CS_TEAM_CT );
					cs_reset_user_model( id );
					Remove_User_Nvgs(id);
					if( is_user_alive( id )) {
					fm_give_item( id, "weapon_knife" ); fm_give_item( id, "weapon_m4a1" ); cs_set_user_bpammo( id, CSW_M4A1, 90 );
					fm_give_item( id, "weapon_deagle" ); cs_set_user_bpammo( id, CSW_DEAGLE, 100 );
					fm_give_item( id, "weapon_hegrenade" ); fm_give_item( id, "weapon_flashbang" ); fm_give_item( id, "weapon_smokegrenade" ); }
					set_money( id, money );
					Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Antidote !1!" );
					ShopMenu( id );
				}
			}
		} else Color( id, "!4[Biohazard Shop]!1 Doar !3Zombie !1pot cumpara !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 Antidote !1!" );
		} case 5: {
		if( is_user_alive( id )) {
		if( is_human( id ) ) {
			if( !user_has_weapon( id, CSW_HEGRENADE ) && !user_has_weapon( id, CSW_FLASHBANG ) && !user_has_weapon( id, CSW_SMOKEGRENADE ) ) {
				money = get_money( id ) - 4000;
				if( money < 0 ) {  Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 4000 $ !1!" ); return 1; } else
				give_item( id, "weapon_hegrenade" ); give_item( id, "weapon_flashbang" ); give_item( id, "weapon_smokegrenade" );
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 HE/Flash/Smoke !1!" ); ShopMenu( id );
			} else 	Color( id, "!4[Biohazard Shop] !1Ai deja un set!1 de :!3 HE/Flash/Smoke !1!" );
		} else Color( id, "!4[Biohazard Shop]!1 Doar !3Human !1pot cumpara !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 HE/Flash/Smoke !1!" );
		} case 6: {
			if( !is_user_alive( id ) ) {
				money = get_money( id ) - 10000;
				if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 10000 $ !1!" ); return 1; } else
				cs_set_user_team( id, CS_TEAM_CT );
				ExecuteHamB(Ham_CS_RoundRespawn, id);
				cure_user(id);
				set_task( 0.6, "SpawnArm", id );
				Remove_User_Nvgs(id);
				set_user_health(id, 100);
				cs_reset_user_model(id);	
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Respawn !1!" );
				//ShopMenu( id );
			} else { Color( id, "!4[Biohazard Shop] !1Trebuie sa fi !3Mort !1sa poti cumpara!3 Respawn !1!" ); }
		} case 7: {
		if( is_user_alive( id ) ) {
		if( is_zombie( id ) ) {
			money = get_money( id ) - 10000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 10000 $ !1!" ); return 1; } else
			if( is_zombie( id ) )
			set_user_infection_nade(id);
			set_money( id, money );
			Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Grenade Infection !1!" );
			}
		} case 8: {
		if( is_user_alive( id ) ) {
		if( is_zombie( id ) ) {
			money = get_money( id ) - 12000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 12000 $ !1!" ); return 1; } else
			if( is_zombie( id ) )
			evo_callfunc(id,"CSqueak_GiveWeapon","bio_extra_squeakgrenade.amxx");
			set_money( id, money );
			Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Snark Infector !1!" );
			}
		}
	}
}


	return 1;
}

public client_PreThink( id ) {
	if( HavePara[id] ) {
		static Button; Button = get_user_button( id );
		static Float: Velocity[ 3 ]; entity_get_vector( id, EV_VEC_velocity, Velocity );
		if( Button & IN_USE && Velocity[ 2 ] < 00 ) { Velocity[ 2 ] = -100.0; entity_set_vector( id, EV_VEC_velocity, Velocity ); }
	}	
}

#define OFFSET_NVGOGGLES 129
#define HAS_NVGS (1<<0)
#define USES_NVGS (1<<8)
stock Remove_User_Nvgs(id) {
	new iNvgs = get_pdata_int(id, OFFSET_NVGOGGLES, 5);
	if (!iNvgs) { return; }
	if (iNvgs & USES_NVGS) {
		static gmsgNVGToggle;
		gmsgNVGToggle = get_user_msgid("NVGToggle");
		emessage_begin(MSG_ONE, gmsgNVGToggle, _, id);
		ewrite_byte(0);
		emessage_end();
	}
	set_pdata_int(id, OFFSET_NVGOGGLES, 0, 5);
}
public FixZMZoom( id ) cs_set_user_zoom( id, CS_RESET_ZOOM, 1 );

stock Color( const id, const input[ ], any:... ) {
	new count = 1, players[ 32 ];
	static msg[ 191 ]; vformat( msg, 190, input, 3 );
	replace_all( msg, 190, "!4", "^4" );
	replace_all( msg, 190, "!1", "^1" );
	replace_all( msg, 190, "!3", "^3" );
	replace_all( msg, 190, "!0", "^0" );
	if( id ) players[ 0 ] = id; else get_players( players, count, "ch" ); {
		for( new i = 0; i < count; i++ ) {
			if( is_user_connected( players[ i ] ) ) {
				message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
				write_byte( players[ i ] );
				write_string( msg );
				message_end( );
			}
		}
	}
}

stock evo_callfunc( id, function[], plugin[] ){
	if( callfunc_begin( function, plugin ) == 1 ){
		callfunc_push_int( id );
		callfunc_end( );
	}
PS: ce am adaugat in shop e Snark Infector
RoyalServer 2
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3850
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: 76561198063679589
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 595 times
Contact:

14 Feb 2021, 22:07

Code: Select all

#include <amxmodx>
#include <fun>
#include <engine>
#include <cstrike>
#include <fakemeta>
#include <biohazard>
#include <hamsandwich> 
#include <fakemeta_util>

native set_user_infection_nade(id);


#define XO_WEAPON    4
#define m_pPlayer    41
#define XO_PLAYER        5
#define m_bResumeZoom    110
#define get_money(%1)	(cs_get_user_money(%1))
#define is_zombie(%1)	(is_user_zombie(%1))
#define is_human(%1)	(!is_user_zombie(%1))
#define get_health(%1)	(get_user_health(%1))
#define set_health(%1,%2)	(set_user_health(%1,%2))
#define get_armor(%1)	(get_user_armor(%1))
#define set_armor(%1,%2)	(set_user_armor(%1,%2))
#define set_money(%1,%2)	(cs_set_user_money(%1,%2))


new HavePara[33];

public plugin_init( ) {

				     // dd mm yyyy
	register_plugin( "[BIO] Shop", "12.28.2015", "alkaline" );

	if( is_biomod_active() ) {

		RegisterHam( Ham_Killed, "player", "fw_Killed" );

		register_clcmd( "say shop", "ShopMenu" );
		register_clcmd( "say /shop", "ShopMenu" );

	} else { set_fail_state( "[MOD] Biohazard Need to be enable !" ); }

}

public client_putinserver( id ) {
	HavePara[id] = 0;
}



public event_infect( id, attacker ) {
	if( !is_user_alive( id ) ) return;
	strip_user_weapons( id ); set_pdata_int( id, 116, 0 ); 
	give_item( id, "weapon_knife" );
	/* Fix ZOOm SCope On zm Infect by Alkaline 2016*/ 
	set_task( 0.5, "FixZMZoom", id ); cs_set_user_zoom( id, CS_SET_AUGSG552_ZOOM, 1 );
} 

public ShopMenu( id ) {

	new menu = menu_create ( "\y--== | \rBiohazard Shop \y| ==--^n  \y--==|\rZm.CsPower.Ro\y|==--", "ShopMenuHandler" );
                                  
	if( is_user_alive( id ) ) {
	if( !HavePara[id] ) {
		if( get_money( id ) >= 100 )
			menu_additem( menu, "\yParachute \w[ \r100 $ \w]", "1", 0 );
		else	menu_additem( menu, "\yParachute \w[ \d100 $ \w]", "1", 0 );
	} else menu_additem( menu, "\dParachute [ \rReady \d]", "1", 0 );

	if( is_user_alive( id ) ) {
	if( get_health( id ) < 400 ) {
		if( get_money( id ) >= 2000 ) 
			menu_additem( menu, "\yHP 50 \w[ \r2000 $ \w]", "2", 0 );
		else	menu_additem( menu, "\dHP 50 \w[ \r2000 $ \w]", "2", 0 );
	} else menu_additem( menu, "\dHP 50 [ \rMax. \d]", "2", 0 );
	if( get_armor( id ) < 200 ) {
		if( get_money( id ) >= 2000 )
			menu_additem( menu, "\yArmor 50 \w[ \r2000 $ \w]", "3", 0 );
		else	menu_additem( menu, "\dArmor 50 \w[ \r2000 $ \w]", "3", 0 );
	} else menu_additem( menu, "\dArmor 50 [ \rMax. \d]", "3", 0 );
	} else {
		menu_additem( menu, "\dHP 50 [ \d2000 $ ] \y->\r Not available", "2", 0 );
		menu_additem( menu, "\dArmor 50 [ \d2000 $ ] \y->\r Not available", "3", 0 );
	} 
	if( is_zombie( id ) ) {
		if( LastZM() == 1 ) { menu_additem( menu, "\dAntidote  [ \d10000 $ ] \y->\r Last Zombie, Not available", "4", 0 ); }
		else {
			if( get_money( id ) >= 10000 )
				menu_additem( menu, "\yAntidote  \w[ \r10000 $ \w]", "4", 0 );
			else 	menu_additem( menu, "\dAntidote  \w[ \r10000 $ \w]", "4", 0 );
		}
	} else menu_additem( menu, "\dAntidote  [ \d10000 $ ] \y->\r Not available", "4", 0 );

	if( is_human( id ) ) {
		if( !user_has_weapon( id, CSW_HEGRENADE ) && !user_has_weapon( id, CSW_FLASHBANG ) && !user_has_weapon( id, CSW_SMOKEGRENADE ) ) {
			if( get_money( id ) >= 4000 )
				menu_additem( menu, "\yHe/Flash/Smoke \w[ \r4000 $ \w]", "5", 0 );
			else	menu_additem( menu, "\dHe/Flash/Smoke \w[ \r4000 $ \w]", "5", 0 );
		} else menu_additem( menu, "\dHe/Flash/Smoke [ \rAll Ready \d]", "5", 0 );
	} else menu_additem( menu, "\dHe/Flash/Smoke [ \d4000 $ ] \y->\r Not available", "5", 0 );
	} else if( !is_user_alive( id ) ) {
		menu_additem( menu, "\dParachute [ 100 $ ] \y->\r Only Alive", "1", 0 );
		menu_additem( menu, "\dHP 50 [ 2000 $ ] \y->\r Only Alive", "2", 0 );
		menu_additem( menu, "\dArmor 50 [ 2000 $ ] \y->\r Only Alive", "3", 0 );
		menu_additem( menu, "\dAntidote [ 10000 $ ] \y->\r Only Alive", "4", 0 );
		menu_additem( menu, "\dHe/Flash/Smoke [ 4000 $ ] \y->\r Only Alive", "5", 0 );
		menu_additem( menu, "\dLife \r(\dRespawn\r) \w[ \d10000 $ \w] \y->\r Only Me", "6", 0 );
		menu_additem( menu, "\dInfection Nade [ 10000 $ ] \y->\r Only Alive", "7", 0 );
		menu_additem( menu, "\dSnark Infector [ 12000 $ ] \y->\r Only Alive", "8", 0 );
	}
	if( !is_user_alive( id ) ) {
		if( get_money( id ) >= 10000 )
			menu_additem( menu, "\yLife \r(\yRespawn\r) \w[ \r10000 $ \w] \y-> \y *\rBuy Now\y*", "6", 0 );
	} else menu_additem( menu, "\dLife \r(\dRespawn\r) \w[ \rYou need to be dead \y:) \w]", "6", 0 );
	
	if( is_zombie( id ) ) {
			if( get_money( id ) >= 10000 )
				menu_additem( menu, "\yInfection Nade  \w[ \r10000 $ \w] \y-> \rLast human alive, no have effect", "7", 0 );
			else 	menu_additem( menu, "\dInfection Nade  \w[ \r10000 $ \w] \y-> \rLast human alive, no have effect", "7", 0 );
		}
	
	if( is_zombie( id ) ) {
			if( get_money( id ) >= 12000 )
				menu_additem( menu, "\ySnark Infector  \w[ \r12000 $ \w] \y-> \rLive 15 Seconds", "8", 0 );
			else 	menu_additem( menu, "\dSnark Infector  \w[ \r12000 $ \w] \y-> \rLive 15 Seconds", "8", 0 );
		}
	
	menu_setprop( menu, MPROP_EXIT, MEXIT_ALL );
	menu_display( id, menu, 0 );
	return 1;
}

public ShopMenuHandler( 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 );
	new money; 

	switch( key ){

		case 1: {
			if( is_user_alive( id ) ) {
			if( !HavePara[id] ) {
				money = get_money( id ) - 100;
				if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 100 $ !1!" ); return 1; } else
				HavePara[id] = 1;
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat !3Parasuta !1!" );
				ShopMenu( id );
			} else Color( id, "!4[Biohazard Shop] !1Ai deja !3Parasuta !1!" );
			} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi !3Parasuta !1!" );
		}
		case 2: {
		if( is_user_alive( id )) {
			money = get_money( id ) - 2000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 2000 $ !1!" ); return 1; } else
			if( get_health( id ) < 400 ) {
				set_health( id, min( (get_health( id ) + 50), 400) );
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 50 HP !1!" );
				ShopMenu( id );
			} else Color( id, "!4[Biohazard Shop]!1 Ai HP Maxim !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 50 HP !1!" );
		} case 3: {
		if( is_user_alive( id ) ) {
		if( is_human( id ) ) {
			money = get_money( id ) - 2000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 2000 $ !1!" ); return 1; } else
			if( get_armor( id ) < 200 ) {
				set_armor( id, min( (get_armor( id ) + 50), 200) );
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 50 Armura !1!" );
				ShopMenu( id );
			} else Color( id, "!4[Biohazard Shop]!1 Ai Armura Maxim !" );
		} else Color( id, "!4[Biohazard Shop]!1 Doar !3Human !1pot cumpara !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 50 Armura !1!" );
		} case 4: {
		if( is_user_alive( id ) ) {
		if( is_zombie( id ) ) {
			money = get_money( id ) - 10000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 10000 $ !1!" ); return 1; } else
			if( is_zombie( id ) ) {
				if( LastZM() == 1 ) Color( id, "!4[Biohazard Shop]!1 Nu poti cumpara! Deoarece esti singurul !3Zombie !1!" );
				else {
					cure_user( id );
					set_user_health( id, 100 );
					cs_set_user_team( id, CS_TEAM_CT );
					cs_reset_user_model( id );
					Remove_User_Nvgs(id);
					if( is_user_alive( id )) {
					fm_give_item( id, "weapon_knife" ); fm_give_item( id, "weapon_m4a1" ); cs_set_user_bpammo( id, CSW_M4A1, 90 );
					fm_give_item( id, "weapon_deagle" ); cs_set_user_bpammo( id, CSW_DEAGLE, 100 );
					fm_give_item( id, "weapon_hegrenade" ); fm_give_item( id, "weapon_flashbang" ); fm_give_item( id, "weapon_smokegrenade" ); }
					set_money( id, money );
					Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Antidote !1!" );
					ShopMenu( id );
				}
			}
		} else Color( id, "!4[Biohazard Shop]!1 Doar !3Zombie !1pot cumpara !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 Antidote !1!" );
		} case 5: {
		if( is_user_alive( id )) {
		if( is_human( id ) ) {
			if( !user_has_weapon( id, CSW_HEGRENADE ) && !user_has_weapon( id, CSW_FLASHBANG ) && !user_has_weapon( id, CSW_SMOKEGRENADE ) ) {
				money = get_money( id ) - 4000;
				if( money < 0 ) {  Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 4000 $ !1!" ); return 1; } else
				give_item( id, "weapon_hegrenade" ); give_item( id, "weapon_flashbang" ); give_item( id, "weapon_smokegrenade" );
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 HE/Flash/Smoke !1!" ); ShopMenu( id );
			} else 	Color( id, "!4[Biohazard Shop] !1Ai deja un set!1 de :!3 HE/Flash/Smoke !1!" );
		} else Color( id, "!4[Biohazard Shop]!1 Doar !3Human !1pot cumpara !" );
		} else Color( id, "!4[Biohazard Shop] !1Trebuie sa fi in viata sa cumperi!3 HE/Flash/Smoke !1!" );
		} case 6: {
			if( !is_user_alive( id ) ) {
				money = get_money( id ) - 10000;
				if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 10000 $ !1!" ); return 1; } else
				cs_set_user_team( id, CS_TEAM_CT );
				ExecuteHamB(Ham_CS_RoundRespawn, id);
				cure_user(id);
				set_task( 0.6, "SpawnArm", id );
				Remove_User_Nvgs(id);
				set_user_health(id, 100);
				cs_reset_user_model(id);	
				set_money( id, money );
				Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Respawn !1!" );
				//ShopMenu( id );
			} else { Color( id, "!4[Biohazard Shop] !1Trebuie sa fi !3Mort !1sa poti cumpara!3 Respawn !1!" ); }
		} case 7: {
		if( is_user_alive( id ) ) {
		if( is_zombie( id ) ) {
			money = get_money( id ) - 10000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 10000 $ !1!" ); return 1; } else
			if( is_zombie( id ) )
			set_user_infection_nade(id);
			set_money( id, money );
			Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Grenade Infection !1!" );
			}
		} } case 8: {
		if( is_user_alive( id ) ) {
		if( is_zombie( id ) ) {
			money = get_money( id ) - 12000;
			if( money < 0 ) { Color( id, "!4[Biohazard Shop] !1N-ai bani !! Necesari:!3 12000 $ !1!" ); return 1; } else
			if( is_zombie( id ) )
			evo_callfunc(id,"CSqueak_GiveWeapon","bio_extra_squeakgrenade.amxx");
			set_money( id, money );
			Color( id, "!4[Biohazard Shop] !1Ai cumparat!3 Snark Infector !1!" );
			}
		} }
	}
}


	return 1;
}

public client_PreThink( id ) {
	if( HavePara[id] ) {
		static Button; Button = get_user_button( id );
		static Float: Velocity[ 3 ]; entity_get_vector( id, EV_VEC_velocity, Velocity );
		if( Button & IN_USE && Velocity[ 2 ] < 00 ) { Velocity[ 2 ] = -100.0; entity_set_vector( id, EV_VEC_velocity, Velocity ); }
	}	
}

#define OFFSET_NVGOGGLES 129
#define HAS_NVGS (1<<0)
#define USES_NVGS (1<<8)
stock Remove_User_Nvgs(id) {
	new iNvgs = get_pdata_int(id, OFFSET_NVGOGGLES, 5);
	if (!iNvgs) { return; }
	if (iNvgs & USES_NVGS) {
		static gmsgNVGToggle;
		gmsgNVGToggle = get_user_msgid("NVGToggle");
		emessage_begin(MSG_ONE, gmsgNVGToggle, _, id);
		ewrite_byte(0);
		emessage_end();
	}
	set_pdata_int(id, OFFSET_NVGOGGLES, 0, 5);
}
public FixZMZoom( id ) cs_set_user_zoom( id, CS_RESET_ZOOM, 1 );

stock Color( const id, const input[ ], any:... ) {
	new count = 1, players[ 32 ];
	static msg[ 191 ]; vformat( msg, 190, input, 3 );
	replace_all( msg, 190, "!4", "^4" );
	replace_all( msg, 190, "!1", "^1" );
	replace_all( msg, 190, "!3", "^3" );
	replace_all( msg, 190, "!0", "^0" );
	if( id ) players[ 0 ] = id; else get_players( players, count, "ch" ); {
		for( new i = 0; i < count; i++ ) {
			if( is_user_connected( players[ i ] ) ) {
				message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
				write_byte( players[ i ] );
				write_string( msg );
				message_end( );
			}
		}
	}
}

stock evo_callfunc( id, function[], plugin[] ){
	if( callfunc_begin( function, plugin ) == 1 ){
		callfunc_push_int( id );
		callfunc_end( );
	}
}
Nu îmi mai trimiteți PM pe forum! Nu merge să răspund
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
sammi1
Membru, skill 0
Membru, skill 0
Posts: 49
Joined: 30 Jan 2021, 22:38
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Zm.CsPower.Ro
Fond eXtream: 0
Has thanked: 23 times

15 Feb 2021, 02:20

Mersi frumos din nou, merge bine, rezolvat, se poate da T/C
Post Reply

Return to “Probleme in jocul Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests