Cerere modificare VIP

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Puyol
Membru, skill 0
Membru, skill 0
Posts: 76
Joined: 08 May 2018, 13:46
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

24 Mar 2020, 10:53

Salut , am incercat sa compilez acest plugin
| Afiseaza codul
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <engine>
#include <fakemeta>
#include <csx>

static const PLUGIN[] 	= "Classic VIP-FIROGINAL.RO"
static const AUTHOR[] 	= "Jică Măcelaru'"
static const VERSION[]	= "7.1"

#define VIP_LEVEL_ACCES ADMIN_LEVEL_F

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP     ( 1 << 2 )

#define REMOVE_FLAGS "r"

new const RMaps[][] = 
{
	"35hp",
	"35hp_2",
	"31hp",
	"1hp",
	"100hp"
};

new const Float: g_flCoords[][] = 
{
	{ 0.50, 0.40 },
	{ 0.56, 0.44 },
	{ 0.60, 0.50 },
	{ 0.56, 0.56 },
	{ 0.50, 0.60 },
	{ 0.44, 0.56 },
	{ 0.40, 0.50 },
	{ 0.44, 0.44 }
};

new const g_szBeginning[ ] = "Membrii VIP";

const PRIMARY_WEAPONS_BIT_SUM = (1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90);
const SECONDARY_WEAPONS_BIT_SUM = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);

new round[33] = 0,
	jumpnum[33], 
	bool: dojump[33], 
	SyncHudMessage,
	g_iPosition[33],
	g_iSize,
	g_szMessage[256],
	bool:use[33];
	
new cvar_vip_mode,
	cvar_vip_tag, 
	cvar_vip_start_hp, 
	cvar_vip_start_ap,
	cvar_vip_start_money,
	cvar_vip_jump,
	cvar_vip_hp_kill, 
	cvar_vip_ap_kill, 
	cvar_vip_hp_hs,
	cvar_vip_ap_hs, 
	cvar_vip_hp_kill_k, 
	cvar_vip_ap_kill_k, 
	cvar_vip_hp_hs_k, 
	cvar_vip_ap_hs_k,
	cvar_vip_bulletdmg,
	cvar_vip_model,
	cvar_vip_in_out,
	cvar_vip_showC, 
	cvar_vip_showH, 
	cvar_vip_maxmoney, 
	cvar_vip_maxap, 
	cvar_vip_maxhp,
	cvar_vip_parachute;

public plugin_init(){
	register_plugin(PLUGIN, VERSION, AUTHOR);
	register_cvar("VipClasicFglRo", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
		
	register_clcmd("say /vip", "vip_info");
	register_clcmd("say", "say_vmenu");
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");
	
	cvar_vip_mode = register_cvar("vip_mode", "1");	
	cvar_vip_tag = register_cvar("vip_tag", "VIP");
	cvar_vip_start_hp = register_cvar("vip_start_hp", "150");
	cvar_vip_start_ap = register_cvar("vip_start_ap", "180");
	cvar_vip_start_money = register_cvar("vip_start_money", "8000");
	cvar_vip_jump = register_cvar("vip_jump", "1" );
	cvar_vip_hp_kill = register_cvar("vip_hp_kill", "5");	
	cvar_vip_ap_kill = register_cvar("vip_ap_kill", "5");
	cvar_vip_hp_hs = register_cvar("vip_hp_hs", "10");	
	cvar_vip_ap_hs = register_cvar("vip_ap_hs", "10");
	cvar_vip_hp_kill_k = register_cvar("vip_hp_kill_knife", "15");	
	cvar_vip_ap_kill_k = register_cvar("vip_ap_kill_knife", "15");
	cvar_vip_hp_hs_k = register_cvar("vip_hp_hs_knife", "20");	
	cvar_vip_ap_hs_k = register_cvar("vip_ap_hs_knife", "20");
	cvar_vip_bulletdmg = register_cvar("vip_bulletdmg", "1");
	cvar_vip_model = register_cvar("vip_model", "1");
	cvar_vip_in_out = register_cvar("vip_in_out", "1");
	cvar_vip_showC = register_cvar("vip_show_chat", "1");
	cvar_vip_showH = register_cvar("vip_show_hud", "1");
	cvar_vip_maxhp = register_cvar("vip_maxhp", "180");
	cvar_vip_maxap = register_cvar("vip_maxap", "200");
	cvar_vip_maxmoney = register_cvar("vip_maxmoney", "16000");
	cvar_vip_parachute = register_cvar("vip_parachute", "1");

	register_message(get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib");	
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);	

	set_task(300.0, "mesaj_info", _, _, _, "b");
	set_task(1.0, "TaskDisplayVips", _, _, _, "b", 0);
	
	SyncHudMessage = CreateHudSyncObj();
	g_iSize = sizeof(g_flCoords);
	
	register_event("HLTV", "newRound", "a", "1=0", "2=0");
	register_event("ResetHUD", "resetModel", "b");
        return 0;
}

public newRound()
{
	for(new i = 0; i < 32; i++)
	{
		use = false;
	}
}

public vip_menu(id)
{
	if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES) || use[id])
		return 1;
	
	new menu;
	switch(cs_get_user_team(id))
	{
		case CS_TEAM_T:
		{
			menu = menu_create("\y[\rVIP Classic\y] \wMeniu \yVIP", "menu_ammunition");
			menu_additem(menu, "Ak47+Deagle+Set grenăzi", "1");
			menu_additem(menu, "Galil+Deagle+Set grenăzi", "2");
			menu_additem(menu, "Awp+Deagle+Set grenăzi", "3");
		}
		
		case CS_TEAM_CT:
		{
			menu = menu_create("\y[\rVIP Classic\y] \wMeniu \yVIP", "menu_ammunition");
			menu_additem(menu, "M4a1+Deagle+Set grenăzi", "1");
			menu_additem(menu, "Famas+Deagle+Set grenăzi", "2");
			menu_additem(menu, "Awp+Deagle+Set grenăzi", "3");
		}
	}
	
	menu_display(id, menu, 0);
	return 1;
}

public menu_ammunition (id, menu, item)
{
	if(item == MENU_EXIT)
		return 1;

	new access, callback, data[6], szName[64], tag[32];
	menu_item_getinfo(menu, item, access, data,charsmax(data), szName,charsmax(szName), callback);
	get_pcvar_string(cvar_vip_tag, tag, charsmax(tag));
	new key = str_to_num(data);
		
	if(cs_get_user_team(id) == CS_TEAM_T)
	{
		switch(key)
		{
			case 1:
			{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_ak47");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_AK47, 90);
				cs_set_user_bpammo(id, CSW_DEAGLE, 35);
				client_print_color(id, print_team_default, "^1(^3%s^1) Ai ales ^4Ak47^1+^4Deagle^1+^4Set grenazi^1.", tag);
				use[id] = true;
			}   
			
			case 2:
			{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_galil");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_GALIL, 90);
				cs_set_user_bpammo(id, CSW_DEAGLE, 35);
				client_print_color(id, print_team_default, "^1(^3%s^1) Ai ales ^4Galil^1+^4Deagle^1+^4Set grenazi^1.", tag);
				use[id] = true;
			}
			
			case 3:
			{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_awp");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				give_item(id, "weapon_smokegrenade");
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_AWP, 30);
				cs_set_user_bpammo(id, CSW_DEAGLE, 35);
				client_print_color(id, print_team_default, "^1(^3%s^1) Ai ales ^4Awp^1+^4Deagle^1+^4Set grenazi^1.", tag);
				use[id] = true;
			}      
		}
	}
	
	if(cs_get_user_team(id) == CS_TEAM_CT)
	{
		switch(key)
		{
			case 1:
			{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");	
				give_item(id, "weapon_m4a1");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_M4A1, 90);
				cs_set_user_bpammo(id, CSW_DEAGLE, 35);
				client_print_color(id, print_team_default, "^1(^3%s^1) Ai ales ^4M4a1^1+^4Deagle^1+^4Set grenazi^1.", tag);
				use[id] = true;
			}
			
			case 2:
			{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_famas");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_FAMAS, 90);
				cs_set_user_bpammo(id, CSW_DEAGLE, 35);
				client_print_color(id, print_team_default, "^1(^3%s^1) Ai ales ^4Famas^1+^4Deagle^1+^4Set grenazi^1.", tag);
				use[id] = true;
			}
			
			case 3:
			{
				drop_weapons(id, 1);
				drop_weapons(id, 2);
				give_item(id, "weapon_knife");
				give_item(id, "weapon_awp");
				give_item(id, "weapon_deagle");
				give_item(id, "weapon_hegrenade");
				give_item(id, "weapon_flashbang");
				cs_set_user_bpammo(id, CSW_HEGRENADE, 1);
				cs_set_user_bpammo(id, CSW_FLASHBANG, 2);
				cs_set_user_bpammo(id, CSW_AWP, 30);
				cs_set_user_bpammo(id, CSW_DEAGLE, 35);
				client_print_color(id, print_team_default, "^1(^3%s^1) Ai ales ^4Awp^1+^4Deagle^1+^4Set grenazi^1.", tag);
				use[id] = true;
			}      
		}
	}
	
	menu_destroy(menu);
	return 1;  
}

public Spawn(id)
{ 
	if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_mode) == 2)
	{
		if(round[id] >= 2) 
			vip_menu(id);
		
		round[id]++;	
	}
	
	give_item(id, "item_assaultsuit");
	set_user_health(id, get_pcvar_num(cvar_vip_start_hp));
	set_user_armor(id, get_pcvar_num(cvar_vip_start_ap));
	cs_set_user_money(id, cs_get_user_money(id) + get_pcvar_num(cvar_vip_start_money));
	
	new VIP_MAXMONEY = get_pcvar_num(cvar_vip_maxmoney);
	new VIP_MONEY = cs_get_user_money(id);
	
	if(VIP_MONEY >= VIP_MAXMONEY)
	{
		cs_set_user_money(id, get_pcvar_num(cvar_vip_maxmoney));
	}	
	
	new MapName[32]; 
	get_mapname(MapName, sizeof(MapName));
	for (new i = 0; i < sizeof (RMaps); i ++)
	{
		if(equali (MapName, RMaps))
		{
			remove_user_flags (id, read_flags(REMOVE_FLAGS));
		}
	}
	
	return 1;
}

public client_putinserver(id)
{
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	set_task(2.0, "in", id);
	
	jumpnum[id] = 0;
	dojump[id] = false;
	round[id] = 0;
	use[id] = false;	
	
	return 1;
}

public client_disconnected(id)
{
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	set_task(2.0, "out", id);
	
	jumpnum[id] = 0;
	dojump[id] = false;
	round[id] = 0;
	use[id] = false;
	
	return 1;
}

public client_PreThink(id)
{
	if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES)) 
		return 1;
		
	new Float:fallspeed = 100.0 * -1.0
	new BUTTON = get_user_button(id);
	new OLDBUTON = get_user_oldbutton(id);
	new JUMP_VIP = get_pcvar_num(cvar_vip_jump);

	if((BUTTON & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(OLDBUTON & IN_JUMP))
	{
		if(jumpnum[id] < JUMP_VIP)
		{
			dojump[id] = true;
			jumpnum[id]++
		}
	}

	if((BUTTON & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
	{
		jumpnum[id] = 0;
	}
	
	
	if(get_pcvar_num(cvar_vip_parachute) == 1)
	{
		if(BUTTON & IN_USE) 
		{
			new Float:velocity[3];
			entity_get_vector(id, EV_VEC_velocity, velocity);
		
			if(velocity[2] < 0.0) 
			{
				entity_set_int(id, EV_INT_sequence, 3);
				entity_set_int(id, EV_INT_gaitsequence, 1);
				entity_set_float(id, EV_FL_frame, 1.0);
				entity_set_float(id, EV_FL_framerate, 1.0);

				velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed;
				entity_set_vector(id, EV_VEC_velocity, velocity);
			}
		}
	}
	
	return 0;
}

public client_PostThink(id)
{
	if(!is_user_alive(id)) 
		return 1;
		
	if(dojump[id] == true)
	{
		new Float: velocity[3];
		entity_get_vector(id, EV_VEC_velocity, velocity)
		velocity[2] = random_float(265.0, 285.0);
		entity_set_vector(id, EV_VEC_velocity, velocity)
		dojump[id] = false;
	}

	return 0;
}

public client_death(killer, victim, weapon, hitplace)
{
	if(!(get_user_flags(killer) & VIP_LEVEL_ACCES)) 
		return 1;
		
	new VIP_MAXHP = get_pcvar_num(cvar_vip_maxhp);
	new VIP_HP = get_user_health(killer);
	new VIP_MAXAP = get_pcvar_num(cvar_vip_maxap);
	new VIP_AP = get_user_armor(killer);
	
	if((killer != victim) && !(hitplace == HIT_HEAD) && !(weapon == CSW_HEGRENADE) && !(weapon == CSW_KNIFE))
	{
		if(VIP_HP >= VIP_MAXHP)
		{
			set_user_health(killer, get_pcvar_num(cvar_vip_maxhp));
		}
		
		else
		{
			set_user_health(killer, get_user_health(killer) + get_pcvar_num(cvar_vip_hp_kill));
		}
	
		if(VIP_AP >= VIP_MAXAP)
		{
			set_user_armor(killer, get_pcvar_num(cvar_vip_maxap));
		}
		
		else
		{
			set_user_armor(killer, get_user_armor(killer) + get_pcvar_num(cvar_vip_ap_kill));
		}
	}
	
	if(hitplace == HIT_HEAD && !(weapon == CSW_KNIFE))
	{
		if(VIP_HP >= VIP_MAXHP)
		{
			set_user_health(killer, get_pcvar_num(cvar_vip_maxhp));
		}
		
		else
		{
			set_user_health(killer, get_user_health(killer) + get_pcvar_num(cvar_vip_hp_hs));
		}
	
		if(VIP_AP >= VIP_MAXAP)
		{
			set_user_armor(killer, get_pcvar_num(cvar_vip_maxap));
		}
		
		else
		{
			set_user_armor(killer, get_user_armor(killer) + get_pcvar_num(cvar_vip_ap_hs));
		}
	}
	
	if(weapon == CSW_KNIFE && !(hitplace == HIT_HEAD))
	{
		if(VIP_HP >= VIP_MAXHP)
		{
			set_user_health(killer, get_pcvar_num(cvar_vip_maxhp));
		}
		
		else
		{
			set_user_health(killer, get_user_health(killer) + get_pcvar_num(cvar_vip_hp_kill_k));
		}
	
		if(VIP_AP >= VIP_MAXAP)
		{
			set_user_armor(killer, get_pcvar_num(cvar_vip_maxap));
		}
		
		else
		{
			set_user_armor(killer, get_user_armor(killer) + get_pcvar_num(cvar_vip_ap_kill_k));
		}
	}
	
	if(weapon == CSW_KNIFE && (hitplace == HIT_HEAD))
	{
		if(VIP_HP >= VIP_MAXHP)
		{
			set_user_health(killer, get_pcvar_num(cvar_vip_maxhp));
		}
		
		else
		{
			set_user_health(killer, get_user_health(killer) + get_pcvar_num(cvar_vip_hp_hs_k));
		}
	
		if(VIP_AP >= VIP_MAXAP)
		{
			set_user_armor(killer, get_pcvar_num(cvar_vip_maxap));
		}
		
		else
		{
			set_user_armor(killer, get_user_armor(killer) + get_pcvar_num(cvar_vip_ap_hs_k));
		}
	}
	
	return 1;
}

public client_damage(iAttacker, iVictim, iDamage)
{
	if(!(get_user_flags(iAttacker) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_bulletdmg) == 1)
	{
		if(++g_iPosition[iAttacker] == g_iSize)
			g_iPosition[iAttacker] = 0;
	
		set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), Float: g_flCoords[g_iPosition[iAttacker]][0], Float: g_flCoords[g_iPosition[iAttacker]][1], 0, 0.1, 2.5, 0.02, 0.02);
		show_dhudmessage(iAttacker, "%i", iDamage);
	}
	
	return 1;
}

public in(id)
{
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_in_out) == 1)
	{
		new tag[32], name[32];

		get_pcvar_string(cvar_vip_tag, tag, charsmax(tag)); 
		get_user_name(id, name, charsmax(name)); 

		client_print_color(0, print_team_default, "^1(^3%s^1) VIP: ^4%s ^1s-a conectat.", tag, name); 
		return 1;
	}
	
	return 1;
}	

public out(id)
{
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return 1;
		
	if(get_pcvar_num(cvar_vip_in_out) == 1)
	{
		new tag[32], name[32];

		get_pcvar_string(cvar_vip_tag, tag, charsmax(tag)); 
		get_user_name(id, name, charsmax(name)); 
		
		client_print_color(0, print_team_default, "^1(^3%s^1) VIP: ^4%s ^1s-a deconectat.", tag, name); 

		return 1;
	}
	
	return 1;
}

public vip_info(id) show_motd(id, "/addons/amxmodx/configs/vip_info.html");

public mesaj_info()
{
	new tag[32];
	get_pcvar_string(cvar_vip_tag, tag, charsmax(tag));
	
	client_print_color(0, print_team_default, "^1(^3%s^1) Tastati in chat ^4/vip ^1pentru a vedea beneficiile si pretul vip-ului.", tag);
}

public TaskDisplayVips()
{
	if(get_pcvar_num(cvar_vip_showH) == 1)
	{
		static iPlayers[32];
		static iPlayersNum;
	
		get_players(iPlayers, iPlayersNum, "ch");
		if(!iPlayersNum)
			return 1;
	
		static iVipsConnected, szVipsNames[128], szName[32];
		formatex(szVipsNames, sizeof (szVipsNames) -1, "");
		iVipsConnected = 0;
	
		static id, i;
		for(i = 0; i < iPlayersNum; i++)
		{
			id = iPlayers;
			if(get_user_flags(id) & VIP_LEVEL_ACCES)
			{
				get_user_name(id, szName, sizeof(szName) -1);
				
				add(szVipsNames, sizeof(szVipsNames) -1, szName);
				add(szVipsNames, sizeof(szVipsNames) -1, "^n");
				
				iVipsConnected++;
			}	
		}
	
		formatex(g_szMessage, sizeof(g_szMessage) -1, "%s (%i)^n%s", g_szBeginning, iVipsConnected, szVipsNames);
		
		set_hudmessage(25, 255, 25, 0.01, 0.25, 0, 0.0, 1.0, 0.1, 0.1, -1);
		ShowSyncHudMsg(0, SyncHudMessage, g_szMessage);
	}
	return 0;	
}

public handle_say(id)
{
	new said[192];
	read_args(said,192);
	if(contain(said, "/vips") != -1)
	
	set_task(0.1,"print_adminlist",id);
	
	return 0;
}

public say_vmenu(id)
{
	new said[192];
	read_args(said,192);
	if(get_pcvar_num(cvar_vip_mode) == 1)
	{
		if(contain(said, "/vmenu") != -1)	
			set_task(0.1, "vip_menu", id);
	}
	return 0;
}

public resetModel(id, level, cid)
{
	if(!is_user_alive(id) || !(get_user_flags(id) & VIP_LEVEL_ACCES) || get_pcvar_num(cvar_vip_model) == 0)
	   return 1;	

	new CsTeams:userTeam = cs_get_user_team(id)
	if(userTeam == CS_TEAM_T)
		cs_set_user_model(id, "vip_tero")
	else if(userTeam == CS_TEAM_CT) 
		cs_set_user_model(id, "vip_ct")
	else
		cs_reset_user_model(id)

	client_cmd(id, "cl_minmodels 0");
	
	return 1;
}

public plugin_precache()
{
	precache_model("models/player/vip_tero/vip_tero.mdl");
	precache_model("models/player/vip_ct/vip_ct.mdl");
}

public print_adminlist(user)
{
	if(get_pcvar_num(cvar_vip_showC) == 1)
	{
		new tag[32];
		get_pcvar_string(cvar_vip_tag, tag, charsmax(tag));
	
		new adminnames[33][32];
		new message[256];
		new id, count, x, len;

		for(id = 1 ; id <= get_maxplayers() ; id++)
			if(is_user_connected(id))
				if(get_user_flags(id) & VIP_LEVEL_ACCES)
					get_user_name(id, adminnames[count++], charsmax(adminnames[ ]));
    
		len = format(message, 255, "^1(^3%s^1) VIP-ii online sunt:^4 " ,tag);
		if(count > 0)
		{
			for(x = 0 ; x < count ; x++)
			{
				len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"");
				if(len > 96)
				{
					print_message(user, message);
					len = format(message, 255, " ");
				}
			}
			
			print_message(user, message);
		}
		
		else
		{ 
			client_print_color(0, print_team_default, "^1(^3%s^1) Nu sunt ^4VIP^1-i online.", tag);
		}			
	}
	return 0;  
}

print_message(id, msg[])
{
	message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id);
	write_byte(id);
	write_string(msg);
	message_end();
}

public MessageScoreAttrib(iMsgID, iDest, iReceiver)
{
    new iPlayer = get_msg_arg_int(1);
    if(is_user_connected(iPlayer) && (get_user_flags(iPlayer) & VIP_LEVEL_ACCES))
	{
        set_msg_arg_int(2, ARG_BYTE, is_user_alive(iPlayer) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD);
    }
}

stock fm_find_ent_by_owner(entity, const classname[], owner)
{
	while((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {  }
	return entity;
}

stock drop_weapons(id, dropwhat)
{
	static Weapons[32], Num, i, WeaponID;
	Num = 0;
	get_user_weapons(id, Weapons, Num);
	for(i = 0; i < Num; i ++)
	{
		WeaponID = Weapons;
		if((dropwhat == 1 && ((1 << WeaponID) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1 << WeaponID) & SECONDARY_WEAPONS_BIT_SUM )))
		{
			static DropName[32], WeaponEntity;
			get_weaponname(WeaponID, DropName, charsmax(DropName));
			WeaponEntity = fm_find_ent_by_owner(-1, DropName, id);
			set_pev(WeaponEntity, pev_iuser1, cs_get_user_bpammo (id, WeaponID));
			engclient_cmd(id, "drop", DropName);
			cs_set_user_bpammo(id, WeaponID, 0);
		}
	}
}

si imi da aceste erori in compilare
| Afiseaza codul
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2013 ITB CompuPhase, AMX Mod X Team

include\fakemeta_const.inc(551) : warning 201: redefinition of constant/macro (symbol "TraceResult")
vip_fioriginal.sma(192) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(209) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(226) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(249) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(266) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(283) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(542) : error 017: undefined symbol "set_dhudmessage"
vip_fioriginal.sma(543) : error 017: undefined symbol "show_dhudmessage"
vip_fioriginal.sma(561) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(580) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(595) : error 017: undefined symbol "client_print_color"
vip_fioriginal.sma(717) : error 017: undefined symbol "client_print_color"

12 Errors.
Could not locate output file vip_fioriginal.amx (compile failed).
Last edited by trekA on 27 Mar 2020, 22:14, edited 1 time in total.
Reason: Mutat la Modificare 1.6
eXtreamSHOP
User avatar
N3v3rM1nd
Membru, skill 0
Membru, skill 0
Posts: 86
Joined: 06 Oct 2018, 13:41
Detinator Steam: Da
CS Status: Just a simple guy :P
Detinator server CS: As vrea eu xD
SteamID: Da
Fond eXtream: 0
Location: Constanta
Has thanked: 15 times
Contact:

25 Mar 2020, 12:09

Asta e cateogorie de CSGO , nu cs 1.6
judokanul94
Membru, skill 0
Membru, skill 0
Posts: 44
Joined: 08 Apr 2012, 16:37
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Detinator server CS: Zmp.Ruls.Ro
Has thanked: 1 time
Contact:

26 Mar 2020, 18:52

Si eu sunt interesat de acest plugin si am aceleasi erori. ne poate ajuta cineva ?
...va asigur ca greselile ortografice, ortoepice, de punctuatie, morfosintactice si folosirea inadecvata a unitatilor lexico-semantice imi apartin, mi le asum, dar la scoala sa stiti ca tot nu ma duc!
Post Reply

Return to “Modificari pluginuri”

  • Information