Cerere rezolvare erori

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 .
Post Reply
PigoExtreamCS
Membru, skill 0
Membru, skill 0
Posts: 52
Joined: 18 Dec 2013, 21:24
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Been thanked: 1 time
Contact:

18 Dec 2013, 21:37

Salut am un frate care detine un sv. de cs si vr. sa-mi deschid si eu unul mi-o dat o sursa mi-o modificat-o el precum imi doaream dar imi da erori pentru ca mi-am bagat eu nasul mi-l puteti repara?
| Afiseaza codul
#include < amxmodx >
#include < amxmisc>
#include < engine >
#include < cstrike >
#include < hamsandwich >
#include < fakemeta >
#include < fakemeta_util >
#include < colorchat >
#include < fun >

#define PLUGIN "Furien Shop"
#define VERSION "0.0.4"
#define AUTHOR "-Turbo-"

native get_user_credits (id);
native set_user_credits (id,cantitate);

#define ViewMaxModels 4

new ViewModels [ ViewMaxModels + 1 ] [ ] = {
	
	"models/shop/v_super_cutit2.mdl",
	"models/shop/v_goldenak.mdl",
	"models/shop/v_dragonclaws.mdl",
        "models/shop/v_superknife3.mdl",
	""
};

new iWeapon[33];
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_clcmd("say /shop", "FurienShop", 0);
	register_clcmd("say shop", "FurienShop", 0);
	register_clcmd("say_team /shop", "FurienShop", 0);
	register_clcmd("say_team shop", "FurienShop", 0);
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
	RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
	register_event( "DeathMsg" , "DeathMsgEvent" , "a" ); 
}

public plugin_precache ( ) 
{
	new vmodel;
	for ( vmodel = 0; vmodel < sizeof ( ViewModels ); vmodel++ )
		engfunc ( EngFunc_PrecacheModel, ViewModels [ vmodel ] );
}

public DeathMsgEvent() 
{ 
	new iVictim = read_data( 2 ); 
	iWeapon[iVictim] = 0
}  

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon( id );
	if(is_user_alive(id))
	{
		switch(iWeapon[id])
		{
			case 1:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 0 ] );
				
			}
			case 2:
			{
				if(szWeapon == CSW_AK47 && get_user_team(id) == 2)
					set_pev ( id, pev_viewmodel2, ViewModels [ 1 ] );
				
			}
			case 3:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 2 ] );	
				
			}
                        case 4:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 3 ] );	
				
			}
		}
	}
}

public FurienShop ( id ) 
{	
	switch(get_user_team(id))
	{
		case 1: set_task( 0.1, "ShowFurien", id );
			
		case 2: set_task( 0.1, "ShowAntiFurien", id );           i
        }
		}
	
}

public ShowAntiFurien(id, level, cid) 
{   
	new menu = menu_create( "\rAnti\w-\rFurien \yBuying", "antifurienhandler");
	menu_additem(menu, "\rGolden AK47 \y- \w[ \r10000$ ]", "1", 0);
	menu_additem(menu, "\yDefuse \rKIT \y- \w[ \r300 \y$ ]", "2", 0);
	menu_additem(menu, "\y50 \rHP \y- \w[ \r3000$ ]", "3", 0);
	menu_additem(menu, "\y50 \rAP \y- \w[ \r1000$ ]", "4", 0);
	menu_additem(menu, "\yHE \rGrenade \y- \w[ \r2500$]", "5", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public ShowFurien(id, level, cid) 
{    
	new menu = menu_create( "\rFurien \yBuying", "furienhandler");
	menu_additem(menu, "\rSuper Knife \y- \w[ \r10000$ ]", "0", 0);
        menu_additem(menu, "\rsuperknife2 \y- \w[ \r10 Credite ]", "0", 0);
	menu_additem(menu, "\yHE \rGrenade \y- \w[ \r2500$ ]", "1", 0);
	menu_additem(menu, "\y50 \rHP \y- \w[ \r3000$ ]", "2", 0);
	menu_additem(menu, "\y100 \rAP \y- \w[ \r1000$ ]", "3", 0);
	menu_additem(menu, "\yBlackPack \y- \w[ \r 20 Credite ]", "4", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public furienhandler (id, menu, item, level, cid) 
{
	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 0:
		{	
			new iMoney = cs_get_user_money ( id ) - 12000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 1;
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 12000);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01SuperKnife!");
				return 1;
			}
                 case 1:
		{	new iCredits = get_user_credits ( id ) - 10;
			if( iCredits < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 4;
				CurrentWeapon( id );
				set_user_credits( id, iCredits );
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 SuperKnife2!");
				return 1;
			}
                        
		}
                
		
		case 2:
		{	
			new iMoney = cs_get_user_money ( id ) - 2500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				give_item ( id, "weapon_hegrenade" );
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 2500);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01HeGrenade!");
				return 1;
			}
		}
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 3000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani !");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 250 ) 
				{
					set_user_health ( id, get_user_health ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 3000);
					ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03Ai cumparat ^x0 50 HP!");
					return 1;
				}
                                if( Health > 250 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 250 HP^x01." );
                                return 1;
			        }
		}
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 1000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani");
				return 1;
				
			}
			else
			{
				new Armor = get_user_armor ( id );
				if ( Armor <= 200 ) 
				{
					set_user_armor( id, get_user_armor ( id ) + 100 );
					cs_set_user_money(id, cs_get_user_money(id) - 1000);
					ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Ai cumparat 100 AP!");
					return 1;
				}
			}
		}
		
		case 5:
		{
			new iCredits = get_user_credits ( id ) - 20;
			if( iCredits < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 300 ) 
				{
					set_user_health( id, get_user_health ( id ) + 300 );
					set_user_armor( id, get_user_armor ( id ) + 300 );
					iWeapon[id] = 3;
                                        CurrentWeapon( id );
					set_user_credits( id, iCredits );
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 BlackPack!");
					return 1;
				}
                                if( Health > 300 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 300 HP^x01." );
                                return 1;
			        }
		}
	}
	menu_destroy(menu);
	return 1;
}

public antifurienhandler(id, menu, item, level, cid) 
{
	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:
		{	
			new iMoney = cs_get_user_money ( id ) - 10000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 2;
				give_item ( id, "weapon_ak47" );
				cs_set_user_bpammo( id, CSW_AK47, 250 )
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 10000);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01GoldenAk47!");
				return 1;
			}
		}
		
		case 2:
		{
			new iMoney = cs_get_user_money ( id ) - 300;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				fm_give_item ( id, "item_thighpack" );
				cs_set_user_money(id, cs_get_user_money(id) - 300);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01DefuseKit!");
				return 1;
			}
		}
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 3000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani !");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 250 ) 
				{
					fm_set_user_health ( id, get_user_health ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 3000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 50 HP!");
					return 1;
				}
                                if( Health > 250 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 250 HP^x01." );
                                return 1;
			}
		}
		
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 1000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani");
				return 1;
				
			}
			else
			{
				new Armor = get_user_armor ( id );
				if ( Armor <= 300 ) 
				{
					fm_set_user_armor( id, get_user_armor ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 1000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat 50 AP!");
					return 1;
				}
			}
		}
		
		case 5:
		{	
			new iMoney = cs_get_user_money ( id ) - 2500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				give_item ( id, "weapon_hegrenade" );
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 2500);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 HeGrenade!");
				return 1;
			}
		}
	}
	
	menu_destroy(menu);
	return 1;
}

public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if(is_user_alive(iAttacker))
	{
		switch(iWeapon[iAttacker])
		{
			case 1:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 2);
			}
			
			case 2:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_AK47 && get_user_team(iAttacker) == 2)
					SetHamParamFloat( 4, fDamage * 2);
				
			}
			case 3:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 3);
				
			}
                         case 4:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 4);
				
			}
		}
	}
	return HAM_HANDLED;
}
Rapidserver
Cosmin
Fost moderator
Fost moderator
Posts: 9366
Joined: 06 Jul 2013, 21:08
Detinator Steam: Da
Detinator server CS: Nu
Reputatie: Fost eXtream Mod
Fost Scripter eXtreamCS
Nume anterior: scosmynnnn
Has thanked: 492 times
Been thanked: 546 times

18 Dec 2013, 21:47

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

#define PLUGIN "Furien Shop"
#define VERSION "0.0.4"
#define AUTHOR "-Turbo-"

native get_user_credits (id);
native set_user_credits (id,cantitate);

#define ViewMaxModels 4

new ViewModels [ ViewMaxModels + 1 ] [ ] = {
	
	"models/shop/v_super_cutit2.mdl",
	"models/shop/v_goldenak.mdl",
	"models/shop/v_dragonclaws.mdl",
        "models/shop/v_superknife3.mdl",
	""
};

new iWeapon[33];
public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_clcmd("say /shop", "FurienShop", 0);
	register_clcmd("say shop", "FurienShop", 0);
	register_clcmd("say_team /shop", "FurienShop", 0);
	register_clcmd("say_team shop", "FurienShop", 0);
	register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
	RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
	register_event( "DeathMsg" , "DeathMsgEvent" , "a" ); 
}

public plugin_precache ( ) 
{
	new vmodel;
	for ( vmodel = 0; vmodel < sizeof ( ViewModels ); vmodel++ )
		engfunc ( EngFunc_PrecacheModel, ViewModels [ vmodel ] );
}

public DeathMsgEvent() 
{ 
	new iVictim = read_data( 2 ); 
	iWeapon[iVictim] = 0
}  

public CurrentWeapon ( id ) 
{
	new szWeapon = get_user_weapon( id );
	if(is_user_alive(id))
	{
		switch(iWeapon[id])
		{
			case 1:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 0 ] );
				
			}
			case 2:
			{
				if(szWeapon == CSW_AK47 && get_user_team(id) == 2)
					set_pev ( id, pev_viewmodel2, ViewModels [ 1 ] );
				
			}
			case 3:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 2 ] );	
				
			}
                        case 4:
			{
				if(szWeapon == CSW_KNIFE && get_user_team(id) == 1)
					set_pev ( id, pev_viewmodel2, ViewModels [ 3 ] );	
				
			}
		}
	}
}

public FurienShop ( id ) 
{	
	switch(get_user_team(id))
	{
		case 1: set_task( 0.1, "ShowFurien", id );
			
		case 2: set_task( 0.1, "ShowAntiFurien", id );
	}
	
}

public ShowAntiFurien(id, level, cid) 
{   
	new menu = menu_create( "\rAnti\w-\rFurien \yBuying", "antifurienhandler");
	menu_additem(menu, "\rGolden AK47 \y- \w[ \r10000$ ]", "1", 0);
	menu_additem(menu, "\yDefuse \rKIT \y- \w[ \r300 \y$ ]", "2", 0);
	menu_additem(menu, "\y50 \rHP \y- \w[ \r3000$ ]", "3", 0);
	menu_additem(menu, "\y50 \rAP \y- \w[ \r1000$ ]", "4", 0);
	menu_additem(menu, "\yHE \rGrenade \y- \w[ \r2500$]", "5", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public ShowFurien(id, level, cid) 
{    
	new menu = menu_create( "\rFurien \yBuying", "furienhandler");
	menu_additem(menu, "\rSuper Knife \y- \w[ \r10000$ ]", "0", 0);
        menu_additem(menu, "\rsuperknife2 \y- \w[ \r10 Credite ]", "0", 0);
	menu_additem(menu, "\yHE \rGrenade \y- \w[ \r2500$ ]", "1", 0);
	menu_additem(menu, "\y50 \rHP \y- \w[ \r3000$ ]", "2", 0);
	menu_additem(menu, "\y100 \rAP \y- \w[ \r1000$ ]", "3", 0);
	menu_additem(menu, "\yBlackPack \y- \w[ \r 20 Credite ]", "4", 0);
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0);
}

public furienhandler (id, menu, item, level, cid) 
{
	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 0:
		{	
			new iMoney = cs_get_user_money ( id ) - 12000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 1;
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 12000);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01SuperKnife!");
				return 1;
			}
		}
        case 1:
		{
			new iCredits = get_user_credits ( id ) - 10;
			if( iCredits < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 4;
				CurrentWeapon( id );
				set_user_credits( id, iCredits );
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 SuperKnife2!");
				return 1;
			}
                        
		}
		case 2:
		{	
			new iMoney = cs_get_user_money ( id ) - 2500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				give_item ( id, "weapon_hegrenade" );
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 2500);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01HeGrenade!");
				return 1;
			}
		}
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 3000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani !");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 250 ) 
				{
					set_user_health ( id, get_user_health ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 3000);
					ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03Ai cumparat ^x0 50 HP!");
					return 1;
				}
                                if( Health > 250 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 250 HP^x01." );
                                return 1;
			        }
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 1000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani");
				return 1;
				
			}
			else
			{
				new Armor = get_user_armor ( id );
				if ( Armor <= 200 ) 
				{
					set_user_armor( id, get_user_armor ( id ) + 100 );
					cs_set_user_money(id, cs_get_user_money(id) - 1000);
					ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Ai cumparat 100 AP!");
					return 1;
				}
			}
		}
		
		case 5:
		{
			new iCredits = get_user_credits ( id ) - 20;
			if( iCredits < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 300 ) 
				{
					set_user_health( id, get_user_health ( id ) + 300 );
					set_user_armor( id, get_user_armor ( id ) + 300 );
					iWeapon[id] = 3;
                                        CurrentWeapon( id );
					set_user_credits( id, iCredits );
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 BlackPack!");
					return 1;
				}
                                if( Health > 300 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 300 HP^x01." );
                                return 1;
			        }
			}
		}
	}
	menu_destroy(menu);
	return 1;
}

public antifurienhandler(id, menu, item, level, cid) 
{
	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:
		{	
			new iMoney = cs_get_user_money ( id ) - 10000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				iWeapon[id] = 2;
				give_item ( id, "weapon_ak47" );
				cs_set_user_bpammo( id, CSW_AK47, 250 )
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 10000);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01GoldenAk47!");
				return 1;
			}
		}
		
		case 2:
		{
			new iMoney = cs_get_user_money ( id ) - 300;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				fm_give_item ( id, "item_thighpack" );
				cs_set_user_money(id, cs_get_user_money(id) - 300);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01DefuseKit!");
				return 1;
			}
		}
		
		case 3:
		{
			new iMoney = cs_get_user_money ( id ) - 3000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani !");
				return 1;
				
			}
			else
			{
				new Health = get_user_health ( id );
				if ( Health <= 250 ) 
				{
					fm_set_user_health ( id, get_user_health ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 3000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 50 HP!");
					return 1;
				}
                                if( Health > 250 ) {
               
                                ColorChat( id, GREEN, "[FURIEN]^x01 You can't buy more^x03 250 HP^x01." );
                                return 1;
				}
			}
		}
		case 4:
		{
			new iMoney = cs_get_user_money ( id ) - 1000;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani");
				return 1;
				
			}
			else
			{
				new Armor = get_user_armor ( id );
				if ( Armor <= 300 ) 
				{
					fm_set_user_armor( id, get_user_armor ( id ) + 50 );
					cs_set_user_money(id, cs_get_user_money(id) - 1000);
					ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat 50 AP!");
					return 1;
				}
			}
		}
		
		case 5:
		{	
			new iMoney = cs_get_user_money ( id ) - 2500;
			if( iMoney < 0 )
			{
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Nu ai destui bani!");
				return 1;
				
			}
			else
			{ 
				give_item ( id, "weapon_hegrenade" );
				CurrentWeapon( id );
				cs_set_user_money(id, cs_get_user_money(id) - 2500);
				ColorChat( id, GREEN, "^x01[ ^x04 FurienShop^x01 ]^x03 Ai cumparat ^x01 HeGrenade!");
				return 1;
			}
		}
	}
	
	menu_destroy(menu);
	return 1;
}

public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
	if(is_user_alive(iAttacker))
	{
		switch(iWeapon[iAttacker])
		{
			case 1:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 2);
			}
			
			case 2:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_AK47 && get_user_team(iAttacker) == 2)
					SetHamParamFloat( 4, fDamage * 2);
				
			}
			case 3:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 3);
				
			}
                         case 4:
			{
				if(iInflictor == iAttacker && get_user_weapon(iAttacker) == CSW_KNIFE && get_user_team(iAttacker) == 1)
					SetHamParamFloat( 4, fDamage * 4);
				
			}
		}
	}
	return HAM_HANDLED;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
PigoExtreamCS
Membru, skill 0
Membru, skill 0
Posts: 52
Joined: 18 Dec 2013, 21:24
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Has thanked: 7 times
Been thanked: 1 time
Contact:

19 Dec 2013, 00:06

Multumesc.
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests