Raised This Month: $ Target: $400
 0% 

trash plz


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2011 , 09:01   Re: why does i get this errors?
Reply With Quote #1

I'm asking you why you put that semicolon there.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-19-2011 , 09:03   Re: why does i get this errors?
Reply With Quote #2

Quote:
Originally Posted by Exolent[jNr] View Post
I'm asking you why you put that semicolon there.
Error: Expected token: ";", but found ")" on line 316

i saw that so i belived i need 2 put it there
2reason2kill is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2011 , 09:04   Re: why does i get this errors?
Reply With Quote #3

You probably have an error somewhere else that is causing it.
Show your full code.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Old 06-19-2011, 09:06
2reason2kill
This message has been deleted by 2reason2kill. Reason: solved
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 06-19-2011 , 09:12   Re: why does i get this errors?
Reply With Quote #5

You were missing some closing braces and the 'if's before some if statements.
Everything I added is highlighted.

Code:
/*

////////////////-|Ct Shop|-///////////////////

Deagle
shotgun
m249
Night Vision
GreNade Packet
Revive


////////////////-T Shop-///////////////////////


Anti Deagle
Ratio Shield
Revive
Spy 



*/



#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <Colorchat>
#include <engine>
#include <fakemeta>
#include <hamsandwich>



//Define
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
#define fm_DispatchSpawn(%1) dllfunc(DLLFunc_Spawn, %1)
#define A "2reason2kill"
#define V "1.0"
#define P "vampire mod"


//Boolean
new bool:g_bBoght[33][33]

//prefix etc

new PlayerClass[33]
new PREFIX[] = "[Vampire Mod]^x01:"



new g_iMaxPlayers


//Cvar's


new BloodyHp,Nightmarehp,Bloodsuckerhp, Blademasterhp,Clasichp,invisbletime,silver_lighet_cost,Shotghun_cost,nightvison_cost,grenadepacket_cost,revive_cost,anti_deagle_cost,m249_cost,spy_cost,ratio_shield_cost


//shop item

//Ct
enum {
	
	silver_lighet,
	Shotghun,
	nightvison,
	grenade_packet,
	Revive,
	m249
}

//T
enum {
	
	anti_deagle,
	ratio_shield,
	Spy
	
}

public plugin_init() {
	register_plugin(P, V, A)
	
	//Cvar's
	BloodyHp = register_cvar("vm_bloody_hp","250")// Bloody Hp
	Nightmarehp = register_cvar("vm_nightmare_hp","530")// NM Hp
	Bloodsuckerhp = register_cvar("vm_bloodsucker_hp","150")// BS hp
	Blademasterhp = register_cvar("vm_blademaster_hp","300")//bm Hp
	Clasichp = register_cvar("vm_Clasic_hp","350")//clasic hp
	invisbletime = register_cvar("vm_Invisble_time","15.0")//invisble Time
	silver_lighet_cost = register_cvar("silver_lighet_cost","16000")
	Shotghun_cost = register_cvar("Shotghun_cost","16000")
	nightvison_cost = register_cvar("nightvison_cost","16000")
	grenadepacket_cost = register_cvar("grenadepacket_cost","16000")
	revive_cost = register_cvar("revive_cost","16000")
	anti_deagle_cost = register_cvar("anti_deagle_cost","16000")
	m249_cost = register_cvar("m249_cost","16000")
	spy_cost = register_cvar("vm_spy","16000")
	ratio_shield_cost = register_cvar("vm_ratioS_cost","16000")
	
	//Round Start & Round end
	register_logevent("round_start",2,"1=round_start")
	register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
	register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
	
	//forward and hook's
	RegisterHam( Ham_TakeDamage , "player" , "fwTakeDamage" )
	g_iMaxPlayers = get_maxplayers()
	
	
	//commands
	register_concmd("say /Shop","Shop");
	register_concmd("say_team /Shop","Shop");
	register_concmd("say /Help","Showhelp");
	
	
	
	
	
	
}

public plugin_precache()
{
	precache_sound("vampiremod/roundstart1.wav")
	precache_sound("vampiremod/roundstart2.wav")
	precache_sound("vampiremod/roundwinct1.wav")
	precache_sound("vampiremod/roundwinct1.wav")
	
	
}

public round_start()
{
	new rand = random_num(0,2)
	
	switch(rand)
	{
		case 0:client_cmd(0, "spk vampiremod/roundstart1.wav")
			case 1:client_cmd(0, "spk vampiremod/roundstart2.wav")
			
	}
	
	return PLUGIN_HANDLED
}


public Shop(id)
{
	if(is_user_alive (id) )
	{
		new Item[100];
		
		if(cs_get_user_team(id) == CS_TEAM_CT)
		{
			new ShopCT = menu_create("\y [\rHumen Shop\y]\y:","CsShop");
			formatex(Item, charsmax(Item), "\wSilver Light \y[\r %d $\y]", get_pcvar_num(silver_lighet_cost));
			menu_additem(ShopCT,Item, "1");
			format(Item,sizeof(Item)-1, "\wShotty\y[\r %d $\y]", get_pcvar_num(Shotghun_cost));
			menu_additem(ShopCT,Item, "2");
			format(Item,sizeof(Item)-1, "\wnightvision\y[\r %d $\y]", get_pcvar_num(nightvison_cost));
			menu_additem(ShopCT,Item, "3");
			format(Item,sizeof(Item)-1, "\wGreNade Packet\y[\r %d $\y]", get_pcvar_num(grenadepacket_cost));
			menu_additem(ShopCT,Item, "4");
			format(Item,sizeof(Item)-1, "\wMachinGun Guy!\y[\r %d $\y]", get_pcvar_num(m249_cost));
			menu_additem(ShopCT,Item, "5");
			menu_display(id,ShopCT,0)
			menu_setprop(ShopCT, MPROP_PERPAGE, 0);
			
		}
	}
	else
	{
		if(cs_get_user_team(id) == CS_TEAM_T)
		{
			new Item[100];
			new ShopT = menu_create("\y [\rVampire Shop\y]\y:","vampireshop");
			formatex(Item, charsmax(Item), "\wAnti Deagle\y[\r %s $\y]", get_pcvar_num(anti_deagle_cost));
			menu_additem(ShopT,Item, "1");
			formatex(Item, charsmax(Item), "\wRatio Shield!\y[\r %s $\y]", get_pcvar_num(ratio_shield_cost));
			menu_additem(ShopT,Item, "2");
			formatex(Item, charsmax(Item), "\wChamelon\y[\r %s $\y]", get_pcvar_num(spy_cost));
			menu_additem(ShopT,Item, "3");
			menu_addblank(ShopT, 0);
			menu_additem(ShopT, "Exit","4");
			menu_display(id, ShopT,0)
			menu_setprop(ShopT, MPROP_PERPAGE,0);
		}
	}
}
public CsShop (id, ShopCT, item)
{
	new data[6], iName[64]
	new access, callback
	menu_item_getinfo(ShopCT, item, access, data,5, iName, 63, callback)
	
	new name [33]
	get_user_name(id, name, 32)
	new key = str_to_num(data)
	new money = cs_get_user_money(id)
	
	switch(key)
	{
		case 1:
		{
			if(g_bBoght[id][silver_lighet])
			{
				ColorChat(id, GREEN,"%s You Cant Buy This Item 2 Time's!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(silver_lighet_cost);
				
				if(money >= cost)
				{
					cs_set_weapon_ammo(give_item(id, "weapon_deagle"),1)
					g_bBoght[id][silver_lighet] = true
					cs_set_user_bpammo(id, CSW_DEAGLE, 1)
					cs_set_user_money(id, money -cost)
					set_hudmessage(0, 255, 0, -1.0, -1.0)
					show_hudmessage(0, "%s Just Bought a Silver light^nVampires Watch Out!")
					
					ColorChat(id, GREEN,"%s You Just Bought a^x04 silver Light^x01!", PREFIX);
				}
			}
		}
		case 2:
		{
			if(g_bBoght[id][Shotghun])
			{
				ColorChat(id, GREEN,"%s You Can't Buy This ^x04Item^x01 2^x04 Time's^x01!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(Shotghun_cost);
				
				if(money >= cost)
				{
					give_item(id, "weapon_m3")
					cs_set_user_bpammo(id, CSW_M3, 250)
					cs_set_user_money(id, money -cost)
					g_bBoght[id][Shotghun] = true;
					ColorChat(id,GREEN,"%s You Just Bought a^x04 Shotty^x01!",PREFIX)
				}
			}
		}
		case 3:
		{
			if(g_bBoght[id][nightvison])
			{
				ColorChat(id,GREEN,"%s You^x04 Already^x01 This Item!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(nightvison_cost);
				
				if(money >= cost)
				{
					give_item(id,"item_nightvision")
					g_bBoght[id][nightvison] = true;
					cs_set_user_money(id,money -cost)
				}
			}
		}
		case 4:
		{
			if(g_bBoght[id][grenade_packet])
			{
				ColorChat(id, GREEN,"%s You^x04 Already^x01 have This^x04 Item^x01!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(grenadepacket_cost);
				
				if(money >= cost)
				{
					give_item(id, "weapon_flashbang")
					give_item(id, "weapon_hegrenade")
					give_item(id, "weapon_smokegrenade")
					g_bBoght[id][grenade_packet] = true;
					cs_set_user_money(id, money -cost)
				}
			}
		}
		
		case 5:
		{
			if(g_bBoght[id][m249])
			{
				ColorChat(id,GREEN,"%s You Aready Bought Or have this ^x04Item^01!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(m249_cost);
				
				if(money >= cost)
				{
					give_item(id,"weapon_m249")
					set_hudmessage(0, 255, 0, -1.0, -1.0)
					show_hudmessage(0, "%s Have a Maching Gun!^nWatch Out from him!",name)
					g_bBoght[id][m249] = true;
					ColorChat(id,GREEN,"%s You Just Bought A machin Gun!",PREFIX)
					cs_set_user_money(id,money -cost)
					
				}
			}
		}
	}
}

public vampireshop (id, ShopT, item)
{
	new data[6], iName[64]
	new access, callback
	menu_item_getinfo(ShopT, item, access, data,5, iName, 63, callback)
	
	new key = str_to_num(data)
	new money = cs_get_user_money(id)
	
	switch(key)
	{
		case 1:
		{
			if(g_bBoght[id][anti_deagle])
			{
				ColorChat(id, GREEN, "%s You Only Can buy this item ^x041 time^x01!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(anti_deagle_cost)
				
				if(money >= cost)
				{
					fwTakeDamage(id)
					g_bBoght[id][anti_deagle] = true;
					cs_set_user_money(id, money-cost)
					ColorChat(id, GREEN, "%s You Just Bought^x04 Anti Deagle^x01!",PREFIX)
				}
			}
		}
		case 2:
		{
			if(g_bBoght[id][ratio_shield])
			{
				ColorChat(id,GREEN, "%s You Can't Buy This item 2 Times!",PREFIX)
			}
			else
			{
				new cost = get_pcvar_num(ratio_shield_cost);
				
				if(money >= cost)
				{
					give_item(id,"weapon_shield");
					g_bBoght[id][ratio_shield] = true;
					cs_set_user_money(id, money-cost)
					ColorChat(id, GREEN, "%s You just Bought a ^x04Riot Shield^x01!",PREFIX)
				}
			}
		}
		case 3:
		{
			if(g_bBoght[id][Spy])
			{
				ColorChat(id, GREEN," %s You aready look like an enemy!",PREFIX)
			}
			else
			{
				new money = get_pcvar_num(spy_cost);
				new rand = random_num(1,6)
				
				if(money >=cost)
				{
					g_bBoght[id][spy] = true;
					cs_set_user_money(id,money-cost)
					ColorChat(id, GREEN, "%s You look like an ^x04enemy^x01!",PREFIX)
					switch(rand)
					{
						case 1:
						{
							cs_set_user_model(id,GIGN)
						}
						case 2:
						{
							cs_set_user_model(id,GSG9)
						}
						case 3:
						{
							cs_set_user_model(id,SAS)
						}
						case 4:
						{
							cs_set_user_model(id, Spetsnaz )
						}
						case 5:
						{
							cs_set_user_model(id, Urban )
						}
					}
				}
			}
		}
	}
}
public fwTakeDamage( victim , inflictor , attacker , Float:damage , damage_bits )
{
	if( IsPlayer( attacker ) && is_user_alive( attacker ) && inflictor == attacker && ( get_user_weapon(attacker) == CSW_DEAGLE ) )
	{
		return HAM_SUPERCEDE;
	}
	
	return HAM_IGNORED;
}
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
2reason2kill
Senior Member
Join Date: Feb 2011
Old 06-19-2011 , 09:16   Re: why does i get this errors?
Reply With Quote #6

Quote:
Originally Posted by Exolent[jNr] View Post
You were missing some closing braces and the 'if's before some if statements.
Everything I added is highlighted.

Code:
/*

////////////////-|Ct Shop|-///////////////////

Deagle
shotgun
m249
Night Vision
GreNade Packet
Revive


////////////////-T Shop-///////////////////////


Anti Deagle
Ratio Shield
Revive
Spy 



*/



#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <Colorchat>
#include <engine>
#include <fakemeta>
#include <hamsandwich>



//Define
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
#define fm_DispatchSpawn(%1) dllfunc(DLLFunc_Spawn, %1)
#define A "2reason2kill"
#define V "1.0"
#define P "vampire mod"


//Boolean
new bool:g_bBoght[33][33]

//prefix etc

new PlayerClass[33]
new PREFIX[] = "[Vampire Mod]^x01:"



new g_iMaxPlayers


//Cvar's


new BloodyHp,Nightmarehp,Bloodsuckerhp, Blademasterhp,Clasichp,invisbletime,silver_lighet_cost,Shotghun_cost,nightvison_cost,grenadepacket_cost,revive_cost,anti_deagle_cost,m249_cost,spy_cost,ratio_shield_cost


//shop item

//Ct
enum {
    
    silver_lighet,
    Shotghun,
    nightvison,
    grenade_packet,
    Revive,
    m249
}

//T
enum {
    
    anti_deagle,
    ratio_shield,
    Spy
    
}

public plugin_init() {
    register_plugin(P, V, A)
    
    //Cvar's
    BloodyHp = register_cvar("vm_bloody_hp","250")// Bloody Hp
    Nightmarehp = register_cvar("vm_nightmare_hp","530")// NM Hp
    Bloodsuckerhp = register_cvar("vm_bloodsucker_hp","150")// BS hp
    Blademasterhp = register_cvar("vm_blademaster_hp","300")//bm Hp
    Clasichp = register_cvar("vm_Clasic_hp","350")//clasic hp
    invisbletime = register_cvar("vm_Invisble_time","15.0")//invisble Time
    silver_lighet_cost = register_cvar("silver_lighet_cost","16000")
    Shotghun_cost = register_cvar("Shotghun_cost","16000")
    nightvison_cost = register_cvar("nightvison_cost","16000")
    grenadepacket_cost = register_cvar("grenadepacket_cost","16000")
    revive_cost = register_cvar("revive_cost","16000")
    anti_deagle_cost = register_cvar("anti_deagle_cost","16000")
    m249_cost = register_cvar("m249_cost","16000")
    spy_cost = register_cvar("vm_spy","16000")
    ratio_shield_cost = register_cvar("vm_ratioS_cost","16000")
    
    //Round Start & Round end
    register_logevent("round_start",2,"1=round_start")
    register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
    register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
    
    //forward and hook's
    RegisterHam( Ham_TakeDamage , "player" , "fwTakeDamage" )
    g_iMaxPlayers = get_maxplayers()
    
    
    //commands
    register_concmd("say /Shop","Shop");
    register_concmd("say_team /Shop","Shop");
    register_concmd("say /Help","Showhelp");
    
    
    
    
    
    
}

public plugin_precache()
{
    precache_sound("vampiremod/roundstart1.wav")
    precache_sound("vampiremod/roundstart2.wav")
    precache_sound("vampiremod/roundwinct1.wav")
    precache_sound("vampiremod/roundwinct1.wav")
    
    
}

public round_start()
{
    new rand = random_num(0,2)
    
    switch(rand)
    {
        case 0:client_cmd(0, "spk vampiremod/roundstart1.wav")
            case 1:client_cmd(0, "spk vampiremod/roundstart2.wav")
            
    }
    
    return PLUGIN_HANDLED
}


public Shop(id)
{
    if(is_user_alive (id) )
    {
        new Item[100];
        
        if(cs_get_user_team(id) == CS_TEAM_CT)
        {
            new ShopCT = menu_create("\y [\rHumen Shop\y]\y:","CsShop");
            formatex(Item, charsmax(Item), "\wSilver Light \y[\r %d $\y]", get_pcvar_num(silver_lighet_cost));
            menu_additem(ShopCT,Item, "1");
            format(Item,sizeof(Item)-1, "\wShotty\y[\r %d $\y]", get_pcvar_num(Shotghun_cost));
            menu_additem(ShopCT,Item, "2");
            format(Item,sizeof(Item)-1, "\wnightvision\y[\r %d $\y]", get_pcvar_num(nightvison_cost));
            menu_additem(ShopCT,Item, "3");
            format(Item,sizeof(Item)-1, "\wGreNade Packet\y[\r %d $\y]", get_pcvar_num(grenadepacket_cost));
            menu_additem(ShopCT,Item, "4");
            format(Item,sizeof(Item)-1, "\wMachinGun Guy!\y[\r %d $\y]", get_pcvar_num(m249_cost));
            menu_additem(ShopCT,Item, "5");
            menu_display(id,ShopCT,0)
            menu_setprop(ShopCT, MPROP_PERPAGE, 0);
            
        }
    }
    else
    {
        if(cs_get_user_team(id) == CS_TEAM_T)
        {
            new Item[100];
            new ShopT = menu_create("\y [\rVampire Shop\y]\y:","vampireshop");
            formatex(Item, charsmax(Item), "\wAnti Deagle\y[\r %s $\y]", get_pcvar_num(anti_deagle_cost));
            menu_additem(ShopT,Item, "1");
            formatex(Item, charsmax(Item), "\wRatio Shield!\y[\r %s $\y]", get_pcvar_num(ratio_shield_cost));
            menu_additem(ShopT,Item, "2");
            formatex(Item, charsmax(Item), "\wChamelon\y[\r %s $\y]", get_pcvar_num(spy_cost));
            menu_additem(ShopT,Item, "3");
            menu_addblank(ShopT, 0);
            menu_additem(ShopT, "Exit","4");
            menu_display(id, ShopT,0)
            menu_setprop(ShopT, MPROP_PERPAGE,0);
        }
    }
}
public CsShop (id, ShopCT, item)
{
    new data[6], iName[64]
    new access, callback
    menu_item_getinfo(ShopCT, item, access, data,5, iName, 63, callback)
    
    new name [33]
    get_user_name(id, name, 32)
    new key = str_to_num(data)
    new money = cs_get_user_money(id)
    
    switch(key)
    {
        case 1:
        {
            if(g_bBoght[id][silver_lighet])
            {
                ColorChat(id, GREEN,"%s You Cant Buy This Item 2 Time's!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(silver_lighet_cost);
                
                if(money >= cost)
                {
                    cs_set_weapon_ammo(give_item(id, "weapon_deagle"),1)
                    g_bBoght[id][silver_lighet] = true
                    cs_set_user_bpammo(id, CSW_DEAGLE, 1)
                    cs_set_user_money(id, money -cost)
                    set_hudmessage(0, 255, 0, -1.0, -1.0)
                    show_hudmessage(0, "%s Just Bought a Silver light^nVampires Watch Out!")
                    
                    ColorChat(id, GREEN,"%s You Just Bought a^x04 silver Light^x01!", PREFIX);
                }
            }
        }
        case 2:
        {
            if(g_bBoght[id][Shotghun])
            {
                ColorChat(id, GREEN,"%s You Can't Buy This ^x04Item^x01 2^x04 Time's^x01!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(Shotghun_cost);
                
                if(money >= cost)
                {
                    give_item(id, "weapon_m3")
                    cs_set_user_bpammo(id, CSW_M3, 250)
                    cs_set_user_money(id, money -cost)
                    g_bBoght[id][Shotghun] = true;
                    ColorChat(id,GREEN,"%s You Just Bought a^x04 Shotty^x01!",PREFIX)
                }
            }
        }
        case 3:
        {
            if(g_bBoght[id][nightvison])
            {
                ColorChat(id,GREEN,"%s You^x04 Already^x01 This Item!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(nightvison_cost);
                
                if(money >= cost)
                {
                    give_item(id,"item_nightvision")
                    g_bBoght[id][nightvison] = true;
                    cs_set_user_money(id,money -cost)
                }
            }
        }
        case 4:
        {
            if(g_bBoght[id][grenade_packet])
            {
                ColorChat(id, GREEN,"%s You^x04 Already^x01 have This^x04 Item^x01!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(grenadepacket_cost);
                
                if(money >= cost)
                {
                    give_item(id, "weapon_flashbang")
                    give_item(id, "weapon_hegrenade")
                    give_item(id, "weapon_smokegrenade")
                    g_bBoght[id][grenade_packet] = true;
                    cs_set_user_money(id, money -cost)
                }
            }
        }
        
        case 5:
        {
            if(g_bBoght[id][m249])
            {
                ColorChat(id,GREEN,"%s You Aready Bought Or have this ^x04Item^01!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(m249_cost);
                
                if(money >= cost)
                {
                    give_item(id,"weapon_m249")
                    set_hudmessage(0, 255, 0, -1.0, -1.0)
                    show_hudmessage(0, "%s Have a Maching Gun!^nWatch Out from him!",name)
                    g_bBoght[id][m249] = true;
                    ColorChat(id,GREEN,"%s You Just Bought A machin Gun!",PREFIX)
                    cs_set_user_money(id,money -cost)
                    
                }
            }
        }
    }
}

public vampireshop (id, ShopT, item)
{
    new data[6], iName[64]
    new access, callback
    menu_item_getinfo(ShopT, item, access, data,5, iName, 63, callback)
    
    new key = str_to_num(data)
    new money = cs_get_user_money(id)
    
    switch(key)
    {
        case 1:
        {
            if(g_bBoght[id][anti_deagle])
            {
                ColorChat(id, GREEN, "%s You Only Can buy this item ^x041 time^x01!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(anti_deagle_cost)
                
                if(money >= cost)
                {
                    fwTakeDamage(id)
                    g_bBoght[id][anti_deagle] = true;
                    cs_set_user_money(id, money-cost)
                    ColorChat(id, GREEN, "%s You Just Bought^x04 Anti Deagle^x01!",PREFIX)
                }
            }
        }
        case 2:
        {
            if(g_bBoght[id][ratio_shield])
            {
                ColorChat(id,GREEN, "%s You Can't Buy This item 2 Times!",PREFIX)
            }
            else
            {
                new cost = get_pcvar_num(ratio_shield_cost);
                
                if(money >= cost)
                {
                    give_item(id,"weapon_shield");
                    g_bBoght[id][ratio_shield] = true;
                    cs_set_user_money(id, money-cost)
                    ColorChat(id, GREEN, "%s You just Bought a ^x04Riot Shield^x01!",PREFIX)
                }
            }
        }
        case 3:
        {
            if(g_bBoght[id][Spy])
            {
                ColorChat(id, GREEN," %s You aready look like an enemy!",PREFIX)
            }
            else
            {
                new money = get_pcvar_num(spy_cost);
                new rand = random_num(1,6)
                
                if(money >=cost)
                {
                    g_bBoght[id][spy] = true;
                    cs_set_user_money(id,money-cost)
                    ColorChat(id, GREEN, "%s You look like an ^x04enemy^x01!",PREFIX)
                    switch(rand)
                    {
                        case 1:
                        {
                            cs_set_user_model(id,GIGN)
                        }
                        case 2:
                        {
                            cs_set_user_model(id,GSG9)
                        }
                        case 3:
                        {
                            cs_set_user_model(id,SAS)
                        }
                        case 4:
                        {
                            cs_set_user_model(id, Spetsnaz )
                        }
                        case 5:
                        {
                            cs_set_user_model(id, Urban )
                        }
                    }
                }
            }
        }
    }
}
public fwTakeDamage( victim , inflictor , attacker , Float:damage , damage_bits )
{
    if( IsPlayer( attacker ) && is_user_alive( attacker ) && inflictor == attacker && ( get_user_weapon(attacker) == CSW_DEAGLE ) )
    {
        return HAM_SUPERCEDE;
    }
    
    return HAM_IGNORED;
}
thnx can u trash this so no 1 can get my code ? if its okay
2reason2kill is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2011 , 15:48   Re: why does i get this errors?
Reply With Quote #7

Quote:
Originally Posted by 2reason2kill View Post
thnx can u trash this so no 1 can get my code ? if its okay
It's the internet, it's too late. Besides, if someone really wanted it they would just do it themselves, if they can't do it themselves then they have poor code so they won't get far with it.
__________________
fysiks is online now
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:30.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode