VIP GOLD [FURIEN]

Pluginuri facute de utilizatorii forumului eXtream.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
LNd #
Membru, skill 0
Membru, skill 0
Posts: 84
Joined: 07 Sep 2017, 22:33
Detinator Steam: Da
SteamID: eXeDLL [1337]
Fond eXtream: 0
Has thanked: 2 times
Been thanked: 3 times
Contact:

21 Jan 2020, 22:05

Descriere: Plugin cu arme GOLD pentru VIP [Pentru serverele mod FURIEN]

Descarcare:

Code: Select all

#pragma compress 1

#include < amxmodx >
#include < amxmisc >
#include < fakemeta_util > 
#include < hamsandwich >
#include < cstrike >
#include < fun >

#define PLUGIN "Furien Weapon's Gold"
#define VERSION "1.1"
#define AUTHOR "Legends"

new bool:Ak47Gold[ 33 ],  M4a1Gold[ 33 ], DeagleGold[33],  AwpGold[33],  AidjaOarma[33];

new const Ak47Gold_v_Model[ 66 ] = "models/FurienVIP/v_ak47Gold.mdl";
new const M4a1Gold_v_Model[ 66 ] = "models/FurienVIP/v_m4a1Gold.mdl";
new const DeagleGold_v_Model[ 66 ] = "models/FurienVIP/v_deagleGold.mdl";
new const AWPGold_v_Model[ 66 ] = "models/FurienVIP/v_awpGold.mdl";

new goldak, goldm4, golddeagle, goldawp, flag, menuak, menum4, menuawp, menudeagle;

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_clcmd("say /vmenu","ClcmdWeapons");
	
	RegisterHam(Ham_Spawn, "player", "Inceput_runda", 1);
	register_event( "CurWeapon", "Event_CurWeapon", "be", "1=1");
	RegisterHam(Ham_TakeDamage, "player", "Damage_Weapons");
	
	goldak = register_cvar("gold_ak","2.5");
	goldm4 = register_cvar("gold_m4","2.5");
	golddeagle = register_cvar("gold_deagle","3.0");
	goldawp = register_cvar("gold_awp","4.0");
	menuak = register_cvar("gmenu_ak","1");
	menum4 = register_cvar("gmenu_m4","1");
	menuawp = register_cvar("gmenu_awp","1");
	menudeagle =register_cvar("gmenu_deagle","1");
	flag = register_cvar("acces_vip","r");	
}

public ClcmdWeapons(id) 
{
	new szFlag[16];
	get_pcvar_string(flag, szFlag, charsmax(szFlag));

	if(AidjaOarma[id]) 
	{
		ChatColor(id, "!g[V.I.P] !tTi-ai ales arma deja runda asta!");
		return PLUGIN_HANDLED;
	}
	if(get_user_team(id) == 2 && has_flag(id, szFlag))
	{
		VipMenu(id);
	}
	return PLUGIN_HANDLED;
}

public Inceput_runda(id) 
{
	AidjaOarma[id] = false;
	Ak47Gold[id] = false;
	M4a1Gold[id] = false;
	AwpGold[id] = false;
	DeagleGold[id] = false;

	new szFlag[16];
	get_pcvar_string(flag, szFlag, charsmax(szFlag));

	if(get_user_team(id) == 2 && has_flag(id, szFlag))
	{
		ChatColor(id, "!g[V.I.P] !nPentru a deschide meniul !gV.I.P, !ntasteaza !g/vmenu!");
	}
}

public VipMenu(id) 
{
	if(is_user_alive(id) && get_user_team(id) == 2) 
	{
		new menu = menu_create ("V.I.P's Menu", "CaseVipMenu")
		if(get_pcvar_num(menuak) && get_pcvar_num(menudeagle))
		{
			menu_additem(menu, "Ak47 Gold + Deagle Gold", "1");
		}
		else if(get_pcvar_num(menuak))
		{
			menu_additem(menu, "Ak47 Gold + Deagle Default", "1");
		}

		if(get_pcvar_num(menum4) && get_pcvar_num(menudeagle))
		{
			menu_additem(menu, "M4A1 Gold + Deagle Gold", "2");
		}
		else if(get_pcvar_num(menum4))
		{
			menu_additem(menu, "M4A1 Gold + Deagle Default", "2");
		}

		if(get_pcvar_num(menuawp) && get_pcvar_num(menudeagle))
		{
			menu_additem(menu, "AWP Gold + Deagle Gold", "3");
		}
		else if(get_pcvar_num(menuawp))
		{
			menu_additem(menu, "AWP Gold + Deagle Default", "3");
		}
		
		menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
		menu_display(id, menu, 0 );
	}
}

public CaseVipMenu(id, menu, item) 
{
	if(item == MENU_EXIT || !is_user_alive(id) || get_user_team(id) != 2)
 	{
		menu_destroy(menu);
		return PLUGIN_HANDLED;
	}
	
	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: 
		{
			strip_user_weapons(id);
        		give_item(id, "weapon_knife");
			give_item(id, "weapon_ak47");
			cs_set_user_bpammo(id, CSW_AK47,250);
			set_pev(id, pev_viewmodel2, Ak47Gold_v_Model)
			AidjaOarma[id] = true;
			Ak47Gold[id] = true;
			if(get_pcvar_num(menudeagle))
			{
				give_item(id, "weapon_deagle");
				cs_set_user_bpammo(id, CSW_DEAGLE, 50);
				set_pev(id, pev_viewmodel2, DeagleGold_v_Model)
				DeagleGold[id] = true;
			}
			else
			{
				give_item(id, "weapon_deagle");
				cs_set_user_bpammo(id, CSW_DEAGLE, 50);
			}
		}
		case 2: 
		{
			strip_user_weapons(id);
        		give_item(id, "weapon_knife");
			give_item(id, "weapon_m4a1");
			cs_set_user_bpammo(id, CSW_M4A1,250);
			set_pev(id, pev_viewmodel2, M4a1Gold_v_Model)
			AidjaOarma[id] = true;
			M4a1Gold[id] = true;
			if(get_pcvar_num(menudeagle))
			{
				give_item(id, "weapon_deagle");
				cs_set_user_bpammo(id, CSW_DEAGLE, 50);
				set_pev(id, pev_viewmodel2, DeagleGold_v_Model)
				DeagleGold[id] = true;
			}
			else 
			{
				give_item(id, "weapon_deagle");
				cs_set_user_bpammo(id, CSW_DEAGLE, 50);
			}
		}
		case 3: 
		{
			strip_user_weapons(id);
        		give_item(id, "weapon_knife");
			give_item(id, "weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP,250);
			set_pev(id, pev_viewmodel2, AWPGold_v_Model)
			AidjaOarma[id] = true;
			AwpGold[id] = true;
			if(get_pcvar_num(menudeagle))
			{
				give_item(id, "weapon_deagle");
				cs_set_user_bpammo(id, CSW_DEAGLE, 50);
				set_pev(id, pev_viewmodel2, DeagleGold_v_Model)
				DeagleGold[id] = true;
			}
			else
			{
				give_item(id, "weapon_deagle");
				cs_set_user_bpammo(id, CSW_DEAGLE, 50);
			}
		}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;
}

public plugin_precache() 
{
	precache_model(Ak47Gold_v_Model)
	precache_model(M4a1Gold_v_Model)
	precache_model(DeagleGold_v_Model)
	precache_model(AWPGold_v_Model)
}

public Event_CurWeapon(id)  
{
	new Arma = read_data(2)
	
	if(Arma == CSW_AK47 && Ak47Gold[id]) 
	{
		set_pev(id, pev_viewmodel2, Ak47Gold_v_Model)
	}
	
	if(Arma == CSW_M4A1 && M4a1Gold[id]) 
	{
		set_pev(id, pev_viewmodel2, M4a1Gold_v_Model)
	}
	
	if(Arma == CSW_DEAGLE && DeagleGold[id]) 
	{
		set_pev(id, pev_viewmodel2, DeagleGold_v_Model)
	}
	
	if(Arma == CSW_AWP && AwpGold[id]) 
	{
		set_pev(id, pev_viewmodel2, AWPGold_v_Model)
	}
}

public Damage_Weapons(Victim, Inflictor, Attacker, Float:Damage, DamageType) 
{
	if(is_user_connected(Attacker) && is_user_alive(Attacker) && is_user_connected(Victim)) 
	{
		if(get_user_weapon(Attacker) == CSW_AK47 || get_user_weapon(Attacker) == CSW_M4A1 || get_user_weapon(Attacker) == CSW_AWP || get_user_weapon(Attacker) == CSW_DEAGLE) 
		{
			if(Ak47Gold[Attacker])
			SetHamParamFloat(4, Damage * get_pcvar_float(goldak));

			if(M4a1Gold[Attacker])
			SetHamParamFloat(4, Damage * get_pcvar_float(goldm4));

			if(DeagleGold[Attacker])
			SetHamParamFloat(4, Damage * get_pcvar_float(golddeagle));

			if(AwpGold[Attacker])
			SetHamParamFloat(4, Damage * get_pcvar_float(goldawp));
		}
	}
	return HAM_IGNORED;
}

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"); // Green Color
	replace_all(msg, 190, "!n", "^1"); // Default Color
	replace_all(msg, 190, "!t", "^3"); // Team Color
	replace_all(msg, 190, "!t2", "^0"); // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch"); {
		for (new i = 0; i < count; i++) {
			if (is_user_connected(players[i])) {
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1048\\ f0\\ fs16 \n\\ par }
*/
Nume: GOLD VIP
Versiune: 1.1
Link oficial: aici


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

Code: Select all

	goldak = register_cvar("gold_ak","2.5"); 	// seteaza dmg-ul la ak
	goldm4 = register_cvar("gold_m4","2.5");		// seteaza dmg-ul la m4
	golddeagle = register_cvar("gold_deagle","3.0");	// seteaza dmg-ul la deagle
	goldawp = register_cvar("gold_awp","4.0");	// seteaza dmg-ul la awp
	menuak = register_cvar("gmenu_ak","1");	// daca apare sau nu ak in meniu
	menum4 = register_cvar("gmenu_m4","1");	// daca apare sau nu m4 in meniu
	menuawp = register_cvar("gmenu_awp","1");	// daca apare sau nu awp in meniu
	menudeagle =register_cvar("gmenu_deagle","1");	// daca apare sau nu deagle in meniu (acesta va fi inlocuit cu deagle default.)
	flag = register_cvar("acces_vip","r"); // flagul vip
Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg):



Imagini: -
https://steamcommunity.com/id/eXe1337eXe -> Pentru pluginuri/probleme (Gratis AMXX / 5/10/15 euro SMA)
eXtreamSHOP
User avatar
L E V I N
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 2841
Joined: 24 Aug 2011, 11:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Has thanked: 38 times
Been thanked: 433 times
Contact:

21 Jan 2020, 22:27

ai combinat și tu plugine de pe net și te-ai pus autor...
AidjaOarma , Inceput_runda
apelezi unele chestii aiurea de tot..puteai face un stock sau un bit, pentru a verifica dacă e vip/are acces, e în echipa x/în viață, switch

is_user_connected(Attacker) && is_user_alive(Attacker) && is_user_connected(Victim) - eu aș fi verificat dacă e în viața victima și atacatorul conectat...
Nu fac nimic contra cost! Faceți cerere bine detaliată aici, pe forum. Nu-mi mai dați add pe Steam doar pentru a mă avea în lista de prieteni.
Am cont și activez doar aici! Aveți grijă la cei ce încearcă să mă copieze..Puteți lua legătura cu mine dacă aveți o problemă/nelămurire în acest caz.
În cazul în care utilizați ceva din addonsurile postate de mine aici, e bine să fiți la curent cu modificările aduse unor plugine, aici.
whoo
Membru, skill 0
Membru, skill 0
Posts: 9
Joined: 22 Jan 2020, 00:45
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0

03 Feb 2020, 16:14

Frumos.
Post Reply

Return to “Pluginuri eXtream”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests