Page 1 of 1

Problema Furien

Posted: 03 Jul 2015, 16:32
by Mr.Wenk
Am bagat un plugin de arme si knife... Am Observat ca la Ct nu le da Arme Secundare (Pistoale)..
Acesta e pluginu care L-am bagat":

https://www.google.ro/url?sa=t&rct=j&q= ... aST9lSATJg

Ce pot S-a Fac sa imi dea automat un deagle la inceputul rundei..?

Re: Problema Furien

Posted: 04 Aug 2015, 18:33
by IonutJrrBoOoM
Poftim e un plugin facut de DaNNe. care o sa ati rezolve problema
| Afiseaza codul
#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "Spawn Weapons"
#define AUTHOR "DaNNe."
#define VERSION "1.0"

new Items[][] = {
	"weapon_knife",
	"weapon_hegrenade",
	"weapon_flashbang",
	"weapon_smokegrenade"
}

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_Spawn, "player", "Ham_Spawn_Post", 1)
}
	
public Ham_Spawn_Post(id) {
	if(is_user_connected(id)) {
		for(new i = 0; i < sizeof Items; i++)
			fm_give_item(id, Items)
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/

Re: Problema Furien

Posted: 04 Aug 2015, 18:40
by *BoOoM*
| Afiseaza codul
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

new const PLUGIN[] = "Furien Weapons CT&T";
new const VERSION[] = "1.0";
new const AUTHOR[] = "*BoOoM*";

#pragma semicolon 1

#define VIP_FLAG ADMIN_LEVEL_H

new const Knife1Model[66] = "models/furienknife/v_lava_knife.mdl";
new const Knife2Model[66] = "models/furienknife/v_karambit_knife.mdl";
new const Knife3Model[66] = "models/furienknife/v_wolverin_knife.mdl";
new const Knife4Model[66] = "models/furienknife/v_neon_knife.mdl";
new const Knife5Model[66] = "models/furienknife/v_celurit_knife.mdl";

new const KnifeGold1Model[66] = "models/furienknife/v_default_goldknife.mdl";
new const KnifeGold2Model[66] = "models/furienknife/v_hilius_goldknife.mdl";
new const KnifeGold3Model[66] = "models/furienknife/v_axe_goldknife.mdl";

new const Arma1Model[66] = "models/furienweapons/v_m4a1.mdl";
new const Arma2Model[66] = "models/furienweapons/v_ak47.mdl";
new const Arma3Model[66] = "models/furienweapons/v_mp5.mdl";
new const Arma4Model[66] = "models/furienweapons/v_xm1014.mdl";
new const Arma5Model[66] = "models/furienweapons/v_m3.mdl";

new const ArmaGold1Model[66] = "models/furienweapons/v_goldenm4a1.mdl";
new const ArmaGold2Model[66] = "models/furienweapons/v_goldenak47.mdl";
new const ArmaGold3Model[66] = "models/furienweapons/v_goldenmp5.mdl";
new const ArmaGold4Model[66] = "models/furienweapons/v_goldenxm1014.mdl";
new const ArmaGold5Model[66] = "models/furienweapons/v_goldenm3.mdl";

new bool: Knife1[33];
new bool: Knife2[33];
new bool: Knife3[33];
new bool: Knife4[33];
new bool: Knife5[33];

new bool: KnifeGold1[33];
new bool: KnifeGold2[33];
new bool: KnifeGold3[33];

new bool: Arma1[33];
new bool: Arma2[33];
new bool: Arma3[33];
new bool: Arma4[33];
new bool: Arma5[33];

new bool: ArmaGold1[33];
new bool: ArmaGold2[33];
new bool: ArmaGold3[33];
new bool: ArmaGold4[33];
new bool: ArmaGold5[33];

new bool: KnifeChoosen[33];
new bool: ArmaChoosen[33];

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	register_clcmd("say /knife","SayKnife");
        register_clcmd("say /weapons","SayArme");
	
	register_event("CurWeapon", "CurentWeapon", "be", "1=1");
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);
	RegisterHam(Ham_TakeDamage, "player", "DamageKnifeandWeapons");	
}

public Spawn(id)
{
	if(is_user_alive(id))
	{
		KnifeChoosen[id] = false;
		ArmaChoosen[id] = false;

		Knife1[id] = false;
		Knife2[id] = false;
		Knife3[id] = false;
                Knife4[id] = false;
                Knife5[id] = false;

		KnifeGold1[id] = false;
		KnifeGold2[id] = false;
		KnifeGold3[id] = false;

                Arma1[id] = false;
		Arma2[id] = false;
                Arma3[id] = false;
                Arma4[id] = false;
                Arma5[id] = false;

		ArmaGold1[id] = false;
		ArmaGold2[id] = false;
                ArmaGold3[id] = false;
                ArmaGold4[id] = false;
                ArmaGold5[id] = false;
		
		if(cs_get_user_team(id) == CS_TEAM_T)
		{
			MenuKnife(id);
		}
                else if(cs_get_user_team(id) == CS_TEAM_CT)
		{
                        give_item(id, "weapon_deagle");
                        cs_set_user_bpammo(id, CSW_DEAGLE,250);
			MenuArme(id);
		}
	}
}

public plugin_precache()
{
	precache_model(Knife1Model);
	precache_model(Knife2Model);
	precache_model(Knife3Model);
        precache_model(Knife4Model);
        precache_model(Knife5Model);
	
	precache_model(KnifeGold1Model);	
        precache_model(KnifeGold2Model);
	precache_model(KnifeGold3Model);

        precache_model(Arma1Model);
	precache_model(Arma2Model);
        precache_model(Arma3Model);
        precache_model(Arma4Model);
        precache_model(Arma5Model);

	precache_model(ArmaGold1Model);
	precache_model(ArmaGold2Model);
        precache_model(ArmaGold3Model);
        precache_model(ArmaGold4Model);
        precache_model(ArmaGold5Model);
}

public client_disconnect(id)
{
	Knife1[id] = false;
	Knife2[id] = false;
	Knife3[id] = false;
        Knife4[id] = false;
        Knife5[id] = false;
	
	KnifeGold1[id] = false;
	KnifeGold2[id] = false;
	KnifeGold3[id] = false;

        Arma1[id] = false;
	Arma2[id] = false;
        Arma3[id] = false;
        Arma4[id] = false;
        Arma5[id] = false;

	ArmaGold1[id] = false;
	ArmaGold2[id] = false;
        ArmaGold3[id] = false;
        ArmaGold4[id] = false;
        ArmaGold5[id] = false;
}

public MenuKnife(id)
{
	new menu = menu_create ("\rNume\w.\yNume\w.\rRo \yKnife \rMenu", "CaseKnifeMenu");
	
        menu_additem(menu, "\yPlayer \rKnife", "1");
	menu_additem(menu, "\yV\w.\yI\w.\yP \rKnife", "2");
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0 );
	
	return 1; 
}

public CaseKnifeMenu(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:
		{
			{
				MenuKnifePlayeri(id);
			}
		}
		
		case 2:
		{
			if( get_user_flags( id ) & VIP_FLAG )
			{
				MenuKnifeVIP(id);
			}
			
			else
			{
				ChatColor(id, "!g[Furien Knife]!nAcest meniu poate fi accesat doar de membri !gVIP");
				MenuKnife(id);
			}
		}
	}
	
	menu_destroy (menu);
	return 1;
}
public MenuKnifePlayeri(id)
{
	new menu = menu_create ("\yFurien \rPlayer \yKnife \rMenu", "CaseKnifePlayeri");
	menu_additem(menu, "\yLava \rKnife", "1");
	menu_additem(menu, "\yKarambit \rKnife", "2");
	menu_additem(menu, "\yWolverin \rKnife", "3");
        menu_additem(menu, "\yNeon \rKnife", "4");
        menu_additem(menu, "\yCelurit \rKnife", "5");
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0 );
	
	return 1; 
}

public CaseKnifePlayeri(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(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife] !nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				Knife1[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi Ales !gLava Knife");
			}
		}
		
		case 2:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife] !nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				Knife2[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi Ales !gKarambit Knife");
			}
		}
		
		case 3:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife]!nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				Knife3[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi ales !gWolverin Knife");
			}
		}
                case 4:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife]!nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
                                Knife4[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi ales !gNeon Knife");
			}
		}
                case 5:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife] !nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				Knife5[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi ales !gCelurit Knife");
			}
		}
	}
	
	menu_destroy (menu);
	return 1;
}


public MenuKnifeVIP(id)
{
	new menu = menu_create ("\yFurien \rVIP \yKnife \rMenu", "CaseKnifeVIP");
	menu_additem(menu, "\wDefault \yGold \rKnife", "1");
	menu_additem(menu, "\wHilius \yGold \rKnife ", "2");
	menu_additem(menu, "\wAxe \yGold \rKnife", "3");
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0 );
	
	return 1; 
}

public CaseKnifeVIP(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(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife] !nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				KnifeGold1[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi ales !gKnife Gold");
			}
		}
		
		case 2:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife] !nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				KnifeGold2[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi ales !gHilius Gold");
			}
		}
		
		case 3:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Knife] !nNu poti alege cutitul atunci când esti mort");
				return 1;
			}
			
			else
			{
				KnifeChoosen[id] = true;
				KnifeGold3[id] = true;
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Knife] !nAi ales !gAxe Gold");
			}
		}
                
	}
	
	menu_destroy (menu);
	return 1;
}

public MenuArme(id)
{
	new menu = menu_create ("\rNume\w.\yNume\w.\rRo \yWeapons \rMenu", "CaseWeaponsMenu");
	
        menu_additem(menu, "\rArme \yPlayeri", "1");
	menu_additem(menu, "\rArme \yV\w.\yI\w.\yP", "2");
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0 );
	
	return 1; 
}

public CaseWeaponsMenu(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:
		{
			{
				MenuWeaponsPlayeri(id);
			}
		}
		
		case 2:
		{
			if( get_user_flags( id ) & VIP_FLAG )
			{
				MenuWeaponsVIP(id);
			}
			
			else
			{
				ChatColor(id, "!g[Furien Weapons]!nAceste arme pot fi luate doar de membri !gVIP");
				MenuArme(id);
			}
		}
	}
	
	menu_destroy (menu);
	return 1;
}
public MenuWeaponsPlayeri(id)
{
	new menu = menu_create ("\rFurien Player \yWeapons Menu", "CaseArmePlayeri");

	menu_additem(menu, "\yM4A1", "1");
        menu_additem(menu, "\yAk47", "2");
        menu_additem(menu, "\yMP5", "3");
        menu_additem(menu, "\yXM1014", "4");
        menu_additem(menu, "\yM3", "5");
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0 );
	
	return 1; 
}

public CaseArmePlayeri(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(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				Arma1[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gM4A1");
			}
		}
                case 2:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				Arma2[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gAk47");
			}
		}
                case 3:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				Arma3[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gMP5");
			}
		}
                case 4:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				Arma4[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gXM1014");
			}
		}
                case 5:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				Arma5[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gM3");
			}
		}
		
	}
	
	menu_destroy (menu);
	return 1;
}


public MenuWeaponsVIP(id)
{
	new menu = menu_create ("\rFurien VIP \yWeapons Menu", "CaseArmeVIP");

        menu_additem(menu, "\yGolden \rM4A1", "1");
	menu_additem(menu, "\yGolden \rAk47", "2");
        menu_additem(menu, "\yGolden \rMP5", "3");
        menu_additem(menu, "\yGolden \rXM1014", "4");
        menu_additem(menu, "\yGolden \rM3", "5");
	
	menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
	menu_display(id, menu, 0 );
	
	return 1; 
}

public CaseArmeVIP(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(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				ArmaGold1[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gM4A1 Gold");
			}
		}
                case 2:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				ArmaGold2[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gAk47 Gold");
			}
		}
                case 3:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				ArmaGold3[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gMP5 Gold");
			}
		}
                case 4:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				ArmaGold4[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gXM1014 Gold");
			}
		}
                case 5:
		{
			if(!is_user_alive(id))
			{
				ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
				return 1;
			}
			
			else
			{
				ArmaChoosen[id] = true;
				ArmaGold5[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gM34 Gold");
			}
		}
		
                
	}
	
	menu_destroy (menu);
	return 1;
}

public GiveWeapon(id) {
        if(Arma1[id]) {
		give_item(id, "weapon_m4a1");
		cs_set_user_bpammo(id, CSW_M4A1, 250);
	}
	if(Arma2[id]) {
		give_item(id, "weapon_ak47");
		cs_set_user_bpammo(id, CSW_AK47, 250);
        }
        if(Arma3[id]) {
		give_item(id, "weapon_mp5navy");
		cs_set_user_bpammo(id, CSW_MP5NAVY, 250);
	}
        if(Arma4[id]) {
		give_item(id, "weapon_xm1014");
		cs_set_user_bpammo(id, CSW_XM1014, 250);
        }
        if(Arma5[id]) {
		give_item(id, "weapon_m3");
		cs_set_user_bpammo(id, CSW_M3, 250);
        }

	if(ArmaGold1[id]) {
		give_item(id, "weapon_m4a1");
		cs_set_user_bpammo(id, CSW_M4A1, 250);
	}
	if(ArmaGold2[id]) {
		give_item(id, "weapon_ak47");
		cs_set_user_bpammo(id, CSW_AK47, 250);
	}
        if(ArmaGold3[id]) {
		give_item(id, "weapon_mp5navy");
		cs_set_user_bpammo(id, CSW_MP5NAVY, 250);
	}
        if(ArmaGold4[id]) {
		give_item(id, "weapon_xm1014");
		cs_set_user_bpammo(id, CSW_XM1014, 250);
        }
        if(ArmaGold5[id]) {
		give_item(id, "weapon_m3");
		cs_set_user_bpammo(id, CSW_M3, 250);
        }
}

public CurentWeapon(id)
{
	if(Knife1[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, Knife1Model);
	
	if(Knife2[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, Knife2Model);
	
	if(Knife3[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, Knife3Model);

        if(Knife4[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, Knife4Model);

        if(Knife5[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, Knife5Model);
	
	if(KnifeGold1[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, KnifeGold1Model);
	
	if(KnifeGold2[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, KnifeGold2Model);
	
	if(KnifeGold3[id] && get_user_weapon(id) == CSW_KNIFE)
		set_pev(id, pev_viewmodel2, KnifeGold3Model);


        if(Arma1[id] && get_user_weapon(id) == CSW_M4A1 )
		set_pev(id, pev_viewmodel2, Arma1Model);
	
	if(Arma2[id] && get_user_weapon(id) == CSW_AK47 )
		set_pev(id, pev_viewmodel2, Arma2Model);

        if(Arma3[id] && get_user_weapon(id) == CSW_MP5NAVY )
		set_pev(id, pev_viewmodel2, Arma3Model);

        if(Arma4[id] && get_user_weapon(id) == CSW_XM1014 )
		set_pev(id, pev_viewmodel2, Arma4Model);

        if(Arma5[id] && get_user_weapon(id) == CSW_M3 )
		set_pev(id, pev_viewmodel2, Arma5Model);

	if(ArmaGold1[id] && get_user_weapon(id) == CSW_M4A1 )
		set_pev(id, pev_viewmodel2, ArmaGold1Model);
	
	if(ArmaGold2[id] && get_user_weapon(id) == CSW_AK47 )
		set_pev(id, pev_viewmodel2, ArmaGold2Model);

        if(ArmaGold3[id] && get_user_weapon(id) == CSW_MP5NAVY )
		set_pev(id, pev_viewmodel2, ArmaGold3Model);

        if(ArmaGold4[id] && get_user_weapon(id) == CSW_XM1014 )
		set_pev(id, pev_viewmodel2, ArmaGold4Model);

        if(ArmaGold5[id] && get_user_weapon(id) == CSW_M3 )
		set_pev(id, pev_viewmodel2, ArmaGold5Model);
}

public DamageKnifeandWeapons (iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
{
	if(iInflictor == iAttacker && Knife1[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && Knife2[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && Knife3[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
        if(iInflictor == iAttacker && Knife4[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}

        if(iInflictor == iAttacker && Knife5[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && KnifeGold1[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 4.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && KnifeGold2[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 4.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && KnifeGold3[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_KNIFE && cs_get_user_team(iAttacker) == CS_TEAM_T)
	{
		SetHamParamFloat(4, fDamage * 4.0);
		return HAM_HANDLED;
	}


        if(iInflictor == iAttacker && Arma1[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_M4A1 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 1.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && Arma2[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_AK47 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 1.0);
		return HAM_HANDLED;
	}

        if(iInflictor == iAttacker && Arma3[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_MP5NAVY && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 1.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && Arma4[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_XM1014 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 1.0);
		return HAM_HANDLED;
	}

        if(iInflictor == iAttacker && Arma5[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_M3 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 1.0);
		return HAM_HANDLED;
	}

	if(iInflictor == iAttacker && ArmaGold1[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_M4A1 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && ArmaGold2[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_AK47 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}

        if(iInflictor == iAttacker && ArmaGold3[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_MP5NAVY && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
	
	if(iInflictor == iAttacker && ArmaGold4[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_XM1014 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}

        if(iInflictor == iAttacker && ArmaGold5[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_M3 && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 2.0);
		return HAM_HANDLED;
	}
	return HAM_IGNORED;
}

public SayKnife(id)
{
	if(KnifeChoosen[id]) 
	{
		ChatColor(id, "!g[Furien Knife] !nAti ales deja un cutit în aceasta runda");
		return;
	}
	
	if(cs_get_user_team(id) == CS_TEAM_T) 
	{
		MenuKnife(id);
	}
}

public SayArme(id)
{
	if(ArmaChoosen[id]) 
	{
		ChatColor(id, "!g[Furien Weapons] !nAti ales deja o arma în aceasta runda");
		return;
	}
	
	if(cs_get_user_team(id) == CS_TEAM_CT) 
	{
		MenuArme(id);
	}
}

stock ChatColor(const id, const input[], any:...)
{
        new count = 1, players[32];
        static msg[191];
        vformat(msg, 190, input, 3);
       
        replace_all(msg, 190, "!g", "^4"); // verde
        replace_all(msg, 190, "!n", "^1"); // galben/alb/negru
        replace_all(msg, 190, "!t", "^3"); // rosu/albastru/gri
        replace_all(msg, 190, "!t2", "^0"); // rosu2/albastru2/gri2
       
        if (id) players[0] = id; else get_players(players, count, "ch");
        {
                for (new i = 0; i < count; i++)
                {
                        if (is_user_connected(players))
                        {
                                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players);
                                write_byte(players);
                                write_string(msg);
                                message_end();
                        }
                }
        }
}

Re: Problema Furien

Posted: 30 Oct 2015, 00:39
by Zeth.
Vezi in config apare undeva wepons si setezi acolo cand sa dea si ce sa dea.. mie mi-a mers