[MODIFICARE VIP] AWP la meniu si restrictie SMOKE

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 01:05

salut,

doresc in meniu de vip sa fie si AWP

1. M4A1
2. AK47
3. AWP

am incercat eu ceva dar nu merge ;))

si sa nu fie SMOKE la vip. doar 2x flash si 1x HE si daca se poate sa arate dmg in timp real, gen si prin perete daca il ating sa arate dmg.

SMA:
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>

#define Keysrod (1<<0)|(1<<1)|(1<<9)
#define ITEM_HE                (1<<0) // "a" 
#define ITEM_FS                (1<<1) // "b" 
#define ITEM_SG                (1<<2) // "c" 
#define ITEM_DG                (1<<3) // "d" 
#define ITEM_VH                (1<<4) // "e"
#define ITEM_DF                (1<<5) // "f"
#define ITEM_NV                (1<<6) // "g"

new jumpnum[33] = 0
new bool:dojump[33] = false
new hk_File4[ 128 ];
new hk_VipsList[ 128 ][ 32 ], hk_TotalLines;
new hk_IsUserVip[ 33 ];
new hk_viplist[ ] = "vips_list.ini";
new hk_Folder[ ] = "Vip";
new hk_cfg[ ] = "vip-config";
new hk_File[ 128 ];
new hk_File1[ 128 ];
new g_type, g_hudmsg
new vip_hud
new maxplayers
new mpd, mkb, mhb
new health_add
new health_hs_add
new health_max
new hk_Killer
new hk_KillerHp
new hk_HpAdd
new hk_HpMax
new jumps, items
new hk_iRoundCount
new bool:hk_IsRestarting
new gun_menu
new cvardmg

enum
{
	Primary = 1
	, Secondary
	, Knife
	, Grenades
	, C4
};

public plugin_init() 
{
	register_plugin("Vip", "2.2", "Mau")
	
	register_concmd("say /vips", "showAdmin", ADMIN_ALL, "")
	register_concmd("amx_addvips", "addvips", ADMIN_RCON, "<Nume sau SteamID>")
	register_concmd("amx_reloadvips", "relaodvips", ADMIN_RCON, "")
	
	RegisterHam ( Ham_Spawn, "player", "Hook_PlayerSpawn", 1 )
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
	register_event("DeathMsg", "hook_death", "a", "1>0")
	register_event("Damage","Damage","b")
	register_event("DeathMsg","death_msg","a")
	register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
	register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w")
	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	RegisterHam(Ham_TakeDamage, "player", "Ham_CBasePlayer_TakeDamage_Pre") 
	
	register_cvar("vip_maxjumps","1")
	jumps = register_cvar("vip_jumps","1")
	vip_hud = register_cvar("vip_hud","1")
	g_type = register_cvar("vip_bulletdamage","1")
	health_add = register_cvar("vip_hp_kill", "10")
	health_hs_add = register_cvar("vip_hp_hs", "25")
	health_max = register_cvar("vip_hp_max", "100")
	mpd = register_cvar("vip_money_damage","3")
	mkb = register_cvar("vip_money_kill","500")
	mhb = register_cvar("vip_money_hs","1000")
	items = register_cvar("vip_items_round", "abcdefg")
	gun_menu = register_cvar("vip_gun_menu","1")
	cvardmg = register_cvar("vip_damage","2")
	g_hudmsg = CreateHudSyncObj()
	maxplayers = get_maxplayers()
	
	
}

public plugin_cfg()
{	
	
	
	new Dir[ 64 ];
	get_configsdir(Dir,charsmax(Dir));
	formatex ( hk_File, charsmax ( hk_File ), "%s/%s", Dir, hk_Folder );
	formatex ( hk_File1, charsmax ( hk_File1 ), "%s/%s.cfg", hk_File, hk_cfg );
	if(!dir_exists(hk_File))
	mkdir(hk_File);

	formatex ( hk_File4, charsmax ( hk_File4 ), "%s/%s", hk_File, hk_viplist );
	
	if (!file_exists(hk_File4))
	write_file(hk_File4,"; -->VIP List<--");
	
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	if(!file_exists(hk_File1))
	{
	write_file(hk_File1,"// Vip Configuration File")
	write_file(hk_File1,"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// BulletDamage - afiseaza dmg-ul facut unui jucator")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_bulletdamage ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Vips Online")
	write_file(hk_File1,"// Arata Vip-urile online in HUD prin scrierea in chat a comenzii /vips")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_hud ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un kill  ")
	write_file(hk_File1,"vip_hp_kill ^"10^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un hs")
	write_file(hk_File1,"vip_hp_hs ^"25^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Valoarea maxima a hp-ului pe care o poate avea Vip-ul")
	write_file(hk_File1,"vip_hp_max ^"100^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un damage")
	write_file(hk_File1,"vip_money_damage ^"3^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un kill")
	write_file(hk_File1,"vip_money_kill ^"500^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un hs")
	write_file(hk_File1,"vip_money_hs ^"1000^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Guns Menu - afiseaza meniul cu arme")
	write_file(hk_File1,"// Pe hartile de tip AWP, acest meniu va fi automat dezactivat")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_gun_menu ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Items per round - primiti diverse obiecte la inceputul fiecarei runde")
	write_file(hk_File1,"// a - He Grenade")
	write_file(hk_File1,"// b - Flashbang (x2)")
	write_file(hk_File1,"// c - Smoke Grenade ")
	write_file(hk_File1,"// d - Deagle")
	write_file(hk_File1,"// e - Vest + Helm")
	write_file(hk_File1,"// f - Defuse Kit (Doar CT)")
	write_file(hk_File1,"// g - NightVision")
	write_file(hk_File1,"vip_items_round ^"abcdefg^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Jumps - Salturi")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_jumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Cate sarituri in plus poate sa faca deodata")
	write_file(hk_File1,"vip_maxjumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// De cate ori damage-ul jucatorului se mareste indiferent de arma")
	write_file(hk_File1,"// ex: daca este 2, atunci jucatorului i se mareste dmg-ul de 2 ori")
	write_file(hk_File1,"vip_damage ^"2^"")
	write_file(hk_File1,"")
	
	
	}
	
	server_cmd("exec %s",hk_File1)
}

public client_putinserver(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}

public client_disconnect(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}
public addvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32]	
	
	read_argv(1, arg, 31)
	
	new szLog[256];
	formatex(szLog,255,"%s",arg);
	write_file(hk_File4,szLog);
	console_print(id, "[REVENGE] Vip-ul a fost adaugat in lista")
	
	return PLUGIN_HANDLED
	
}

public relaodvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
	return PLUGIN_HANDLED
		
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	console_print(id, "[CS16]Lista de VIP-uri a fost actualizata")	
	
	return PLUGIN_HANDLED
}


public Event_TextMsg_Restart()
{
    hk_IsRestarting = true
}
 
public Event_HLTV_New_Round()
{
    if( hk_IsRestarting )
    {
        hk_IsRestarting = false
        hk_iRoundCount = 0
    }
}

public Hook_PlayerSpawn ( const id )
{
	if ( ! is_user_alive ( id ) )
		return HAM_IGNORED;
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return HAM_IGNORED;
	}
	
	hk_IsUserVip[ id ] = 1;
	hk_iRoundCount++
	new map[32];
	get_mapname(map,31);
	
	if(equali(map, "awp_", 3))
	return HAM_IGNORED;
	
	if (get_pcvar_num(gun_menu) == 1)
	if(hk_iRoundCount>=4)
	Showrod(id);
	
	set_task(0.3, "giveitems", id)
	return HAM_IGNORED;
}

public Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType ) 
{
	if ( ! is_user_vip ( iAttacker ) )
	{
		hk_IsUserVip[ iAttacker ] = 0;
		return HAM_IGNORED;
	}
	hk_IsUserVip[ iAttacker ] = 1;
	
	new dmg1 = get_pcvar_num(cvardmg)
	
	if( iDamageType == DMG_FALL ) 
	SetHamParamFloat(4, flDamage*1)
	else
	SetHamParamFloat(4, flDamage*dmg1)
	
	return HAM_IGNORED
}

public on_damage(id)
{
	if(get_pcvar_num(g_type))
	{
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)	

		if ( is_user_vip ( attacker ) )
		{
			hk_IsUserVip[ id ] = 1;
		
			if(is_user_connected(attacker))
			{
				if(fm_is_ent_visible(attacker,id))
				{
					set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
					ShowSyncHudMsg(attacker, g_hudmsg, "%i^n", damage)				
				}
					
				
			}
		}else hk_IsUserVip[ id ] = 0;
	}
}

public Damage(id)
{
	new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
	if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
	
	if ( is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 1;
		new money = read_data(2) * get_pcvar_num(mpd)
		if(hitpoint==1) money += get_pcvar_num(mhb)
		cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
	}else hk_IsUserVip[ id ] = 0;
}

public death_msg()
{
	if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) 
	cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public hook_death()
{
	hk_Killer = read_data(1)
   
	if ( (read_data(3) == 1) && (read_data(5) == 0) )
	{
		hk_HpAdd = get_pcvar_num (health_hs_add)
	}
	else
	hk_HpAdd = get_pcvar_num (health_add)
	
	hk_HpMax = get_pcvar_num (health_max)
   
   
	if ( ! is_user_vip ( hk_Killer ) )
	{
		hk_IsUserVip[ hk_Killer ] = 0;
		return;
	}
	hk_IsUserVip[ hk_Killer ] = 1;
	
	hk_KillerHp = get_user_health(hk_Killer)
	hk_KillerHp += hk_HpAdd
   
	if (hk_KillerHp > hk_HpMax) hk_KillerHp = hk_HpMax
	set_user_health(hk_Killer, hk_KillerHp)

	set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
	show_hudmessage(hk_Killer, "Healed +%d hp", hk_HpAdd)

}

public showAdmin(id)
{
	if(get_pcvar_num(vip_hud) == 1)
	{
			
		
		new num, iLen, admin
		static pl[32], name[32], szBuff[2048]
	
		get_players(pl, num, "c")
	
		for(new i = 0; i < num; i++)
		{
			if (  is_user_vip ( pl ) )
			{
			hk_IsUserVip[ pl ] = 1;
			get_user_name(pl, name, 31)
			iLen += format(szBuff[iLen], 2048 - iLen, "%d. %s^n", admin + 1, name)
			admin++
			}
			
		}

	
		set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 6.0, 7.0 )
		show_hudmessage(id, " %s online:^n%s", admin > 1 ? "Vips" : "Vips", szBuff)
	
		arrayset(szBuff, 0, 2048)
	}
	return PLUGIN_HANDLED
}

public client_PreThink(id)
{
		if(!is_user_alive(id)) return PLUGIN_CONTINUE
		if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
		if ( ! is_user_vip ( id ) )
		{
			hk_IsUserVip[ id ] = 0;
			return PLUGIN_CONTINUE
		}
	
	
		hk_IsUserVip[ id ] = 1;
		new nbut = get_user_button(id)
		new obut = get_user_oldbutton(id)
		if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
		{
			if(jumpnum[id] < get_cvar_num("vip_maxjumps"))
			{
				dojump[id] = true
				jumpnum[id]++
				return PLUGIN_CONTINUE
			}
		}
		if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
		{
			jumpnum[id] = 0
			return PLUGIN_CONTINUE
		}
	
		return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
	if(!is_user_alive(id)) return PLUGIN_CONTINUE
	if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return PLUGIN_CONTINUE
	}
	
	
	hk_IsUserVip[ id ] = 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 PLUGIN_CONTINUE
	}
	
	return PLUGIN_CONTINUE
}

public Showrod(id) 
{
	show_menu(id, Keysrod, "Guns Menu^n\w1. M4a1^n\w2. AK47^n0. AWP^n3\n3. Exit^n", -1, "rod")
}

public Pressedrod(id, key) 
{
	
	switch (key) {
		case 0: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90 );
			}

		case 1: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90);
			}

                case 2: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_AWP")
			cs_set_user_bpammo(id, CSW_AWP, 90);
			}

		case 9: { 			
			}
		     }
	return PLUGIN_CONTINUE
}

public get_item_flags() 
{ 
	new sFlags[24] 
	get_pcvar_string(items,sFlags,23) 
	return read_flags(sFlags) 
} 

public giveitems(id)
{
		new iFlags = get_item_flags()  
		new CsTeams:userTeam = cs_get_user_team(id)
	
		if (iFlags&ITEM_HE)
		fm_give_item(id,"weapon_hegrenade") 
		
             
		if(iFlags&ITEM_FS)
		{
		fm_give_item(id,"weapon_flashbang") 
		fm_give_item(id,"weapon_flashbang") 
		}
		
		if(iFlags&ITEM_SG)
		fm_give_item(id,"weapon_smokegrenade") 
		
		
		if(iFlags&ITEM_DG)
		{
		StripWeapons(id, Secondary);
		fm_give_item(id,"weapon_deagle") 
		cs_set_user_bpammo(id, CSW_DEAGLE, 35 );
		}
		
		if(iFlags&ITEM_VH)
		fm_give_item(id,"item_assaultsuit")
	
		if(userTeam == CS_TEAM_CT && iFlags&ITEM_DF)
		fm_give_item(id,"item_thighpack")
		
		if(iFlags&ITEM_NV)
		cs_set_user_nvg(id, 1)
		
		
}

stock is_user_vip ( id )
{
	new s_Name[ 32 ], s_AuthID[ 32 ];
	get_user_name ( id, s_Name, 31 );
	get_user_authid ( id, s_AuthID, 31 );
	
	for ( new i; i < hk_TotalLines; i++ )
	{
		if ( ! strcmp ( s_Name, hk_VipsList[ i ] ) )
			return 1;
		if ( ! strcmp ( s_AuthID, hk_VipsList[ i ] ) )
			return 1;
	}
	
	return 0;

}

stock StripWeapons(id, Type, bool: bSwitchIfActive = true)
{
	new iReturn;
	
	if(is_user_alive(id))
	{
		new iEntity, iWeapon;
		while((iWeapon = GetWeaponFromSlot(id, Type, iEntity)) > 0)
			iReturn = ham_strip_user_weapon(id, iWeapon, Type, bSwitchIfActive);
	}
	
	return iReturn;
}

stock GetWeaponFromSlot( id , iSlot , &iEntity )
{
	if ( !( 1 <= iSlot <= 5 ) )
		return 0;
	
	iEntity = 0;
	const m_rgpPlayerItems_Slot0 = 367;
	const m_iId = 43;
	const XO_WEAPONS = 4;
	const XO_PLAYER = 5;
		
	iEntity = get_pdata_cbase( id , m_rgpPlayerItems_Slot0 + iSlot , XO_PLAYER );
	
	return ( iEntity > 0 ) ? get_pdata_int( iEntity , m_iId , XO_WEAPONS ) : 0;
}  

stock ham_strip_user_weapon(id, iCswId, iSlot = 0, bool:bSwitchIfActive = true)
{
	new iWeapon
	if( !iSlot )
	{
		static const iWeaponsSlots[] = {
			-1,
			2, //CSW_P228
			-1,
			1, //CSW_SCOUT
			4, //CSW_HEGRENADE
			1, //CSW_XM1014
			5, //CSW_C4
			1, //CSW_MAC10
			1, //CSW_AUG
			4, //CSW_SMOKEGRENADE
			2, //CSW_ELITE
			2, //CSW_FIVESEVEN
			1, //CSW_UMP45
			1, //CSW_SG550
			1, //CSW_GALIL
			1, //CSW_FAMAS
			2, //CSW_USP
			2, //CSW_GLOCK18
			1, //CSW_AWP
			1, //CSW_MP5NAVY
			1, //CSW_M249
			1, //CSW_M3
			1, //CSW_M4A1
			1, //CSW_TMP
			1, //CSW_G3SG1
			4, //CSW_FLASHBANG
			2, //CSW_DEAGLE
			1, //CSW_SG552
			1, //CSW_AK47
			3, //CSW_KNIFE
			1 //CSW_P90
		}
		iSlot = iWeaponsSlots[iCswId]
	}

	const XTRA_OFS_PLAYER = 5
	const m_rgpPlayerItems_Slot0 = 367

	iWeapon = get_pdata_cbase(id, m_rgpPlayerItems_Slot0 + iSlot, XTRA_OFS_PLAYER)

	const XTRA_OFS_WEAPON = 4
	const m_pNext = 42
	const m_iId = 43

	while( iWeapon > 0 )
	{
		if( get_pdata_int(iWeapon, m_iId, XTRA_OFS_WEAPON) == iCswId )
		{
			break
		}
		iWeapon = get_pdata_cbase(iWeapon, m_pNext, XTRA_OFS_WEAPON)
	}

	if( iWeapon > 0 )
	{
		const m_pActiveItem = 373
		if( bSwitchIfActive && get_pdata_cbase(id, m_pActiveItem, XTRA_OFS_PLAYER) == iWeapon )
		{
			ExecuteHamB(Ham_Weapon_RetireWeapon, iWeapon)
		}

		if( ExecuteHamB(Ham_RemovePlayerItem, id, iWeapon) )
		{
			user_has_weapon(id, iCswId, 0)
			ExecuteHamB(Ham_Item_Kill, iWeapon)
			return 1
		}
	}

	return 0
}
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5137
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 3 times
Been thanked: 46 times

02 Jan 2018, 01:14

awp deja este
| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>

#define Keysrod (1<<0)|(1<<1)|(1<<9)
#define ITEM_HE                (1<<0) // "a" 
#define ITEM_FS                (1<<1) // "b" 
//#define ITEM_SG                (1<<2) // "c" 
#define ITEM_DG                (1<<3) // "d" 
#define ITEM_VH                (1<<4) // "e"
#define ITEM_DF                (1<<5) // "f"
#define ITEM_NV                (1<<6) // "g"

new jumpnum[33] = 0
new bool:dojump[33] = false
new hk_File4[ 128 ];
new hk_VipsList[ 128 ][ 32 ], hk_TotalLines;
new hk_IsUserVip[ 33 ];
new hk_viplist[ ] = "vips_list.ini";
new hk_Folder[ ] = "Vip";
new hk_cfg[ ] = "vip-config";
new hk_File[ 128 ];
new hk_File1[ 128 ];
new g_type, g_hudmsg
new vip_hud
new maxplayers
new mpd, mkb, mhb
new health_add
new health_hs_add
new health_max
new hk_Killer
new hk_KillerHp
new hk_HpAdd
new hk_HpMax
new jumps, items
new hk_iRoundCount
new bool:hk_IsRestarting
new gun_menu
new cvardmg

enum
{
	Primary = 1
	, Secondary
	, Knife
	, Grenades
	, C4
};

public plugin_init() 
{
	register_plugin("Vip", "2.2", "Mau")
	
	register_concmd("say /vips", "showAdmin", ADMIN_ALL, "")
	register_concmd("amx_addvips", "addvips", ADMIN_RCON, "<Nume sau SteamID>")
	register_concmd("amx_reloadvips", "relaodvips", ADMIN_RCON, "")
	
	RegisterHam ( Ham_Spawn, "player", "Hook_PlayerSpawn", 1 )
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
	register_event("DeathMsg", "hook_death", "a", "1>0")
	register_event("Damage","Damage","b")
	register_event("DeathMsg","death_msg","a")
	register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
	register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w")
	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	RegisterHam(Ham_TakeDamage, "player", "Ham_CBasePlayer_TakeDamage_Pre") 
	
	register_cvar("vip_maxjumps","1")
	jumps = register_cvar("vip_jumps","1")
	vip_hud = register_cvar("vip_hud","1")
	g_type = register_cvar("vip_bulletdamage","1")
	health_add = register_cvar("vip_hp_kill", "10")
	health_hs_add = register_cvar("vip_hp_hs", "25")
	health_max = register_cvar("vip_hp_max", "100")
	mpd = register_cvar("vip_money_damage","3")
	mkb = register_cvar("vip_money_kill","500")
	mhb = register_cvar("vip_money_hs","1000")
	items = register_cvar("vip_items_round", "abcdefg")
	gun_menu = register_cvar("vip_gun_menu","1")
	cvardmg = register_cvar("vip_damage","2")
	g_hudmsg = CreateHudSyncObj()
	maxplayers = get_maxplayers()
	
	
}

public plugin_cfg()
{	
	
	
	new Dir[ 64 ];
	get_configsdir(Dir,charsmax(Dir));
	formatex ( hk_File, charsmax ( hk_File ), "%s/%s", Dir, hk_Folder );
	formatex ( hk_File1, charsmax ( hk_File1 ), "%s/%s.cfg", hk_File, hk_cfg );
	if(!dir_exists(hk_File))
	mkdir(hk_File);

	formatex ( hk_File4, charsmax ( hk_File4 ), "%s/%s", hk_File, hk_viplist );
	
	if (!file_exists(hk_File4))
	write_file(hk_File4,"; -->VIP List<--");
	
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	if(!file_exists(hk_File1))
	{
	write_file(hk_File1,"// Vip Configuration File")
	write_file(hk_File1,"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// BulletDamage - afiseaza dmg-ul facut unui jucator")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_bulletdamage ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Vips Online")
	write_file(hk_File1,"// Arata Vip-urile online in HUD prin scrierea in chat a comenzii /vips")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_hud ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un kill  ")
	write_file(hk_File1,"vip_hp_kill ^"10^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un hs")
	write_file(hk_File1,"vip_hp_hs ^"25^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Valoarea maxima a hp-ului pe care o poate avea Vip-ul")
	write_file(hk_File1,"vip_hp_max ^"100^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un damage")
	write_file(hk_File1,"vip_money_damage ^"3^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un kill")
	write_file(hk_File1,"vip_money_kill ^"500^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un hs")
	write_file(hk_File1,"vip_money_hs ^"1000^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Guns Menu - afiseaza meniul cu arme")
	write_file(hk_File1,"// Pe hartile de tip AWP, acest meniu va fi automat dezactivat")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_gun_menu ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Items per round - primiti diverse obiecte la inceputul fiecarei runde")
	write_file(hk_File1,"// a - He Grenade")
	write_file(hk_File1,"// b - Flashbang (x2)")
	write_file(hk_File1,"// c - Smoke Grenade ")
	write_file(hk_File1,"// d - Deagle")
	write_file(hk_File1,"// e - Vest + Helm")
	write_file(hk_File1,"// f - Defuse Kit (Doar CT)")
	write_file(hk_File1,"// g - NightVision")
	write_file(hk_File1,"vip_items_round ^"abcdefg^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Jumps - Salturi")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_jumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Cate sarituri in plus poate sa faca deodata")
	write_file(hk_File1,"vip_maxjumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// De cate ori damage-ul jucatorului se mareste indiferent de arma")
	write_file(hk_File1,"// ex: daca este 2, atunci jucatorului i se mareste dmg-ul de 2 ori")
	write_file(hk_File1,"vip_damage ^"2^"")
	write_file(hk_File1,"")
	
	
	}
	
	server_cmd("exec %s",hk_File1)
}

public client_putinserver(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}

public client_disconnect(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}
public addvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32]	
	
	read_argv(1, arg, 31)
	
	new szLog[256];
	formatex(szLog,255,"%s",arg);
	write_file(hk_File4,szLog);
	console_print(id, "[REVENGE] Vip-ul a fost adaugat in lista")
	
	return PLUGIN_HANDLED
	
}

public relaodvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
	return PLUGIN_HANDLED
		
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	console_print(id, "[CS16]Lista de VIP-uri a fost actualizata")	
	
	return PLUGIN_HANDLED
}


public Event_TextMsg_Restart()
{
    hk_IsRestarting = true
}
 
public Event_HLTV_New_Round()
{
    if( hk_IsRestarting )
    {
        hk_IsRestarting = false
        hk_iRoundCount = 0
    }
}

public Hook_PlayerSpawn ( const id )
{
	if ( ! is_user_alive ( id ) )
		return HAM_IGNORED;
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return HAM_IGNORED;
	}
	
	hk_IsUserVip[ id ] = 1;
	hk_iRoundCount++
	new map[32];
	get_mapname(map,31);
	
	if(equali(map, "awp_", 3))
	return HAM_IGNORED;
	
	if (get_pcvar_num(gun_menu) == 1)
	if(hk_iRoundCount>=4)
	Showrod(id);
	
	set_task(0.3, "giveitems", id)
	return HAM_IGNORED;
}

public Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType ) 
{
	if ( ! is_user_vip ( iAttacker ) )
	{
		hk_IsUserVip[ iAttacker ] = 0;
		return HAM_IGNORED;
	}
	hk_IsUserVip[ iAttacker ] = 1;
	
	new dmg1 = get_pcvar_num(cvardmg)
	
	if( iDamageType == DMG_FALL ) 
	SetHamParamFloat(4, flDamage*1)
	else
	SetHamParamFloat(4, flDamage*dmg1)
	
	return HAM_IGNORED
}

public on_damage(id)
{
	if(get_pcvar_num(g_type))
	{
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)	

		if ( is_user_vip ( attacker ) )
		{
			hk_IsUserVip[ id ] = 1;
		
			if(is_user_connected(attacker))
			{
				if(fm_is_ent_visible(attacker,id))
				{
					set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
					ShowSyncHudMsg(attacker, g_hudmsg, "%i^n", damage)				
				}
					
				
			}
		}else hk_IsUserVip[ id ] = 0;
	}
}

public Damage(id)
{
	new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
	if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
	
	if ( is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 1;
		new money = read_data(2) * get_pcvar_num(mpd)
		if(hitpoint==1) money += get_pcvar_num(mhb)
		cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
	}else hk_IsUserVip[ id ] = 0;
}

public death_msg()
{
	if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) 
	cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public hook_death()
{
	hk_Killer = read_data(1)
   
	if ( (read_data(3) == 1) && (read_data(5) == 0) )
	{
		hk_HpAdd = get_pcvar_num (health_hs_add)
	}
	else
	hk_HpAdd = get_pcvar_num (health_add)
	
	hk_HpMax = get_pcvar_num (health_max)
   
   
	if ( ! is_user_vip ( hk_Killer ) )
	{
		hk_IsUserVip[ hk_Killer ] = 0;
		return;
	}
	hk_IsUserVip[ hk_Killer ] = 1;
	
	hk_KillerHp = get_user_health(hk_Killer)
	hk_KillerHp += hk_HpAdd
   
	if (hk_KillerHp > hk_HpMax) hk_KillerHp = hk_HpMax
	set_user_health(hk_Killer, hk_KillerHp)

	set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
	show_hudmessage(hk_Killer, "Healed +%d hp", hk_HpAdd)

}

public showAdmin(id)
{
	if(get_pcvar_num(vip_hud) == 1)
	{
			
		
		new num, iLen, admin
		static pl[32], name[32], szBuff[2048]
	
		get_players(pl, num, "c")
	
		for(new i = 0; i < num; i++)
		{
			if (  is_user_vip ( pl ) )
			{
			hk_IsUserVip[ pl ] = 1;
			get_user_name(pl, name, 31)
			iLen += format(szBuff[iLen], 2048 - iLen, "%d. %s^n", admin + 1, name)
			admin++
			}
			
		}

	
		set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 6.0, 7.0 )
		show_hudmessage(id, " %s online:^n%s", admin > 1 ? "Vips" : "Vips", szBuff)
	
		arrayset(szBuff, 0, 2048)
	}
	return PLUGIN_HANDLED
}

public client_PreThink(id)
{
		if(!is_user_alive(id)) return PLUGIN_CONTINUE
		if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
		if ( ! is_user_vip ( id ) )
		{
			hk_IsUserVip[ id ] = 0;
			return PLUGIN_CONTINUE
		}
	
	
		hk_IsUserVip[ id ] = 1;
		new nbut = get_user_button(id)
		new obut = get_user_oldbutton(id)
		if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
		{
			if(jumpnum[id] < get_cvar_num("vip_maxjumps"))
			{
				dojump[id] = true
				jumpnum[id]++
				return PLUGIN_CONTINUE
			}
		}
		if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
		{
			jumpnum[id] = 0
			return PLUGIN_CONTINUE
		}
	
		return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
	if(!is_user_alive(id)) return PLUGIN_CONTINUE
	if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return PLUGIN_CONTINUE
	}
	
	
	hk_IsUserVip[ id ] = 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 PLUGIN_CONTINUE
	}
	
	return PLUGIN_CONTINUE
}

public Showrod(id) 
{
	show_menu(id, Keysrod, "Guns Menu^n\w1. M4a1^n\w2. AK47^n0. AWP^n3\n3. Exit^n", -1, "rod")
}

public Pressedrod(id, key) 
{
	
	switch (key) {
		case 0: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90 );
			}

		case 1: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90);
			}

                case 2: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_AWP")
			cs_set_user_bpammo(id, CSW_AWP, 90);
			}

		case 9: { 			
			}
		     }
	return PLUGIN_CONTINUE
}

public get_item_flags() 
{ 
	new sFlags[24] 
	get_pcvar_string(items,sFlags,23) 
	return read_flags(sFlags) 
} 

public giveitems(id)
{
		new iFlags = get_item_flags()  
		new CsTeams:userTeam = cs_get_user_team(id)
	
		if (iFlags&ITEM_HE)
		fm_give_item(id,"weapon_hegrenade") 
		
             
		if(iFlags&ITEM_FS)
		{
		fm_give_item(id,"weapon_flashbang") 
		cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
		}
		
	//	if(iFlags&ITEM_SG)
	//	fm_give_item(id,"weapon_smokegrenade") 
		
		
		if(iFlags&ITEM_DG)
		{
		StripWeapons(id, Secondary);
		fm_give_item(id,"weapon_deagle") 
		cs_set_user_bpammo(id, CSW_DEAGLE, 35 );
		}
		
		if(iFlags&ITEM_VH)
		fm_give_item(id,"item_assaultsuit")
	
		if(userTeam == CS_TEAM_CT && iFlags&ITEM_DF)
		fm_give_item(id,"item_thighpack")
		
		if(iFlags&ITEM_NV)
		cs_set_user_nvg(id, 1)
		
		
}

stock is_user_vip ( id )
{
	new s_Name[ 32 ], s_AuthID[ 32 ];
	get_user_name ( id, s_Name, 31 );
	get_user_authid ( id, s_AuthID, 31 );
	
	for ( new i; i < hk_TotalLines; i++ )
	{
		if ( ! strcmp ( s_Name, hk_VipsList[ i ] ) )
			return 1;
		if ( ! strcmp ( s_AuthID, hk_VipsList[ i ] ) )
			return 1;
	}
	
	return 0;

}

stock StripWeapons(id, Type, bool: bSwitchIfActive = true)
{
	new iReturn;
	
	if(is_user_alive(id))
	{
		new iEntity, iWeapon;
		while((iWeapon = GetWeaponFromSlot(id, Type, iEntity)) > 0)
			iReturn = ham_strip_user_weapon(id, iWeapon, Type, bSwitchIfActive);
	}
	
	return iReturn;
}

stock GetWeaponFromSlot( id , iSlot , &iEntity )
{
	if ( !( 1 <= iSlot <= 5 ) )
		return 0;
	
	iEntity = 0;
	const m_rgpPlayerItems_Slot0 = 367;
	const m_iId = 43;
	const XO_WEAPONS = 4;
	const XO_PLAYER = 5;
		
	iEntity = get_pdata_cbase( id , m_rgpPlayerItems_Slot0 + iSlot , XO_PLAYER );
	
	return ( iEntity > 0 ) ? get_pdata_int( iEntity , m_iId , XO_WEAPONS ) : 0;
}  

stock ham_strip_user_weapon(id, iCswId, iSlot = 0, bool:bSwitchIfActive = true)
{
	new iWeapon
	if( !iSlot )
	{
		static const iWeaponsSlots[] = {
			-1,
			2, //CSW_P228
			-1,
			1, //CSW_SCOUT
			4, //CSW_HEGRENADE
			1, //CSW_XM1014
			5, //CSW_C4
			1, //CSW_MAC10
			1, //CSW_AUG
			4, //CSW_SMOKEGRENADE
			2, //CSW_ELITE
			2, //CSW_FIVESEVEN
			1, //CSW_UMP45
			1, //CSW_SG550
			1, //CSW_GALIL
			1, //CSW_FAMAS
			2, //CSW_USP
			2, //CSW_GLOCK18
			1, //CSW_AWP
			1, //CSW_MP5NAVY
			1, //CSW_M249
			1, //CSW_M3
			1, //CSW_M4A1
			1, //CSW_TMP
			1, //CSW_G3SG1
			4, //CSW_FLASHBANG
			2, //CSW_DEAGLE
			1, //CSW_SG552
			1, //CSW_AK47
			3, //CSW_KNIFE
			1 //CSW_P90
		}
		iSlot = iWeaponsSlots[iCswId]
	}

	const XTRA_OFS_PLAYER = 5
	const m_rgpPlayerItems_Slot0 = 367

	iWeapon = get_pdata_cbase(id, m_rgpPlayerItems_Slot0 + iSlot, XTRA_OFS_PLAYER)

	const XTRA_OFS_WEAPON = 4
	const m_pNext = 42
	const m_iId = 43

	while( iWeapon > 0 )
	{
		if( get_pdata_int(iWeapon, m_iId, XTRA_OFS_WEAPON) == iCswId )
		{
			break
		}
		iWeapon = get_pdata_cbase(iWeapon, m_pNext, XTRA_OFS_WEAPON)
	}

	if( iWeapon > 0 )
	{
		const m_pActiveItem = 373
		if( bSwitchIfActive && get_pdata_cbase(id, m_pActiveItem, XTRA_OFS_PLAYER) == iWeapon )
		{
			ExecuteHamB(Ham_Weapon_RetireWeapon, iWeapon)
		}

		if( ExecuteHamB(Ham_RemovePlayerItem, id, iWeapon) )
		{
			user_has_weapon(id, iCswId, 0)
			ExecuteHamB(Ham_Item_Kill, iWeapon)
			return 1
		}
	}

	return 0
}
Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 01:47

Apare asa

1. m4a1
2. ak47
0. awp
32. Exit

deci ceva nu am facut eu bine la mienu acolo la awp..
daca se poate DMG sa fie real gen si sa apara daca il nimeres pe unu prin porti. l-am bagat asta ce l-ai facut dar cum am mentionat mai sus este. in rest e ok nu mai e smoke-ul.
User avatar
LNd #
Membru, skill +1
Membru, skill +1
Posts: 126
Joined: 07 Sep 2017, 23:33
Detinator Steam: Da
SteamID: eXeDLL [1337]
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 9 times

02 Jan 2018, 13:39

| Afiseaza codul
case 0: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90 );
			}

		case 1: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90);
			}

                case 2: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_AWP")
			cs_set_user_bpammo(id, CSW_AWP, 90);
			}
deci am inteles ca tu vrei sa primesti si awp si m4a1/ak47 in acelasi timp? daca da ->
| Afiseaza codul
case 0: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90 );
			give_item(id,"weapon_AWP")
			cs_set_user_bpammo(id, CSW_AWP, 90);
                        }

		case 1: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90);
			give_item(id,"weapon_AWP")
			cs_set_user_bpammo(id, CSW_AWP, 90);
                        }

                case 2: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_AWP")
			cs_set_user_bpammo(id, CSW_AWP, 90);
			}  //aici apare awp simplu. adica nu iti mai da aka sau m4a1 , iti da doar awp. daca vrei sa ti-l scot de tot trb sa modific tot pluginu


plugin fara awp ->
| Afiseaza codul
public Showrod(id) 
{
	show_menu(id, Keysrod, "Guns Menu^n\w1. M4a1^n\w2. AK47^n3. Exit^n", -1, "rod")
}

public Pressedrod(id, key) 
{
	
	switch (key) {
		case 0: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_m4a1")
			cs_set_user_bpammo(id, CSW_M4A1, 90 );
			}

		case 1: { 
			StripWeapons(id, Primary)
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90);
			}
daca vrei plugin VIP modificat etc in totalitate , astept message private. il fac gratis dupa specificatiile pe care le doresti.




sau ->

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

#define VIP_LEVEL_ACCES ADMIN_LEVEL_H

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

#define REMOVE_FLAGS "t"

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

new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2
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 g_szMessage[256];
new round[33] = 0;
new cvar_vip_maxap, cvar_vip_maxhp, cvar_vip_showC, cvar_vip_showH, cvar_vip_in_out, cvar_tag, cvar_start_hp, cvar_start_ap, cvar_start_money, cvar_vip_jump, cvar_hp_kill, cvar_ap_kill, jumpnum[33], bool: dojump[33], SyncHudMessage;

public plugin_init() 
{
	register_plugin("VIP", "1", "LNd #");
	
	RegisterHam(Ham_Spawn, "player", "Spawn", 1);
	
	register_clcmd("say", "handle_say");
	register_clcmd("say_team", "handle_say");
	
	register_event("DeathMsg", "eDeathMsg", "a");
	register_message(get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib");
	RegisterHam(Ham_Spawn, "player", "HAM_Spawn_Post", 1);	

	cvar_tag = register_cvar("amx_vip_tag", "[VIP]");

	cvar_start_hp = register_cvar("amx_start_hp", "120"); //CU CAT HP SA INCEAPA
	cvar_start_ap = register_cvar("amx_start_ap", "100"); //CU CAT AP SA INCEAPA
	cvar_start_money = register_cvar("amx_start_money", "0"); //CU CATI BANI IN PLUS SA INCEAPA 
	cvar_vip_jump = register_cvar("amx_vip_jump", "1" ); // cate jumpuri sa aiba ( daca pui aici 0 , el va avea doar 1 jump. adica ala default.)
	cvar_hp_kill = register_cvar("amx_vip_addhp", "0");	//hp pe kill
	cvar_ap_kill = register_cvar("amx_vip_addap", "0");   //ap pe kill
	cvar_vip_in_out = register_cvar("amx_vip_in_out", "1"); //message iese/intra
	cvar_vip_showC = register_cvar("amx_vip_show_chat", "1"); //dezactiveaza/activeaza /vips
	cvar_vip_showH = register_cvar("amx_vip_show_hud", "0"); //message hud cu vipii online pe sv (este pus 0 , 1 e activat)
	cvar_vip_maxhp = register_cvar("amx_vip_maxhp", "120"); //cat hp sa aiba maxim
	cvar_vip_maxap = register_cvar("amx_vip_maxap", "100");	 //cat ap sa aiba maxim

	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")	
	register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
	
	g_type = register_cvar("amx_bulletdamage","1") //daca il setezi pe 2 arata dmg facut pe player , dar nu si prin perete. 1- arata si , si prin perete.
	g_recieved = register_cvar("amx_bulletdamage_recieved","1")	
	
	g_hudmsg1 = CreateHudSyncObj()	
	g_hudmsg2 = CreateHudSyncObj()

	set_task(120.0, "mesaj_info", _, _, _, "b");
	set_task( 1.0, "TaskDisplayVips", _, _, _, "b", 0 );
	SyncHudMessage = CreateHudSyncObj( );		
}

public on_new_round()
{
	g_enabled = get_pcvar_num(g_type)
	if(get_pcvar_num(g_recieved)) g_showrecieved = true	
}

public on_damage(id)
{
	if(g_enabled)
	{		
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)		
		if(g_showrecieved)
		{			
			set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
			ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)		
		}
		if(is_user_connected(attacker))
		{
			switch(g_enabled)
			{
				case 1: {
					set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
					ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
				}
				case 2: {
					if(fm_is_ent_visible(attacker,id))
					{
						set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
						ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
					}
				}
			}
		}
	}
}

public HAM_Spawn_Post(id)
{
	if(is_user_alive(id) && get_user_flags(id) & VIP_LEVEL_ACCES)
	{
		round[id]++
		
		if(round[id]>=0)
			vip_menu(id)
	}
}

public vip_menu(id) 
{
	if(!is_user_alive(id))
		return;	
	
	if(!(get_user_flags(id) & VIP_LEVEL_ACCES))
		return;
	
	new menu
	switch(cs_get_user_team(id))
	{
		case CS_TEAM_CT:
		{
			menu = menu_create("\y[\rVIP UnderWorld\y] \wMeniu \yVIP", "menu_ammunition");
			menu_additem(menu, "M4a1+AWP+Deagle+Set grenazi", "1");
			menu_additem(menu, "AK47+AWP+Deagle+Set grenazi", "2");
		}
	
		case CS_TEAM_T:
		{
			menu = menu_create("\y[\rVIP UnderWorld\y] \wMeniu \yVIP", "menu_ammunition");
			menu_additem(menu, "Ak47+AWP+Deagle+Set grenazi", "1");
			menu_additem(menu, "M4A1+AWP+Deagle+Set grenazi", "2");
		}
	}
	menu_display(id, menu, 0)
}

public menu_ammunition ( id, menu, item ) 
{
	new tag[32];
	get_pcvar_string(cvar_tag, tag, charsmax(tag));
	
	if(item == MENU_EXIT)
	{
		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);

	if(cs_get_user_team(id) == CS_TEAM_CT)
		switch(key)
	{
		case 1:
	{
			strip_user_weapons (id)			
			give_item ( id, "weapon_m4a1" );
			cs_set_user_bpammo ( id, CSW_M4A1, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_smokegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gM4A1+ AWP + Deagle + Grenazi")
	}
		case 2:
	{
			strip_user_weapons (id)			
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_smokegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gAK47 + AWP + Deagle + Grenazi")
            
	}
}
	if(cs_get_user_team(id) == CS_TEAM_T)
		switch(key)
	{
		case 1:
	{
			strip_user_weapons (id)			
			give_item(id,"weapon_ak47")
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        cs_set_user_bpammo(id, CSW_AK47, 90 );			
			give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_smokegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gAK47 + AWP + Deagle + Grenazi")
	}      
		case 2:
	{
	                strip_user_weapons (id)			
			give_item ( id, "weapon_m4a1" );
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        cs_set_user_bpammo ( id, CSW_M4A1, 90 );			
			give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_smokegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gM4A1 + AWP + Deagle + Grenazi")
	}
	}
	menu_destroy(menu);
	return PLUGIN_HANDLED;  
}

public Spawn(id) 
{ 
	if(!is_user_alive(id))
		return;
    
	new CsTeams:team = cs_get_user_team(id) 
	if(get_user_flags(id) & VIP_LEVEL_ACCES) 
	{
		switch(team) 
	    {
		case CS_TEAM_T: 
		{
			set_user_health(id, get_pcvar_num(cvar_start_hp));
			set_user_armor(id, get_pcvar_num(cvar_start_ap));
			cs_set_user_money(id, cs_get_user_money(id) + get_pcvar_num(cvar_start_money));
		}
		case CS_TEAM_CT: 
		{
			set_user_health(id, get_pcvar_num( cvar_start_hp ));
			set_user_armor(id, get_pcvar_num( cvar_start_ap ));
			cs_set_user_money(id, cs_get_user_money(id) + get_pcvar_num(cvar_start_money));
		}
	    }
	}
	
	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));
		}
	}
}

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

public client_disconnected(id)
{
	set_task(2.0, "out", id);

	if(get_user_flags(id) & VIP_LEVEL_ACCES)
	{
		jumpnum[id] = 0;
		dojump[id] = false;
		round[id] = 0;
	}
}

public client_PreThink( id )
{
	if(!is_user_alive(id)) 
		return PLUGIN_CONTINUE;

	new BUTON = get_user_button(id)
	new OLDBUTON = get_user_oldbutton(id)
	new JUMP_VIP = get_pcvar_num(cvar_vip_jump) 

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

	if((BUTON & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
	{
		jumpnum[id] = 0
	}

	return PLUGIN_CONTINUE;
}

public client_PostThink(id) 
{
	if(!is_user_alive(id)) 
		return PLUGIN_CONTINUE;

	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 PLUGIN_CONTINUE;
}

public eDeathMsg()
{
	new id_Killer = read_data(1);
	new VIP_MAXHP = get_pcvar_num(cvar_vip_maxhp);
	new VIP_MAX_HP = get_user_health(id_Killer);
	new VIP_MAXAP = get_pcvar_num(cvar_vip_maxap);
	new VIP_MAX_AP = get_user_armor(id_Killer);

	if(is_user_alive(id_Killer))
	{
		if(get_user_flags(id_Killer) & VIP_LEVEL_ACCES )
			{
				set_user_health(id_Killer, get_user_health(id_Killer) + get_pcvar_num(cvar_hp_kill));
				set_user_armor(id_Killer, get_user_armor(id_Killer) + get_pcvar_num(cvar_ap_kill));
			}
	}

	if(VIP_MAX_HP >= VIP_MAXHP)
	{
               	set_user_health(id_Killer, get_pcvar_num(cvar_vip_maxhp));
		return PLUGIN_HANDLED;
	}
	
	if(VIP_MAX_AP >= VIP_MAXAP)
	{
               	set_user_armor(id_Killer, get_pcvar_num(cvar_vip_maxap));
		return PLUGIN_HANDLED;
	}

	return PLUGIN_HANDLED;
}

public in(id) 	
{
	if(get_pcvar_num(cvar_vip_in_out))
	{
		new tag[32], name[32];

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

		if(get_user_flags(id) & VIP_LEVEL_ACCES)   
		{ 
			ColorChat(0, GREEN, "^4%s ^1VIP: ^4%s ^1s-a conectat.", tag, name); 
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public out(id) 	
{	
	if(get_pcvar_num(cvar_vip_in_out))
	{
		new tag[32], name[32];

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

		if(get_user_flags(id) & VIP_LEVEL_ACCES)   
		{ 
			ColorChat(0, GREEN, "^4%s ^1VIP: ^4%s ^1s-a deconectat.", tag, name); 
		}
		return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}

public TaskDisplayVips( )
{
	if(get_pcvar_num(cvar_vip_showH))
	{
		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, "" ); // Is this needed ?
		iVipsConnected = 0;
	
		static id, i;
		for( i = 0; i < iPlayersNum; i++ )
		{
			id = iPlayers[ i ];
			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 PLUGIN_CONTINUE;
		
}

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

public print_adminlist(user) 
{
	if(get_pcvar_num(cvar_vip_showC))
	{
		new tag[32];
		get_pcvar_string(cvar_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, "^4%s ^1VIP-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 
		{
			ColorChat(0, GREEN, "^4%s ^1Nu sunt ^4VIP^1-i online.", tag);
		} 
	}
	return PLUGIN_CONTINUE;  
}

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 chat_color(const id, const input[], any:...)
{
	new count = 1, players[32]
	
	static msg[191]
	
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!n", "^1")
	replace_all(msg, 190, "!t", "^3")
		
	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()
		}
	}
}
}
Legends never die
Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 13:57

la pluginu ala care am pus eu sma,

sa fie

1.m4a1+awp
2.ak47+awp

ai facut tu acolo dar nu merge.. al-2-lea. nu merge doar 1 arma imi da.
User avatar
LNd #
Membru, skill +1
Membru, skill +1
Posts: 126
Joined: 07 Sep 2017, 23:33
Detinator Steam: Da
SteamID: eXeDLL [1337]
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 9 times

02 Jan 2018, 14:34

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>

#define Keysrod (1<<0)|(1<<1)|(1<<9)
#define ITEM_HE                (1<<0) // "a" 
#define ITEM_FS                (1<<1) // "b" 
//#define ITEM_SG                (1<<2) // "c" 
#define ITEM_DG                (1<<3) // "d" 
#define ITEM_VH                (1<<4) // "e"
#define ITEM_DF                (1<<5) // "f"
#define ITEM_NV                (1<<6) // "g"

new jumpnum[33] = 0
new bool:dojump[33] = false
new hk_File4[ 128 ];
new hk_VipsList[ 128 ][ 32 ], hk_TotalLines;
new hk_IsUserVip[ 33 ];
new hk_viplist[ ] = "vips_list.ini";
new hk_Folder[ ] = "Vip";
new hk_cfg[ ] = "vip-config";
new hk_File[ 128 ];
new hk_File1[ 128 ];
new vip_hud
new maxplayers
new mpd, mkb, mhb
new health_add
new health_hs_add
new health_max
new hk_Killer
new hk_KillerHp
new hk_HpAdd
new hk_HpMax
new jumps, items
new hk_iRoundCount
new bool:hk_IsRestarting
new gun_menu
new cvardmg
new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2


enum
{
	Primary = 1
	, Secondary
	, Knife
	, Grenades
	, C4
};

public plugin_init() 
{
	register_plugin("Vip", "2.2", "Mau")
	
	register_concmd("say /vips", "showAdmin", ADMIN_ALL, "")
	register_concmd("amx_addvips", "addvips", ADMIN_RCON, "<Nume sau SteamID>")
	register_concmd("amx_reloadvips", "relaodvips", ADMIN_RCON, "")
	
	RegisterHam ( Ham_Spawn, "player", "Hook_PlayerSpawn", 1 )
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
	register_event("DeathMsg", "hook_death", "a", "1>0")
	register_event("Damage","Damage","b")
	register_event("DeathMsg","death_msg","a")
	register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
	register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w")
	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	RegisterHam(Ham_TakeDamage, "player", "Ham_CBasePlayer_TakeDamage_Pre") 
	
	register_cvar("vip_maxjumps","1")
	jumps = register_cvar("vip_jumps","1")
	vip_hud = register_cvar("vip_hud","1")
	health_add = register_cvar("vip_hp_kill", "10")
	health_hs_add = register_cvar("vip_hp_hs", "25")
	health_max = register_cvar("vip_hp_max", "100")
	mpd = register_cvar("vip_money_damage","3")
	mkb = register_cvar("vip_money_kill","500")
	mhb = register_cvar("vip_money_hs","1000")
	items = register_cvar("vip_items_round", "abcdefg")
	gun_menu = register_cvar("vip_gun_menu","1")
	cvardmg = register_cvar("vip_damage","2")
	maxplayers = get_maxplayers()

        register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")	
	register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
	
	g_type = register_cvar("amx_bulletdamage","1")
	g_recieved = register_cvar("amx_bulletdamage_recieved","1")	
	
	g_hudmsg1 = CreateHudSyncObj()	
	g_hudmsg2 = CreateHudSyncObj()
	
}

public plugin_cfg()
{	
	
	
	new Dir[ 64 ];
	get_configsdir(Dir,charsmax(Dir));
	formatex ( hk_File, charsmax ( hk_File ), "%s/%s", Dir, hk_Folder );
	formatex ( hk_File1, charsmax ( hk_File1 ), "%s/%s.cfg", hk_File, hk_cfg );
	if(!dir_exists(hk_File))
	mkdir(hk_File);

	formatex ( hk_File4, charsmax ( hk_File4 ), "%s/%s", hk_File, hk_viplist );
	
	if (!file_exists(hk_File4))
	write_file(hk_File4,"; -->VIP List<--");
	
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	if(!file_exists(hk_File1))
	{
	write_file(hk_File1,"// Vip Configuration File")
	write_file(hk_File1,"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// BulletDamage - afiseaza dmg-ul facut unui jucator")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_bulletdamage ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Vips Online")
	write_file(hk_File1,"// Arata Vip-urile online in HUD prin scrierea in chat a comenzii /vips")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_hud ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un kill  ")
	write_file(hk_File1,"vip_hp_kill ^"10^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un hs")
	write_file(hk_File1,"vip_hp_hs ^"25^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Valoarea maxima a hp-ului pe care o poate avea Vip-ul")
	write_file(hk_File1,"vip_hp_max ^"100^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un damage")
	write_file(hk_File1,"vip_money_damage ^"3^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un kill")
	write_file(hk_File1,"vip_money_kill ^"500^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un hs")
	write_file(hk_File1,"vip_money_hs ^"1000^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Guns Menu - afiseaza meniul cu arme")
	write_file(hk_File1,"// Pe hartile de tip AWP, acest meniu va fi automat dezactivat")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_gun_menu ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Items per round - primiti diverse obiecte la inceputul fiecarei runde")
	write_file(hk_File1,"// a - He Grenade")
	write_file(hk_File1,"// b - Flashbang (x2)")
	write_file(hk_File1,"// c - Smoke Grenade ")
	write_file(hk_File1,"// d - Deagle")
	write_file(hk_File1,"// e - Vest + Helm")
	write_file(hk_File1,"// f - Defuse Kit (Doar CT)")
	write_file(hk_File1,"// g - NightVision")
	write_file(hk_File1,"vip_items_round ^"abcdefg^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Jumps - Salturi")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_jumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Cate sarituri in plus poate sa faca deodata")
	write_file(hk_File1,"vip_maxjumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// De cate ori damage-ul jucatorului se mareste indiferent de arma")
	write_file(hk_File1,"// ex: daca este 2, atunci jucatorului i se mareste dmg-ul de 2 ori")
	write_file(hk_File1,"vip_damage ^"2^"")
	write_file(hk_File1,"")
	
	
	}
	
	server_cmd("exec %s",hk_File1)
}

public client_putinserver(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}

public client_disconnect(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}
public addvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32]	
	
	read_argv(1, arg, 31)
	
	new szLog[256];
	formatex(szLog,255,"%s",arg);
	write_file(hk_File4,szLog);
	console_print(id, "[REVENGE] Vip-ul a fost adaugat in lista")
	
	return PLUGIN_HANDLED
	
}

public relaodvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
	return PLUGIN_HANDLED
		
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	console_print(id, "[CS16]Lista de VIP-uri a fost actualizata")	
	
	return PLUGIN_HANDLED
}


public Event_TextMsg_Restart()
{
    hk_IsRestarting = true
}
 
public Event_HLTV_New_Round()
{
    if( hk_IsRestarting )
    {
        hk_IsRestarting = false
        hk_iRoundCount = 0
    }
}

public Hook_PlayerSpawn ( const id )
{
	if ( ! is_user_alive ( id ) )
		return HAM_IGNORED;
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return HAM_IGNORED;
	}
	
	hk_IsUserVip[ id ] = 1;
	hk_iRoundCount++
	new map[32];
	get_mapname(map,31);
	
	if(equali(map, "awp_", 3))
	return HAM_IGNORED;
	
	if (get_pcvar_num(gun_menu) == 1)
	if(hk_iRoundCount>=4)
	Showrod(id);
	
	set_task(0.3, "giveitems", id)
	return HAM_IGNORED;
}

public Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType ) 
{
	if ( ! is_user_vip ( iAttacker ) )
	{
		hk_IsUserVip[ iAttacker ] = 0;
		return HAM_IGNORED;
	}
	hk_IsUserVip[ iAttacker ] = 1;
	
	new dmg1 = get_pcvar_num(cvardmg)
	
	if( iDamageType == DMG_FALL ) 
	SetHamParamFloat(4, flDamage*1)
	else
	SetHamParamFloat(4, flDamage*dmg1)
	
	return HAM_IGNORED
}

public Damage(id)
{
	new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
	if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
	
	if ( is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 1;
		new money = read_data(2) * get_pcvar_num(mpd)
		if(hitpoint==1) money += get_pcvar_num(mhb)
		cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
	}else hk_IsUserVip[ id ] = 0;
}

public death_msg()
{
	if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) 
	cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public hook_death()
{
	hk_Killer = read_data(1)
   
	if ( (read_data(3) == 1) && (read_data(5) == 0) )
	{
		hk_HpAdd = get_pcvar_num (health_hs_add)
	}
	else
	hk_HpAdd = get_pcvar_num (health_add)
	
	hk_HpMax = get_pcvar_num (health_max)
   
   
	if ( ! is_user_vip ( hk_Killer ) )
	{
		hk_IsUserVip[ hk_Killer ] = 0;
		return;
	}
	hk_IsUserVip[ hk_Killer ] = 1;
	
	hk_KillerHp = get_user_health(hk_Killer)
	hk_KillerHp += hk_HpAdd
   
	if (hk_KillerHp > hk_HpMax) hk_KillerHp = hk_HpMax
	set_user_health(hk_Killer, hk_KillerHp)

	set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
	show_hudmessage(hk_Killer, "Healed +%d hp", hk_HpAdd)

}

public showAdmin(id)
{
	if(get_pcvar_num(vip_hud) == 1)
	{
			
		
		new num, iLen, admin
		static pl[32], name[32], szBuff[2048]
	
		get_players(pl, num, "c")
	
		for(new i = 0; i < num; i++)
		{
			if (  is_user_vip ( pl ) )
			{
			hk_IsUserVip[ pl ] = 1;
			get_user_name(pl, name, 31)
			iLen += format(szBuff[iLen], 2048 - iLen, "%d. %s^n", admin + 1, name)
			admin++
			}
			
		}

	
		set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 6.0, 7.0 )
		show_hudmessage(id, " %s online:^n%s", admin > 1 ? "Vips" : "Vips", szBuff)
	
		arrayset(szBuff, 0, 2048)
	}
	return PLUGIN_HANDLED
}

public client_PreThink(id)
{
		if(!is_user_alive(id)) return PLUGIN_CONTINUE
		if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
		if ( ! is_user_vip ( id ) )
		{
			hk_IsUserVip[ id ] = 0;
			return PLUGIN_CONTINUE
		}
	
	
		hk_IsUserVip[ id ] = 1;
		new nbut = get_user_button(id)
		new obut = get_user_oldbutton(id)
		if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
		{
			if(jumpnum[id] < get_cvar_num("vip_maxjumps"))
			{
				dojump[id] = true
				jumpnum[id]++
				return PLUGIN_CONTINUE
			}
		}
		if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
		{
			jumpnum[id] = 0
			return PLUGIN_CONTINUE
		}
	
		return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
	if(!is_user_alive(id)) return PLUGIN_CONTINUE
	if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return PLUGIN_CONTINUE
	}
	
	
	hk_IsUserVip[ id ] = 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 PLUGIN_CONTINUE
	}
	
	return PLUGIN_CONTINUE
}

public Showrod(id) 
{
	show_menu(id, Keysrod, "\y[VIP] Meniu Arme VIP^n^n\r1. \wM4a1 + AWP^n\r2. \wAK47 + AWP^n\r0. \wExit^n", -1, "rod")
}

public Pressedrod(id, key) 
{
	
	switch (key) {
	case 0:
	{
			strip_user_weapons (id)			
			give_item ( id, "weapon_m4a1" );
			cs_set_user_bpammo ( id, CSW_M4A1, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
			give_item(id,"weapon_knife");
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gM4A1 + AWP")
	}
	case 1:
	{
			strip_user_weapons (id)			
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
			give_item(id,"weapon_knife");
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gAK47 + AWP")
            
	}

	case 9: { 			
		}
		}
	return PLUGIN_CONTINUE
}

public get_item_flags() 
{ 
	new sFlags[24] 
	get_pcvar_string(items,sFlags,23) 
	return read_flags(sFlags) 
} 

public giveitems(id)
{
		new iFlags = get_item_flags()  
		new CsTeams:userTeam = cs_get_user_team(id)
	
		if (iFlags&ITEM_HE)
		fm_give_item(id,"weapon_hegrenade") 
		
             
		if(iFlags&ITEM_FS)
		{
		fm_give_item(id,"weapon_flashbang") 
		cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
		}
		
	//	if(iFlags&ITEM_SG)
	//	fm_give_item(id,"weapon_smokegrenade") 
		
		
		if(iFlags&ITEM_DG)
		{
		StripWeapons(id, Secondary);
		fm_give_item(id,"weapon_deagle") 
		cs_set_user_bpammo(id, CSW_DEAGLE, 35 );
		}
		
		if(iFlags&ITEM_VH)
		fm_give_item(id,"item_assaultsuit")
	
		if(userTeam == CS_TEAM_CT && iFlags&ITEM_DF)
		fm_give_item(id,"item_thighpack")
		
		if(iFlags&ITEM_NV)
		cs_set_user_nvg(id, 1)
		
		
}

stock is_user_vip ( id )
{
	new s_Name[ 32 ], s_AuthID[ 32 ];
	get_user_name ( id, s_Name, 31 );
	get_user_authid ( id, s_AuthID, 31 );
	
	for ( new i; i < hk_TotalLines; i++ )
	{
		if ( ! strcmp ( s_Name, hk_VipsList[ i ] ) )
			return 1;
		if ( ! strcmp ( s_AuthID, hk_VipsList[ i ] ) )
			return 1;
	}
	
	return 0;

}

stock StripWeapons(id, Type, bool: bSwitchIfActive = true)
{
	new iReturn;
	
	if(is_user_alive(id))
	{
		new iEntity, iWeapon;
		while((iWeapon = GetWeaponFromSlot(id, Type, iEntity)) > 0)
			iReturn = ham_strip_user_weapon(id, iWeapon, Type, bSwitchIfActive);
	}
	
	return iReturn;
}

stock GetWeaponFromSlot( id , iSlot , &iEntity )
{
	if ( !( 1 <= iSlot <= 5 ) )
		return 0;
	
	iEntity = 0;
	const m_rgpPlayerItems_Slot0 = 367;
	const m_iId = 43;
	const XO_WEAPONS = 4;
	const XO_PLAYER = 5;
		
	iEntity = get_pdata_cbase( id , m_rgpPlayerItems_Slot0 + iSlot , XO_PLAYER );
	
	return ( iEntity > 0 ) ? get_pdata_int( iEntity , m_iId , XO_WEAPONS ) : 0;
}  

stock ham_strip_user_weapon(id, iCswId, iSlot = 0, bool:bSwitchIfActive = true)
{
	new iWeapon
	if( !iSlot )
	{
		static const iWeaponsSlots[] = {
			-1,
			2, //CSW_P228
			-1,
			1, //CSW_SCOUT
			4, //CSW_HEGRENADE
			1, //CSW_XM1014
			5, //CSW_C4
			1, //CSW_MAC10
			1, //CSW_AUG
			4, //CSW_SMOKEGRENADE
			2, //CSW_ELITE
			2, //CSW_FIVESEVEN
			1, //CSW_UMP45
			1, //CSW_SG550
			1, //CSW_GALIL
			1, //CSW_FAMAS
			2, //CSW_USP
			2, //CSW_GLOCK18
			1, //CSW_AWP
			1, //CSW_MP5NAVY
			1, //CSW_M249
			1, //CSW_M3
			1, //CSW_M4A1
			1, //CSW_TMP
			1, //CSW_G3SG1
			4, //CSW_FLASHBANG
			2, //CSW_DEAGLE
			1, //CSW_SG552
			1, //CSW_AK47
			3, //CSW_KNIFE
			1 //CSW_P90
		}
		iSlot = iWeaponsSlots[iCswId]
	}

	const XTRA_OFS_PLAYER = 5
	const m_rgpPlayerItems_Slot0 = 367

	iWeapon = get_pdata_cbase(id, m_rgpPlayerItems_Slot0 + iSlot, XTRA_OFS_PLAYER)

	const XTRA_OFS_WEAPON = 4
	const m_pNext = 42
	const m_iId = 43

	while( iWeapon > 0 )
	{
		if( get_pdata_int(iWeapon, m_iId, XTRA_OFS_WEAPON) == iCswId )
		{
			break
		}
		iWeapon = get_pdata_cbase(iWeapon, m_pNext, XTRA_OFS_WEAPON)
	}

	if( iWeapon > 0 )
	{
		const m_pActiveItem = 373
		if( bSwitchIfActive && get_pdata_cbase(id, m_pActiveItem, XTRA_OFS_PLAYER) == iWeapon )
		{
			ExecuteHamB(Ham_Weapon_RetireWeapon, iWeapon)
		}

		if( ExecuteHamB(Ham_RemovePlayerItem, id, iWeapon) )
		{
			user_has_weapon(id, iCswId, 0)
			ExecuteHamB(Ham_Item_Kill, iWeapon)
			return 1
		}
	}

	return 0
}

public on_new_round()
{
	g_enabled = get_pcvar_num(g_type)
	if(get_pcvar_num(g_recieved)) g_showrecieved = true	
}

public on_damage(id)
{
	if(g_enabled)
	{		
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)		
		if(g_showrecieved)
		{			
			set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
			ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)		
		}
		if(is_user_connected(attacker))
		{
			switch(g_enabled)
			{
				case 1: {
					set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
					ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
				}
				case 2: {
					if(fm_is_ent_visible(attacker,id))
					{
						set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
						ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
					}
				}
			}
		}
	}
}

stock chat_color(const id, const input[], any:...)
{
	new count = 1, players[32]
	
	static msg[191]
	
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!n", "^1")
	replace_all(msg, 190, "!t", "^3")
		
	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()
		}
	}
}
}



testat. am pus si un message in chat in momentul in care alegi . astept raspuns.
Legends never die
Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 16:28

merge iau ak47 si awp , dar nu mai primesc DEAGLE si GRENADELE 2x flash si 1x HE

dmg arata la totii de pe server nu doar la VIP
User avatar
LNd #
Membru, skill +1
Membru, skill +1
Posts: 126
Joined: 07 Sep 2017, 23:33
Detinator Steam: Da
SteamID: eXeDLL [1337]
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 9 times

02 Jan 2018, 16:51

| Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta_util>
#include <hamsandwich>
#include <engine>

#define Keysrod (1<<0)|(1<<1)|(1<<9)
#define ITEM_HE                (1<<0) // "a" 
#define ITEM_FS                (1<<1) // "b" 
//#define ITEM_SG                (1<<2) // "c" 
#define ITEM_DG                (1<<3) // "d" 
#define ITEM_VH                (1<<4) // "e"
#define ITEM_DF                (1<<5) // "f"
#define ITEM_NV                (1<<6) // "g"

new jumpnum[33] = 0
new bool:dojump[33] = false
new hk_File4[ 128 ];
new hk_VipsList[ 128 ][ 32 ], hk_TotalLines;
new hk_IsUserVip[ 33 ];
new hk_viplist[ ] = "vips_list.ini";
new hk_Folder[ ] = "Vip";
new hk_cfg[ ] = "vip-config";
new hk_File[ 128 ];
new hk_File1[ 128 ];
new vip_hud
new maxplayers
new mpd, mkb, mhb
new health_add
new health_hs_add
new health_max
new hk_Killer
new hk_KillerHp
new hk_HpAdd
new hk_HpMax
new jumps, items
new hk_iRoundCount
new bool:hk_IsRestarting
new gun_menu
new cvardmg
new g_show_dmg
new SyncHudMessage

enum
{
	Primary = 1
	, Secondary
	, Knife
	, Grenades
	, C4
};

public plugin_init() 
{
	register_plugin("Vip", "2.2", "Mau")
	
	register_concmd("say /vips", "showAdmin", ADMIN_ALL, "")
	register_concmd("amx_addvips", "addvips", ADMIN_RCON, "<Nume sau SteamID>")
	register_concmd("amx_reloadvips", "relaodvips", ADMIN_RCON, "")
	
	RegisterHam ( Ham_Spawn, "player", "Hook_PlayerSpawn", 1 )
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
	register_event("DeathMsg", "hook_death", "a", "1>0")
	register_event("Damage","Damage","b")
	register_event("DeathMsg","death_msg","a")
	register_menucmd(register_menuid("rod"), Keysrod, "Pressedrod")
	register_event("TextMsg", "Event_TextMsg_Restart", "a", "2&#Game_C", "2&#Game_w")
	register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
	RegisterHam(Ham_TakeDamage, "player", "Ham_CBasePlayer_TakeDamage_Pre") 
	
	register_cvar("vip_maxjumps","1")
	jumps = register_cvar("vip_jumps","1")
	vip_hud = register_cvar("vip_hud","1")
	health_add = register_cvar("vip_hp_kill", "10")
	health_hs_add = register_cvar("vip_hp_hs", "25")
	health_max = register_cvar("vip_hp_max", "100")
	mpd = register_cvar("vip_money_damage","3")
	mkb = register_cvar("vip_money_kill","500")
	mhb = register_cvar("vip_money_hs","1000")
        g_show_dmg = register_cvar( "vip_show_dmg", "1" );
	items = register_cvar("vip_items_round", "abcdefg")
	gun_menu = register_cvar("vip_gun_menu","1")
	cvardmg = register_cvar("vip_damage","2")
	maxplayers = get_maxplayers()

        register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")	
        SyncHudMessage = CreateHudSyncObj(  );
}

