Furien: Weapons Menu

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

User avatar
*BoOoM*
Membru eXtream
Membru eXtream
Posts: 2042
Joined: 15 Jul 2014, 01:25
Detinator Steam: Da
CS Status: O dau prin praf :-j
Detinator server CS: Furien.BingBang.Ro
SteamID: booom_cs
Fond eXtream: 0
Been thanked: 2 times
Contact:

02 Mar 2015, 22:36

Descriere: Acest plugin este un meniu de arme care apare la spawn, contine 2 meniuri: Playeri si VIP, la playeri sunt 5 arme (diferite skin-uri) iar la vip tot 5 arme [Gold, aceleasi ca la playeri(dmg dublu)]. Va puteti alege doar o arma pe runda :D in cazul in care apasati pe o tasta [ex: "0"] si va disparea meniu' scrieti in chat "/weapons" si va reaparea.
Descarcare: GirlShare ; ZippyShare
.SMA +Knife Default | Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

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

#pragma semicolon 1

#define VIP_FLAG ADMIN_LEVEL_H

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: 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: ArmaChoosen[33];

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

public Spawn(id)
	{
	if(is_user_alive(id))
		{
		give_item(id, "weapon_knife");
		ArmaChoosen[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_CT)
			{
			MenuArme(id);
		}
	}
}

public plugin_precache()
	{
	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)
	{
	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 MenuArme(id)
	{
	new menu = menu_create ("\rNume\w.\yNume\w.\rRo \yWeapons \rMenu", "CaseMenu");
	
	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 CaseMenu(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:
		{
			{
				MenuPlayeri(id);
			}
		}
		
		case 2:
		{
			if( get_user_flags( id ) & VIP_FLAG )
				{
				MenuVIP(id);
			}
			
			else
			{
				ChatColor(id, "!g[Furien Weapons]!nAceste arme pot fi luate doar de membri !gVIP");
				MenuArme(id);
			}
		}
	}
	
	menu_destroy (menu);
	return 1;
}
public MenuPlayeri(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;
	}
	if(!is_user_alive(id))
		{
		ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
		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:
		{
			ArmaChoosen[id] = true;
			Arma1[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gM4A1");
		}
		case 2:
		{
			ArmaChoosen[id] = true;
			Arma2[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gAk47");
		}
		case 3:
		{
			ArmaChoosen[id] = true;
			Arma3[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gMP5");
		}
		case 4:
		{
			ArmaChoosen[id] = true;
			Arma4[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gXM1014");
		}
		case 5:
		{
			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 MenuVIP(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;
	}
	if(!is_user_alive(id))
		{
		ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
		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:
		{
			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:
		{
			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:
		{
			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:
		{
			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:
		{
			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(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 DamageArme (iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
	{
	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 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
	replace_all(msg, 190, "!t", "^3"); // CT-Albastru ; T-Rosu
	replace_all(msg, 190, "!t2", "^0"); // CT-Albastru2 ; T-Rosu2
	
	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();
			}
		}
	}
}


Nume: Furien: Weapons Menu
Versiune: 1.0
Link oficial: http://www.extreamcs.com

Instalare:
1. Fisierul furien_weapons.sma il puneti in addons/amxmodx/scripting
2. Fisierul furien_weapons.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code: Select all

furien_weapons.amxx
4. Alti pasi necesari....

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):
-

Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator):
-

Comenzi publice (se tasteaza in joc prin apasarea tastei Y):
  • /weapons - afiseaza meniul
Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):
- CStrike
- Fun
- Amxmodx
- Fekemeta
- hamsandwich
Imagini | Afiseaza codul
Image
Image
Image
Tutorial Editare | Afiseaza codul
Am trecut in sursa "Arma1 ; arma2,etc.. | ArmaGold1 ; ArmaGold2,etc.. pentru a nu fi editate in functie de numele armei... Acestea sunt asezate consecutiv in meniu, adica arma1,etse prima arma din meniu si asa mai departe..
Ce trebuie sa editati daca vreti sa schimbati vre'o arma/model..:

1.Daca vreti sa schimbati doar modelul modificati aceasta linie: [ex: la prima arma(primul din meniu)]
[code]new const Arma1Model[66] = "models/furienweapons/v_m4a1.mdl";[/code]
in:
[code]new const Arma1Model[66] = "models/furienweapons/nume_model.mdl";;[/code]
Adica in loc de "v_m4a1" (.mdl il lasati) puneti numele modelului DVS (cel nou). :)

2. Daca vreti sa schimbati atat modelul cat si arma..:
2.1 Faceti primul pas ! [1.]
2.2 Modificati linia urmatoare: [ex: tot la prima arma]
[code]menu_additem(menu, "\yM4A1", "1");[/code]
in:
[code]menu_additem(menu, "\yNume", "1");[/code]
in loc de "M4A1" puneti numele armei respective.
2.3 Daca ati modificat [2.2] Atunci va trebui sa modificati inca o linie din:
[code]ChatColor(id, "!g[Furien Weapons] !nAi ales !gM4A1");[/code]
in:
[code]ChatColor(id, "!g[Furien Weapons] !nAi ales !gNume");[/code]
iarasi in loc de "M4A1" puneti numele armei. :)
2.4 Cautati publicul "GiveWeapon" si modificam din:  [acum schimbam prima arma]
[code]if(Arma1[id]) {
		give_item(id, "weapon_m4a1");
		cs_set_user_bpammo(id, CSW_M4A1, 250);
	}[/code]
in: [sa luam arma Galil]
[code]if(Arma1[id]) {
		give_item(id, "weapon_galil");
		cs_set_user_bpammo(id, CSW_GALIL, 250);
	}[/code]
2.5 "250" sunt gloantele, daca puneti "100" va avea 100 :) [in plus, nu in incarcator]
2.6 Cautam publicul "CurentWeapon" si modificam din: [Luam tot arma Galil]
[code]        if(Arma1[id] && get_user_weapon(id) == CSW_M4A1 )
		set_pev(id, pev_viewmodel2, Arma1Model);
[/code]
in:
[code]        if(Arma1[id] && get_user_weapon(id) == CSW_GALIL )
		set_pev(id, pev_viewmodel2, Arma1Model);
[/code]
2.7 Cautam publicul "DamageArme" si modificam din: [tot arma Galil]
[code]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;
	}[/code]
in:
[code]if(iInflictor == iAttacker && Arma1[iAttacker] && is_user_alive(iAttacker) && get_user_weapon(iAttacker) == CSW_GALIL && cs_get_user_team(iAttacker) == CS_TEAM_CT)
	{
		SetHamParamFloat(4, fDamage * 1.0);
		return HAM_HANDLED;
	}[/code]
2.8 "1.0" e dmg-ul, punem "2.0" si e dublu, "3.0"etc.. :D

Sper ca ati inteles,bafta !
Last edited by *BoOoM* on 08 Mar 2015, 02:47, edited 3 times in total.
RoyalServer
Rio*
Membru, skill 0
Membru, skill 0
Posts: 62
Joined: 01 Mar 2015, 12:41
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

06 Mar 2015, 18:14

Pe credite sau sunt pe gratis armele?
User avatar
Nubo
Fost moderator
Fost moderator
Posts: 2734
Joined: 11 Jul 2012, 18:45
Detinator Steam: Da
CS Status: [əˈnɒn.ɪ.məs]
Reputatie: Fost scripter eXtreamCS
Fost eXtream Mod
Has thanked: 8 times
Been thanked: 27 times

06 Mar 2015, 18:18

Rio* wrote:Pe credite sau sunt pe gratis armele?
Gratis.
Cand nu merge acest forum sunt online aici:
  • * Skype: nubo_cs
    * Y!M ID: nubo_cs
Rio*
Membru, skill 0
Membru, skill 0
Posts: 62
Joined: 01 Mar 2015, 12:41
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

06 Mar 2015, 18:55

L-am bagat merge foarte bine,dar nu ami mai da lama nici la ct si nici t
User avatar
Nubo
Fost moderator
Fost moderator
Posts: 2734
Joined: 11 Jul 2012, 18:45
Detinator Steam: Da
CS Status: [əˈnɒn.ɪ.məs]
Reputatie: Fost scripter eXtreamCS
Fost eXtream Mod
Has thanked: 8 times
Been thanked: 27 times

06 Mar 2015, 19:17

Rio* wrote:L-am bagat merge foarte bine,dar nu ami mai da lama nici la ct si nici t
E problema la tine. Pluginul nu ia arme de la jucatori.
Cand nu merge acest forum sunt online aici:
  • * Skype: nubo_cs
    * Y!M ID: nubo_cs
Rio*
Membru, skill 0
Membru, skill 0
Posts: 62
Joined: 01 Mar 2015, 12:41
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

06 Mar 2015, 19:35

Nubo wrote:
Rio* wrote:L-am bagat merge foarte bine,dar nu ami mai da lama nici la ct si nici t
E problema la tine. Pluginul nu ia arme de la jucatori.
Ami poti spune ce trebuie sa fac sa-mi apara lama.am bagat adlt wapons si merge ala...Dar mie ami place asta
User avatar
Truth*
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 766
Joined: 11 Oct 2013, 11:08
Detinator Steam: Da
SteamID: Ezeru
Reputatie: Fost moderator ajutator
Membru Club eXtreamCS (4 luni)
Nume anterior: HyperioN.
Scripter eXtreamCS
0.2 / 3
Fond eXtream: 0
Location: Sibiu
Has thanked: 44 times
Been thanked: 122 times

06 Mar 2015, 22:37

| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

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

#pragma semicolon 1

#define VIP_FLAG ADMIN_LEVEL_H

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: 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: ArmaChoosen[33];

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

public Spawn(id)
	{
	if(is_user_alive(id))
		{
		give_item(id, "weapon_knife");
		ArmaChoosen[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_CT)
			{
			MenuArme(id);
		}
	}
}

public plugin_precache()
	{
	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)
	{
	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 MenuArme(id)
	{
	new menu = menu_create ("\rNume\w.\yNume\w.\rRo \yWeapons \rMenu", "CaseMenu");
	
	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 CaseMenu(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:
		{
			{
				MenuPlayeri(id);
			}
		}
		
		case 2:
		{
			if( get_user_flags( id ) & VIP_FLAG )
				{
				MenuVIP(id);
			}
			
			else
			{
				ChatColor(id, "!g[Furien Weapons]!nAceste arme pot fi luate doar de membri !gVIP");
				MenuArme(id);
			}
		}
	}
	
	menu_destroy (menu);
	return 1;
}
public MenuPlayeri(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;
	}
	if(!is_user_alive(id))
		{
		ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
		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:
		{
			ArmaChoosen[id] = true;
			Arma1[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gM4A1");
		}
		case 2:
		{
			ArmaChoosen[id] = true;
			Arma2[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gAk47");
		}
		case 3:
		{
			ArmaChoosen[id] = true;
			Arma3[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gMP5");
		}
		case 4:
		{
			ArmaChoosen[id] = true;
			Arma4[id] = true;
			set_task(0.2, "GiveWeapon", id);
			CurentWeapon(id);
			ChatColor(id, "!g[Furien Weapons] !nAi ales !gXM1014");
		}
		case 5:
		{
			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 MenuVIP(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;
	}
	if(!is_user_alive(id))
		{
		ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
		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:
		{
			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:
		{
			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:
		{
			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:
		{
			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:
		{
			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(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 DamageArme (iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
	{
	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 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
	replace_all(msg, 190, "!t", "^3"); // CT-Albastru ; T-Rosu
	replace_all(msg, 190, "!t2", "^0"); // CT-Albastru2 ; T-Rosu2
	
	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();
			}
		}
	}
}
P.S.: Netestat = Nu am avut timp să mă uit atent peste cod. Deci ceea ce am scris este posibil să fie greşit sau să aibă erori.

If i helped you and you wanna thank me, you can donate at this link : here
This will motivate me to help you in the future.
[If you want a private plugin send me a PM.(No complex plugins please, I am a student and I don't have the time to make those)]
User avatar
*BoOoM*
Membru eXtream
Membru eXtream
Posts: 2042
Joined: 15 Jul 2014, 01:25
Detinator Steam: Da
CS Status: O dau prin praf :-j
Detinator server CS: Furien.BingBang.Ro
SteamID: booom_cs
Fond eXtream: 0
Been thanked: 2 times
Contact:

06 Mar 2015, 22:46

Acum ar trebui sa-l dea :D
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <hamsandwich>
#include <fun>

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

#pragma semicolon 1

#define VIP_FLAG ADMIN_LEVEL_H

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: 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: ArmaChoosen[33];

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

public Spawn(id)
{
	if(is_user_alive(id))
                give_knife(id);
	{
		ArmaChoosen[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_CT)
		{
			MenuArme(id);
		}
	}
}

public plugin_precache()
{
        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)
{
        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 MenuArme(id)
{
	new menu = menu_create ("\rNume\w.\yNume\w.\rRo \yWeapons \rMenu", "CaseMenu");
	
        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 CaseMenu(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:
		{
			{
				MenuPlayeri(id);
			}
		}
		
		case 2:
		{
			if( get_user_flags( id ) & VIP_FLAG )
			{
				MenuVIP(id);
			}
			
			else
			{
				ChatColor(id, "!g[Furien Weapons]!nAceste arme pot fi luate doar de membri !gVIP");
				MenuArme(id);
			}
		}
	}
	
	menu_destroy (menu);
	return 1;
}
public MenuPlayeri(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;
	}
        if(!is_user_alive(id))
	{
	        ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
	        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:
			{
				ArmaChoosen[id] = true;
				Arma1[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gM4A1");
			}
                case 2:
		        {
				ArmaChoosen[id] = true;
				Arma2[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gAk47");
			}
                case 3:
			{
				ArmaChoosen[id] = true;
				Arma3[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gMP5");
			}
                case 4:
			{
				ArmaChoosen[id] = true;
				Arma4[id] = true;
                                set_task(0.2, "GiveWeapon", id);
				CurentWeapon(id);
				ChatColor(id, "!g[Furien Weapons] !nAi ales !gXM1014");
			}
                case 5:
			{
				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 MenuVIP(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;
	}
        if(!is_user_alive(id))
	{
		ChatColor(id, "!g[Furien Weapons] !nNu-ti poti alege arma atunci când esti mort");
		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:
			{
				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:
			{
				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:
			{
				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:
			{
				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:
			{
				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(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 DamageArme (iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits)
{
        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 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 give_knife(index)
{
   if (!is_user_connected(index))
      return PLUGIN_HANDLED;
   
   give_item(index, "weapon_knife");
   
   return PLUGIN_CONTINUE;
}

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
        replace_all(msg, 190, "!t", "^3"); // CT-Albastru ; T-Rosu
        replace_all(msg, 190, "!t2", "^0"); // CT-Albastru2 ; T-Rosu2
       
        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();
                        }
                }
        }
}


Edit: scuze Truth, am dat pe "new topic" inainte sa postezi, de aceea nu am observat ca iai dat tu :))
User avatar
dRaGoNeLy^ ;x
Membru, skill +3
Membru, skill +3
Posts: 1430
Joined: 27 Jun 2014, 15:42
Detinator Steam: Da
CS Status: PR0 Than Y0U!
Detinator server CS: Nu.
SteamID: PM!
Reputatie: Castigator Membru Club eXtream @ Mos Nicolae (doua luni)
Fost Membru Club eXtreamCS (patru luni)
Fond eXtream: 0
Location: București
Has thanked: 23 times
Been thanked: 13 times
Contact:

06 Mar 2015, 23:11

Frumos plugin! La mai multe!
Dar de ce nu ai facut asa ?

Code: Select all

new const MODELS[][] =
{
"v_golden_model.mdl"; // modelul cu numarul '0'
"p_golden_model.mdl"; // modelul cu numarul '1'
}
Si la set_pev.

Code: Select all

set_pev(id, pev_viewmodel2, MODELS[0]) // se aplica modelul 'v_golden_model.mdl'
set_pev(id, pev_weaponmodel2, MODELS[1]) // se aplica modelul P
Succes in continuare
Image
User avatar
*BoOoM*
Membru eXtream
Membru eXtream
Posts: 2042
Joined: 15 Jul 2014, 01:25
Detinator Steam: Da
CS Status: O dau prin praf :-j
Detinator server CS: Furien.BingBang.Ro
SteamID: booom_cs
Fond eXtream: 0
Been thanked: 2 times
Contact:

06 Mar 2015, 23:17

@dRaGoNeLy^ ;x Multumesc frumos ! Daca dai pagina inapoi o sa mai gasesti 2 plugin-uri, unul de knife si unul "AIO" si weapons si knife, principalul a fost "AIO" si a fost facut la cerere, iar cine la vrut nu dorea si p_model, doar v_ :D iar eu le-am si impartit pentru ca alti poate le vor separat :)
User avatar
dRaGoNeLy^ ;x
Membru, skill +3
Membru, skill +3
Posts: 1430
Joined: 27 Jun 2014, 15:42
Detinator Steam: Da
CS Status: PR0 Than Y0U!
Detinator server CS: Nu.
SteamID: PM!
Reputatie: Castigator Membru Club eXtream @ Mos Nicolae (doua luni)
Fost Membru Club eXtreamCS (patru luni)
Fond eXtream: 0
Location: București
Has thanked: 23 times
Been thanked: 13 times
Contact:

06 Mar 2015, 23:23

Nu e vorba de P_ sau V_, eu iti dadeam un exemplu sa nu mai scrii mereu new, new, new, new
Image
User avatar
*BoOoM*
Membru eXtream
Membru eXtream
Posts: 2042
Joined: 15 Jul 2014, 01:25
Detinator Steam: Da
CS Status: O dau prin praf :-j
Detinator server CS: Furien.BingBang.Ro
SteamID: booom_cs
Fond eXtream: 0
Been thanked: 2 times
Contact:

06 Mar 2015, 23:25

dRaGoNeLy^ ;x wrote:Nu e vorba de P_ sau V_, eu iti dadeam un exemplu sa nu mai scrii mereu new, new, new, new
aaa, pai eu asa am invatat + tot una e.. :) mersi oricum :D
Post Reply

Return to “Pluginuri eXtream”

  • Information