Add After rund 3 Weapons in VIP

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Отговори
Потребителски аватар

Автор на темата
lantimilan
Foreigner
Foreigner
Мнения: 335
Регистриран: 29 ное 2017, 22:49
Се отблагодари: 16 пъти
Получена благодарност: 1 път
Контакти:

Add After rund 3 Weapons in VIP

Мнение от lantimilan » 26 мар 2020, 23:12

Hello i have one plugin for vip , all time its free for vip but i have one problem in plugin you can take weapons from first round i want to make round 1-2 to take just bomb grenade he grenade and flash2x , and in 3 round to take weapons its possible, plugin i find in google ?

Код: Избери всички

#include <amxmodx>
#include <fun>
#include <cstrike>
#include <fakemeta_util>
#include <hamsandwich>
#pragma compress 1

#define PLUGIN "Vipka Sistemi"
#define VERSION "1.0"
#define AUTHOR "Luars1"

#define CVAR_PREFEX "VIP Free"

/** define weapon **/
#define PRIMARY_ONLY 1
#define SECONDARY_ONLY 2

/** pId, ADMIN_, Alive, connected, pev_valid **/ 
#define IsValidPev(%1)  (bool:(pev_valid(%1) == 2))
#define IsFlag(%1,%2)   (bool:(get_user_flags(%1) & %2))
#define IsAlive(%1) 	(bool:(is_user_alive(%1)))
#define IsConnected(%1) (bool:(is_user_connected(%1)))

/** szMenu, iLen, szMenuTitle **/
#define MENU_TITLE(%1,%2,%3) (%2 = formatex(%1[%2], charsmax(%1), %3))

/** szMenu[], iLen, szItemName **/
#define MENU_ITEM(%1,%2,%3) (%2 += formatex(%1[%2], charsmax(%1) - %2, %3))

/** pId, bitsKeys, szMenu, szMenuId **/
#define SHOW_MENU(%1,%2,%3,%4) show_menu(%1,%2,%3, -1, %4)

/** pId **/
#define HIDE_MENU(%1) show_menu(%1, HULL, "^n")

/** iMenuKey */
#define KEY(%0) (1 << ((%0 + 9) % 10))
#define KEY_HANDLER(%0) ((%0 + 1) % 10)

/** szMenuId, szMenu_Handler **/
#define RegisterMenu(%1,%2) register_menucmd(register_menuid(%1), 1023, %2)

/** define MenuId **/
#define MenuId_Vip "MENU VIP"

/** Constat **/
const m_iClip = 51; //32 bit
const XO_WEAPONS = 4;

const PRIMARY_WEAPONS_BIT_SUM = (1 << CSW_SCOUT) | (1<< CSW_XM1014) | (1 << CSW_M3) | (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_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_DEAGLE)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR);
	
	RegisterMenu(MenuId_Vip, "ShowMenu_Vip_Handler");
	
	RegisterHam(Ham_Spawn, "player", "player_respawn", true);

	
}
public player_respawn(pId)
{
	if(IsAlive(pId) && cs_get_user_team(pId) == CS_TEAM_T)
    {
		strip_weapons(pId, 2);
		new iWeaponId = give_item(pId, "weapon_deagle");
		set_user_armor(pId, 100); 
		Weapon_SetAmmo(iWeaponId, 7);
		cs_set_user_bpammo(pId, CSW_DEAGLE, 35); 
		fm_give_item(pId, "weapon_hegrenade");
		fm_give_item(pId, "weapon_flashbang");
		cs_set_user_bpammo(pId, CSW_FLASHBANG, 2);
		ShowMenu_Vip( pId );
    }
	if(IsAlive(pId) && cs_get_user_team(pId) == CS_TEAM_CT)
	{
		strip_weapons(pId, 2);
		new iWeaponId = give_item(pId, "weapon_deagle");
		cs_set_user_defuse(pId, 1, 0, 16, 0, _, 0);
		set_user_armor(pId, 100);
		Weapon_SetAmmo(iWeaponId, 7);
		cs_set_user_bpammo(pId, CSW_DEAGLE, 35);
		fm_give_item(pId, "weapon_hegrenade");
		fm_give_item(pId, "weapon_flashbang");
		cs_set_user_bpammo(pId, CSW_FLASHBANG, 2);
		ShowMenu_Vip( pId );
	}
}  

ShowMenu_Vip(pId)
{
	new szMenu[512], iLen, bitsKeys = KEY(0)|KEY(1)|KEY(2)|KEY(3)|KEY(4)|KEY(5);
	
	MENU_TITLE(szMenu, iLen, "\rR \wG \yB  \yV\w.\rI\y.\wP \r] \wFree Guns^n^n", CVAR_PREFEX);
	
	MENU_ITEM(szMenu, iLen, "^n\r[\w%d\r] \wMerr \rAK47 \w+ \rDeagle", 1);
	MENU_ITEM(szMenu, iLen, "^n\r[\w%d\r] \wMerr \rM4A1 \w+ \rDeagle", 2);
	
	MENU_ITEM(szMenu, iLen, "^n^n\r[\w%d\r] \rMbylle", 0);
	return SHOW_MENU(pId, bitsKeys, szMenu, MenuId_Vip);
}

public ShowMenu_Vip_Handler(pId, iKey)
{
	new szName[33];
	get_user_name(pId, szName, 32);
	switch(KEY_HANDLER(iKey))
	{
		case 1:
		{
			strip_weapons(pId, 1);
			new iWeaponId = give_item(pId, "weapon_ak47");
			Weapon_SetAmmo(iWeaponId, 30);
			cs_set_user_bpammo(pId, CSW_AK47, 90); 
			ColorChat(pId,"!g[!y%s!g] !tJu !y[!tV.!gI.!tP!y] !g%s !tZgjedhet !gAK47 !t+ !gDeagle", CVAR_PREFEX, szName);
		}
		case 2:
		{
			strip_weapons(pId, 1);
			new iWeaponId = give_item(pId, "weapon_m4a1");
			Weapon_SetAmmo(iWeaponId, 30);
			cs_set_user_bpammo(pId, CSW_M4A1, 90); 
			ColorChat(pId, "!g[!y%s!g] !tJu !y[!tV.!gI.!tP!y] !g%s !tZgjedhet !gM4A1 !t+ !gDeagle", CVAR_PREFEX, szName);
		}
	}
}

bool:Weapon_SetAmmo(iEnt, iAmmo) 
{ 
	if(!IsValidPev(iEnt)) 
	return false; 

	set_pdata_int(iEnt, m_iClip, iAmmo, XO_WEAPONS); 

	return true; 
}

stock strip_weapons(pId, stripwhat)
{
	new weapons[32], num_weapons, index, weaponid;
	get_user_weapons(pId, weapons, num_weapons);
	for(index = 0 ; index < num_weapons ;index++)
	{
		weaponid = weapons[index];
		if((stripwhat == PRIMARY_ONLY && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) ||(stripwhat == SECONDARY_ONLY && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
		{
			new wname[32];
			get_weaponname(weaponid,wname,charsmax(wname));
			engclient_cmd(pId, "drop", wname);
		}
	}
}

stock ColorChat(const pId, const input[], any:...)
{
	new count = 1, players[32], msg[191]; vformat(msg, 190, input, 3)
	replace_all(msg, 190, "!g", "^4")
	replace_all(msg, 190, "!y", "^1")
	replace_all(msg, 190, "!t", "^3")
	if(pId)players[0] = pId; else get_players(players, count, "ch")
	{
		for(new i = 0; i < count; i++)
		{
			if(IsConnected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
				write_byte(players[i])
				write_string(msg)
				message_end()
			}
		}
	}
}

Отговори

Върни се в “Заявки за плъгини”

Кой е на линия

Потребители, разглеждащи този форум: Няма регистрирани потребители и 0 госта