public plugin_cfg()
{	
	
	
	new Dir[ 64 ];
	get_configsdir(Dir,charsmax(Dir));
	formatex ( hk_File, charsmax ( hk_File ), "%s/%s", Dir, hk_Folder );
	formatex ( hk_File1, charsmax ( hk_File1 ), "%s/%s.cfg", hk_File, hk_cfg );
	if(!dir_exists(hk_File))
	mkdir(hk_File);

	formatex ( hk_File4, charsmax ( hk_File4 ), "%s/%s", hk_File, hk_viplist );
	
	if (!file_exists(hk_File4))
	write_file(hk_File4,"; -->VIP List<--");
	
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	if(!file_exists(hk_File1))
	{
	write_file(hk_File1,"// Vip Configuration File")
	write_file(hk_File1,"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// BulletDamage - afiseaza dmg-ul facut unui jucator")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_bulletdamage ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Vips Online")
	write_file(hk_File1,"// Arata Vip-urile online in HUD prin scrierea in chat a comenzii /vips")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_hud ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un kill  ")
	write_file(hk_File1,"vip_hp_kill ^"10^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Hp primit pe un hs")
	write_file(hk_File1,"vip_hp_hs ^"25^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Valoarea maxima a hp-ului pe care o poate avea Vip-ul")
	write_file(hk_File1,"vip_hp_max ^"100^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un damage")
	write_file(hk_File1,"vip_money_damage ^"3^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un kill")
	write_file(hk_File1,"vip_money_kill ^"500^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Banii primiti pe un hs")
	write_file(hk_File1,"vip_money_hs ^"1000^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Guns Menu - afiseaza meniul cu arme")
	write_file(hk_File1,"// Pe hartile de tip AWP, acest meniu va fi automat dezactivat")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_gun_menu ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Items per round - primiti diverse obiecte la inceputul fiecarei runde")
	write_file(hk_File1,"// a - He Grenade")
	write_file(hk_File1,"// b - Flashbang (x2)")
	write_file(hk_File1,"// c - Smoke Grenade ")
	write_file(hk_File1,"// d - Deagle")
	write_file(hk_File1,"// e - Vest + Helm")
	write_file(hk_File1,"// f - Defuse Kit (Doar CT)")
	write_file(hk_File1,"// g - NightVision")
	write_file(hk_File1,"vip_items_round ^"abcdefg^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Jumps - Salturi")
	write_file(hk_File1,"// 1 - Activat   0 - Dezactivat")
	write_file(hk_File1,"vip_jumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// Cate sarituri in plus poate sa faca deodata")
	write_file(hk_File1,"vip_maxjumps ^"1^"")
	write_file(hk_File1,"")
	write_file(hk_File1,"// De cate ori damage-ul jucatorului se mareste indiferent de arma")
	write_file(hk_File1,"// ex: daca este 2, atunci jucatorului i se mareste dmg-ul de 2 ori")
	write_file(hk_File1,"vip_damage ^"2^"")
	write_file(hk_File1,"")
	
	
	}
	
	server_cmd("exec %s",hk_File1)
}

public client_putinserver(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}

public client_disconnect(id)
{
	
	hk_IsUserVip[ id ] = 0;
	jumpnum[id] = 0
	dojump[id] = false
}
public addvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new arg[32]	
	
	read_argv(1, arg, 31)
	
	new szLog[256];
	formatex(szLog,255,"%s",arg);
	write_file(hk_File4,szLog);
	console_print(id, "[REVENGE] Vip-ul a fost adaugat in lista")
	
	return PLUGIN_HANDLED
	
}

public relaodvips(id, level, cid)
{
	if (!cmd_access(id, level, cid, 1))
	return PLUGIN_HANDLED
		
	new hk_Buffer[ 192 ], hk_Line, hk_Len;
	while ( ( hk_Line = read_file ( hk_File4, hk_Line, hk_Buffer, charsmax ( hk_Buffer ), hk_Len ) ) )
	{
		if ( ! strlen ( hk_Buffer ) || hk_Buffer[ 0 ] == ';' || ( hk_Buffer[ 0 ] == '/' && hk_Buffer[ 1 ] == '/' ) )
			continue;
			
		copy ( hk_VipsList[ hk_TotalLines++ ], 32, hk_Buffer );

	}	
	
	console_print(id, "[CS16]Lista de VIP-uri a fost actualizata")	
	
	return PLUGIN_HANDLED
}


public Event_TextMsg_Restart()
{
    hk_IsRestarting = true
}
 
public Event_HLTV_New_Round()
{
    if( hk_IsRestarting )
    {
        hk_IsRestarting = false
        hk_iRoundCount = 0
    }
}

public Hook_PlayerSpawn ( const id )
{
	if ( ! is_user_alive ( id ) )
		return HAM_IGNORED;
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return HAM_IGNORED;
	}
	
	hk_IsUserVip[ id ] = 1;
	hk_iRoundCount++
	new map[32];
	get_mapname(map,31);
	
	if(equali(map, "awp_", 3))
	return HAM_IGNORED;
	
	if (get_pcvar_num(gun_menu) == 1)
	if(hk_iRoundCount>=4)
	Showrod(id);
	
	set_task(0.3, "giveitems", id)
	return HAM_IGNORED;
}

public Ham_CBasePlayer_TakeDamage_Pre( const id, const iInflictor, const iAttacker, const Float:flDamage, const iDamageType ) 
{
	if ( ! is_user_vip ( iAttacker ) )
	{
		hk_IsUserVip[ iAttacker ] = 0;
		return HAM_IGNORED;
	}
	hk_IsUserVip[ iAttacker ] = 1;
	
	new dmg1 = get_pcvar_num(cvardmg)
	
	if( iDamageType == DMG_FALL ) 
	SetHamParamFloat(4, flDamage*1)
	else
	SetHamParamFloat(4, flDamage*dmg1)
	
	return HAM_IGNORED
}

public Damage(id)
{
	new weapon, hitpoint, attacker = get_user_attacker(id,weapon,hitpoint)
	if(attacker<=maxplayers && is_user_alive(attacker) && attacker!=id)
	
	if ( is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 1;
		new money = read_data(2) * get_pcvar_num(mpd)
		if(hitpoint==1) money += get_pcvar_num(mhb)
		cs_set_user_money(attacker,cs_get_user_money(attacker) + money)
	}else hk_IsUserVip[ id ] = 0;
}

public death_msg()
{
	if(read_data(1)<=maxplayers && read_data(1) && read_data(1)!=read_data(2)) 
	cs_set_user_money(read_data(1),cs_get_user_money(read_data(1)) + get_pcvar_num(mkb) - 300)
}

public hook_death()
{
	hk_Killer = read_data(1)
   
	if ( (read_data(3) == 1) && (read_data(5) == 0) )
	{
		hk_HpAdd = get_pcvar_num (health_hs_add)
	}
	else
	hk_HpAdd = get_pcvar_num (health_add)
	
	hk_HpMax = get_pcvar_num (health_max)
   
   
	if ( ! is_user_vip ( hk_Killer ) )
	{
		hk_IsUserVip[ hk_Killer ] = 0;
		return;
	}
	hk_IsUserVip[ hk_Killer ] = 1;
	
	hk_KillerHp = get_user_health(hk_Killer)
	hk_KillerHp += hk_HpAdd
   
	if (hk_KillerHp > hk_HpMax) hk_KillerHp = hk_HpMax
	set_user_health(hk_Killer, hk_KillerHp)

	set_hudmessage(0, 255, 0, -1.0, 0.15, 0, 1.0, 1.0, 0.1, 0.1, -1)
	show_hudmessage(hk_Killer, "Healed +%d hp", hk_HpAdd)

}

public showAdmin(id)
{
	if(get_pcvar_num(vip_hud) == 1)
	{
			
		
		new num, iLen, admin
		static pl[32], name[32], szBuff[2048]
	
		get_players(pl, num, "c")
	
		for(new i = 0; i < num; i++)
		{
			if (  is_user_vip ( pl ) )
			{
			hk_IsUserVip[ pl ] = 1;
			get_user_name(pl, name, 31)
			iLen += format(szBuff[iLen], 2048 - iLen, "%d. %s^n", admin + 1, name)
			admin++
			}
			
		}

	
		set_hudmessage(0, 255, 0, 0.02, 0.2, 0, 6.0, 7.0 )
		show_hudmessage(id, " %s online:^n%s", admin > 1 ? "Vips" : "Vips", szBuff)
	
		arrayset(szBuff, 0, 2048)
	}
	return PLUGIN_HANDLED
}

public client_PreThink(id)
{
		if(!is_user_alive(id)) return PLUGIN_CONTINUE
		if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
		if ( ! is_user_vip ( id ) )
		{
			hk_IsUserVip[ id ] = 0;
			return PLUGIN_CONTINUE
		}
	
	
		hk_IsUserVip[ id ] = 1;
		new nbut = get_user_button(id)
		new obut = get_user_oldbutton(id)
		if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
		{
			if(jumpnum[id] < get_cvar_num("vip_maxjumps"))
			{
				dojump[id] = true
				jumpnum[id]++
				return PLUGIN_CONTINUE
			}
		}
		if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
		{
			jumpnum[id] = 0
			return PLUGIN_CONTINUE
		}
	
		return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
	if(!is_user_alive(id)) return PLUGIN_CONTINUE
	if(get_pcvar_num(jumps) == 0) return PLUGIN_CONTINUE
	
	if ( ! is_user_vip ( id ) )
	{
		hk_IsUserVip[ id ] = 0;
		return PLUGIN_CONTINUE
	}
	
	
	hk_IsUserVip[ id ] = 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 PLUGIN_CONTINUE
	}
	
	return PLUGIN_CONTINUE
}

public Showrod(id) 
{
	show_menu(id, Keysrod, "\y[VIP] Meniu Arme VIP^n^n\r1. \wM4a1 + Deagle + Grenazi^n\r2. \wAK47 + Deagle + Grenazi^n\r0. \wExit^n", -1, "rod")
}

public Pressedrod(id, key) 
{
	
	switch (key) {
	case 0:
	{
			strip_user_weapons (id)			
			give_item ( id, "weapon_m4a1" );
			cs_set_user_bpammo ( id, CSW_M4A1, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_smokegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gM4A1 + AWP + Deagle + Grenazi")
	}
	case 1:
	{
			strip_user_weapons (id)			
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_smokegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gAK47 + AWP + Deagle + Grenazi")
            
	}

	case 9: { 			
		}
		}
	return PLUGIN_CONTINUE
}

public get_item_flags() 
{ 
	new sFlags[24] 
	get_pcvar_string(items,sFlags,23) 
	return read_flags(sFlags) 
} 

public giveitems(id)
{
		new iFlags = get_item_flags()  
		new CsTeams:userTeam = cs_get_user_team(id)
	
		if (iFlags&ITEM_HE)
		fm_give_item(id,"weapon_hegrenade") 
		
             
		if(iFlags&ITEM_FS)
		{
		fm_give_item(id,"weapon_flashbang") 
		cs_set_user_bpammo(id, CSW_FLASHBANG, 2)
		}
		
	//	if(iFlags&ITEM_SG)
	//	fm_give_item(id,"weapon_smokegrenade") 
		
		
		if(iFlags&ITEM_DG)
		{
		StripWeapons(id, Secondary);
		fm_give_item(id,"weapon_deagle") 
		cs_set_user_bpammo(id, CSW_DEAGLE, 35 );
		}
		
		if(iFlags&ITEM_VH)
		fm_give_item(id,"item_assaultsuit")
	
		if(userTeam == CS_TEAM_CT && iFlags&ITEM_DF)
		fm_give_item(id,"item_thighpack")
		
		if(iFlags&ITEM_NV)
		cs_set_user_nvg(id, 1)
		
		
}

stock is_user_vip ( id )
{
	new s_Name[ 32 ], s_AuthID[ 32 ];
	get_user_name ( id, s_Name, 31 );
	get_user_authid ( id, s_AuthID, 31 );
	
	for ( new i; i < hk_TotalLines; i++ )
	{
		if ( ! strcmp ( s_Name, hk_VipsList[ i ] ) )
			return 1;
		if ( ! strcmp ( s_AuthID, hk_VipsList[ i ] ) )
			return 1;
	}
	
	return 0;

}

stock StripWeapons(id, Type, bool: bSwitchIfActive = true)
{
	new iReturn;
	
	if(is_user_alive(id))
	{
		new iEntity, iWeapon;
		while((iWeapon = GetWeaponFromSlot(id, Type, iEntity)) > 0)
			iReturn = ham_strip_user_weapon(id, iWeapon, Type, bSwitchIfActive);
	}
	
	return iReturn;
}

stock GetWeaponFromSlot( id , iSlot , &iEntity )
{
	if ( !( 1 <= iSlot <= 5 ) )
		return 0;
	
	iEntity = 0;
	const m_rgpPlayerItems_Slot0 = 367;
	const m_iId = 43;
	const XO_WEAPONS = 4;
	const XO_PLAYER = 5;
		
	iEntity = get_pdata_cbase( id , m_rgpPlayerItems_Slot0 + iSlot , XO_PLAYER );
	
	return ( iEntity > 0 ) ? get_pdata_int( iEntity , m_iId , XO_WEAPONS ) : 0;
}  

stock ham_strip_user_weapon(id, iCswId, iSlot = 0, bool:bSwitchIfActive = true)
{
	new iWeapon
	if( !iSlot )
	{
		static const iWeaponsSlots[] = {
			-1,
			2, //CSW_P228
			-1,
			1, //CSW_SCOUT
			4, //CSW_HEGRENADE
			1, //CSW_XM1014
			5, //CSW_C4
			1, //CSW_MAC10
			1, //CSW_AUG
			4, //CSW_SMOKEGRENADE
			2, //CSW_ELITE
			2, //CSW_FIVESEVEN
			1, //CSW_UMP45
			1, //CSW_SG550
			1, //CSW_GALIL
			1, //CSW_FAMAS
			2, //CSW_USP
			2, //CSW_GLOCK18
			1, //CSW_AWP
			1, //CSW_MP5NAVY
			1, //CSW_M249
			1, //CSW_M3
			1, //CSW_M4A1
			1, //CSW_TMP
			1, //CSW_G3SG1
			4, //CSW_FLASHBANG
			2, //CSW_DEAGLE
			1, //CSW_SG552
			1, //CSW_AK47
			3, //CSW_KNIFE
			1 //CSW_P90
		}
		iSlot = iWeaponsSlots[iCswId]
	}

	const XTRA_OFS_PLAYER = 5
	const m_rgpPlayerItems_Slot0 = 367

	iWeapon = get_pdata_cbase(id, m_rgpPlayerItems_Slot0 + iSlot, XTRA_OFS_PLAYER)

	const XTRA_OFS_WEAPON = 4
	const m_pNext = 42
	const m_iId = 43

	while( iWeapon > 0 )
	{
		if( get_pdata_int(iWeapon, m_iId, XTRA_OFS_WEAPON) == iCswId )
		{
			break
		}
		iWeapon = get_pdata_cbase(iWeapon, m_pNext, XTRA_OFS_WEAPON)
	}

	if( iWeapon > 0 )
	{
		const m_pActiveItem = 373
		if( bSwitchIfActive && get_pdata_cbase(id, m_pActiveItem, XTRA_OFS_PLAYER) == iWeapon )
		{
			ExecuteHamB(Ham_Weapon_RetireWeapon, iWeapon)
		}

		if( ExecuteHamB(Ham_RemovePlayerItem, id, iWeapon) )
		{
			user_has_weapon(id, iCswId, 0)
			ExecuteHamB(Ham_Item_Kill, iWeapon)
			return 1
		}
	}

	return 0
}

public on_damage( id ) 
{

	if( get_pcvar_num( g_show_dmg ) == 1 ) {

		static iAttacker;
		static fDamage;
	
		iAttacker = get_user_attacker( id );
		fDamage = read_data( 2 );

		if( is_user_alive( id ) && (get_user_flags(id) & hk_IsUserVip[ id ] ) ) {
			
			set_hudmessage( 255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1 );
			ShowSyncHudMsg( id, SyncHudMessage, "%i^n", fDamage );	
		}

		if( is_user_alive( iAttacker ) && (get_user_flags(iAttacker) & hk_IsUserVip[ id ]) )
		{
		
			if(fm_is_ent_visible(iAttacker,id))
			{

				set_hudmessage( 0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1 );
				ShowSyncHudMsg( iAttacker, SyncHudMessage, "%i^n^n", fDamage );
			}
		}
	}
}


stock chat_color(const id, const input[], any:...)
{
	new count = 1, players[32]
	
	static msg[191]
	
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!n", "^1")
	replace_all(msg, 190, "!t", "^3")
		
	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()
		}
	}
}
}


uitasem sa modific dmg sa il arate pentru vipi. am pus pentru toti, scuze.. greseala mea :)

si pentru grenade etc. sterge tot ce tine de vipu anterior si pune doar pluginu,. tu ai aici

| Afiseaza codul
a - He Grenade")
	 b - Flashbang (x2)")
	 c - Smoke Grenade ")
	 d - Deagle")
	 e - Vest + Helm")
	 f - Defuse Kit (Doar CT)")
	 g - NightVision")
	vip_items_round "abcdefg"


ai grija sa apara vip_items_round "abcdefg" in fisierul configurator al vipului
Legends never die
Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 16:53

am pus tot codul de sus primul, cu al-2-lea ce fac? unde il bag?
Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 16:57

al-2-lea cod ala cu grenadele l-am inlocuit cu asta ce l-ai pus tu. in vip-config.cfg

merge dar am smoke cand iau si arme, de unde il scot ? zi-mi linia care el sa nu mai faci tu..

nu apare nici DMG doar ala care il iau cand trage unu in mine.
User avatar
LNd #
Membru, skill +1
Membru, skill +1
Posts: 126
Joined: 07 Sep 2017, 23:33
Detinator Steam: Da
SteamID: eXeDLL [1337]
Fond eXtream: 0
Has thanked: 3 times
Been thanked: 9 times

02 Jan 2018, 17:11

| Afiseaza codul
case 0:
	{
			strip_user_weapons (id)			
			give_item ( id, "weapon_m4a1" );
			cs_set_user_bpammo ( id, CSW_M4A1, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gM4A1 + AWP + Deagle + Grenazi")
	}
	case 1:
	{
			strip_user_weapons (id)			
			give_item(id,"weapon_ak47")
			cs_set_user_bpammo(id, CSW_AK47, 90 );			
			give_item(id,"weapon_awp");
			cs_set_user_bpammo(id, CSW_AWP, 30 );		
                        give_item ( id, "weapon_deagle" );
			cs_set_user_bpammo ( id, CSW_DEAGLE, 35 );
			give_item(id,"weapon_knife");
			give_item ( id, "weapon_hegrenade" );
			give_item ( id, "weapon_flashbang" );
			cs_set_user_bpammo ( id, CSW_FLASHBANG, 2 );
			give_item ( id, "item_thighpack" );
			chat_color(id, "!g* !nAi primit gratis !gAK47 + AWP + Deagle + Grenazi")
            
	}
inlocui cu asta in loc de alea 2 caseuri
Legends never die
Miaw
Membru, skill 0
Membru, skill 0
Posts: 68
Joined: 27 Oct 2017, 00:05
Detinator Steam: Da
Fond eXtream: 0
Location: Romania
Contact:

02 Jan 2018, 17:16

si ala cu dmg, sa apara doar la vip, acuma nu mai apare deloc
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests