Плагин Вип Привелегий

Joraronnik

New Member
Есть плагин Вип.Хотелось бы подправить его.
При респавне Випу даеться Deagle,а USP пропадает - хочеться,чтоб он выбрасывался и тогда довался Deagle!
Еще одно,когда Вип берет оружие например AWP,а втоже время у него есть m4a1,чтобы m4a1 выбрасывался.а не оставался!
Заранее Спасибо!
Вот код плагина:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta_util>

#define VIP_FLAG ADMIN_LEVEL_H
new round_number
new bool:has_used[33]
new pistols[6] = {CSW_P228, CSW_ELITE, CSW_FIVESEVEN, CSW_GALIL, CSW_USP, CSW_GLOCK18};
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin("Vip weapon V2", "2.0", "7eVen");
register_event("ResetHUD", "ResetHUD", "be");
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_logevent("event_new_round", 2, "1=Round_Start")
register_clcmd("say /adminka", "adminka");
register_clcmd("say /vipka","ShowMotd");
register_clcmd("vipmenu", "function_menu");
maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

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

public event_round_start ( )
{
round_number++
}

public print_adminlist(user)
{
new adminnames[33][32]
new message[256]
new contactinfo[256], contact[112]
new id, count, x, len

for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & ADMIN_LEVEL_H)
get_user_name(id, adminnames[count++], 31)

len = format(message, 255, "%s Випы онлайн ",COLOR)
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, "%s ",COLOR)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "Випов нету онлайн.")
print_message(user, message)
}

get_cvar_string("amx_contactinfo", contact, 63)
if(contact[0]) {
format(contactinfo, 111, "%s Контакт администратора -- %s", COLOR, contact)
print_message(user, contactinfo)
}
}

print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}

public function_menu(id)
{
if ( ! ( get_user_flags ( id ) & VIP_FLAG ) )
{
ChatColor ( id , "!g[V.I.P]!team Меню только для !g[V.I.P] !teamИграков!" );
return PLUGIN_HANDLED;
}

new menu = menu_create("\w[\y V.I.P \w] \r Меню", "menu_handler")


menu_additem(menu, "\yОружейка\r","1")
menu_additem(menu, "\yДругое\r", "2")

menu_setprop(menu, MPROP_EXITNAME, "\yВыход")
menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)

menu_display(id,menu,0)
return PLUGIN_HANDLED
}

public vintov1(id)
{
new mMENU4 = menu_create("\w[\y V.I.P \w] \r Оружейка", "menu_5")

menu_additem(mMENU4, "\wВзять \r[\y Famas \r]\r","1")
menu_additem(mMENU4, "\wВзять \r[\y Krieg SG552 \r]\r", "2")
menu_additem(mMENU4, "\wВзять \r[\y AK47 \r]\r", "3")
menu_additem(mMENU4, "\wВзять \r[\y M4A1 \r]\r","4")
menu_additem(mMENU4, "\wВзять \r[\y Bullpup \r]\r","5")
menu_additem(mMENU4, "\wВзять \r[\y Scout \r]\r","6")
menu_additem(mMENU4, "\wВзять \r[\y AWP \r]\r", "7")
menu_additem(mMENU4, "\wВзять \r[\y Galil \r]\r", "8")
menu_additem(mMENU4, "\wВзять \r[\y CT Auto Sniper \r]\r", "9")
menu_additem(mMENU4, "\wВзять \r[\y T Auto Sniper \r]\r", "10")
menu_setprop(mMENU4, MPROP_NEXTNAME, "\yДальше")
menu_setprop(mMENU4, MPROP_BACKNAME, "\yНазад")
menu_setprop(mMENU4, MPROP_EXITNAME, "Выход")
menu_setprop(mMENU4, MPROP_EXIT,MEXIT_ALL)

menu_display(id,mMENU4,0)
return PLUGIN_HANDLED
}

public drygoe1(id)
{
new mMENU5 = menu_create("\w[\y V.I.P \w] \r Другое", "menu_6")

menu_additem(mMENU5, "\wВзять \r[\y M249 \r]\r","1")
menu_additem(mMENU5, "\wВзять рандомно \r[\y $1-16000 \r]\r", "2")

menu_setprop(mMENU5, MPROP_EXITNAME, "\yВыход")
menu_setprop(mMENU5, MPROP_EXIT,MEXIT_ALL)

menu_display(id,mMENU5,0)
return PLUGIN_HANDLED
}

public menu_handler(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_destroy(menu)
return PLUGIN_HANDLED
}

new data[6], iName[64], access, callback
menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)

new key = str_to_num(data)

switch(key)
{
case 1:
{
vintov1(id)
}
case 2:
{
drygoe1(id)
}
}
return PLUGIN_HANDLED
}

public menu_5(id, mMENU4, item)
{
if(is_user_alive(id)&& !has_used[id] )
{
if ( round_number <= 2 )
{
ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 3 раунда!" );
return PLUGIN_HANDLED;
}
if(item == MENU_EXIT)
{
menu_destroy(mMENU4)
return PLUGIN_HANDLED;
}

new data[6], iName[64], access, callback
menu_item_getinfo(mMENU4, item, access, data, 5, iName, 63, callback)

new key = str_to_num(data)

switch(key)
{
case 1:
{
give_item(id, "weapon_famas" )
cs_set_user_bpammo( id , CSW_FAMAS, 90 )
}
case 2:
{
give_item(id, "weapon_sg552" )
cs_set_user_bpammo( id , CSW_SG552, 90 )
}
case 3:
{
give_item(id, "weapon_ak47" )
cs_set_user_bpammo( id , CSW_AK47, 90 )
}
case 4:
{
give_item(id, "weapon_m4a1" )
cs_set_user_bpammo( id , CSW_M4A1, 90 )
}
case 5:
{
give_item(id, "weapon_aug" )
cs_set_user_bpammo( id , CSW_AUG, 90 )
}
case 6:
{
give_item(id, "weapon_scout" )
cs_set_user_bpammo( id , CSW_SCOUT, 90 )
}
case 7:
{
if ( round_number <= 3 )
{
ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 4 раунда!" );
return PLUGIN_HANDLED;
}
give_item(id, "weapon_awp" )
cs_set_user_bpammo( id , CSW_AWP, 30 )
}
case 8:
{
give_item(id, "weapon_galil" )
cs_set_user_bpammo( id , CSW_GALIL, 100 )
}
case 9:
{
if ( round_number <= 4 )
{
ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
return PLUGIN_HANDLED;
}
give_item(id, "weapon_g3sg1" )
cs_set_user_bpammo( id , CSW_G3SG1, 90 )
}
case 10:
{
if ( round_number <= 4 )
{
ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
return PLUGIN_HANDLED;
}
give_item(id, "weapon_sg550" )
cs_set_user_bpammo( id , CSW_SG550, 90 )
}
}
has_used[id] = true;
}
else
{
ChatColor(id, "!g[V.I.P]!team Вы уже использовали.Подождите...");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
public menu_6(id, mMENU5, item)
{
if(is_user_alive(id)&& !has_used[id] )
{
if ( round_number <= 5 )
{
ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 6 раунда!" );
return PLUGIN_HANDLED;
}
if(item == MENU_EXIT)
{
menu_destroy(mMENU5)
return PLUGIN_HANDLED
}

new data[6], iName[64], access, callback
menu_item_getinfo(mMENU5, item, access, data, 5, iName, 63, callback)

new key = str_to_num(data)

switch(key)
{
case 1:
{
give_item(id, "weapon_m249" )
cs_set_user_bpammo( id , CSW_M249, 200 )
}
case 2:
{
loter(id)
}
}
has_used[id] = true;
}
else
{
ChatColor(id, "!g[V.I.P]!team Вы уже использовали.Подождите...");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}

public adminka(id)
{
show_motd(id, "adminka.txt")
}
public client_authorized(id)
{
client_cmd(id, "bind ^"F3^" ^"vipmenu^"")
}
public ResetHUD(id)
{
set_task(0.5, "VIP", id + 6910)
}
public VIP(TaskID)
{
new id = TaskID - 6910

if (get_user_flags(id) & VIP_FLAG)
{
for (new i = 0; i < 6; i++)
{
if (fm_strip_user_gun(id, pistols))
{
break;
}
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
write_byte(id)
write_byte(4)
message_end()
give_item( id,"weapon_hegrenade" )
give_item( id, "weapon_flashbang" );
give_item( id, "weapon_flashbang" );
give_item( id, "weapon_smokegrenade" );
give_item( id, "item_assaultsuit" );
give_item( id, "item_thighpack" );
give_item( id, "weapon_deagle")

give_item( id, "ammo_50ae" )
give_item( id, "ammo_50ae" )
give_item( id, "ammo_50ae" )
give_item( id, "ammo_50ae" )
give_item( id, "ammo_50ae" )
}
}

return PLUGIN_HANDLED
}

public ShowMotd(id)
{
show_motd(id, "vip.txt")
}
public event_new_round()
{
arrayset(has_used, false, 33)
}
public loter(id)
{
new shans;
shans = random_num(1, 16000);
cs_set_user_money(id, cs_get_user_money(id) + shans);
ChatColor(id,"!g[V.I.P]!team Вы Выйграли !g %d$ !!!", shans);
return PLUGIN_HANDLED
}

stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!team", "^3") // Team Color
replace_all(msg, 190, "!team2", "^0") // Team2 Color

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
write_byte(players);
write_string(msg);
message_end();
}
}
}
}
 

๖ۣۣۜCrAsH™

Завсегдатый
Код:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta_util>

#define VIP_FLAG ADMIN_LEVEL_H
new round_number
new bool:has_used[33]
new pistols[6] = {CSW_P228, CSW_ELITE, CSW_FIVESEVEN, CSW_GALIL, CSW_USP, CSW_GLOCK18};
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

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)

public plugin_init()
{
	register_plugin("Vip weapon V2", "2.0", "7eVen");
	register_event("ResetHUD", "ResetHUD", "be");
	register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
	register_logevent("event_new_round", 2, "1=Round_Start")
	register_clcmd("say /adminka", "adminka");
	register_clcmd("say /vipka","ShowMotd");
	register_clcmd("vipmenu", "function_menu");
	maxplayers = get_maxplayers()
	gmsgSayText = get_user_msgid("SayText")
	register_clcmd("say", "handle_say")
	register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

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

public event_round_start ( )
{
	round_number++
}

public print_adminlist(user)
{
	new adminnames[33][32]
	new message[256]
	new contactinfo[256], contact[112]
	new id, count, x, len

	for(id = 1 ; id <= maxplayers ; id++)
	{
		if(is_user_connected(id))
		{
			if(get_user_flags(id) & ADMIN_LEVEL_H)
			{
				get_user_name(id, adminnames[count++], 31)

				len = format(message, 255, "%s Випы онлайн ",COLOR)
				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, "%s ",COLOR)
						}
					}
					print_message(user, message)
				}else{
					len += format(message[len], 255-len, "Випов нету онлайн.")
					print_message(user, message)
				}

				get_cvar_string("amx_contactinfo", contact, 63)

				if(contact[0]) 
				{
					format(contactinfo, 111, "%s Контакт администратора -- %s", COLOR, contact)
					print_message(user, contactinfo)
				}
			}
		}
	}
}

print_message(id, msg[]) 
{
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}

public function_menu(id)
{
	if ( ! ( get_user_flags ( id ) & VIP_FLAG ) )
	{
		ChatColor ( id , "!g[V.I.P]!team Меню только для !g[V.I.P] !teamИграков!" );
		return PLUGIN_HANDLED;
	}
	
	new menu = menu_create("\w[\y V.I.P \w] \r Меню", "menu_handler")
	
	menu_additem(menu, "\yОружейка\r","1")
	menu_additem(menu, "\yДругое\r", "2")
	
	menu_setprop(menu, MPROP_EXITNAME, "\yВыход")
	menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
	
	menu_display(id,menu,0)
	return PLUGIN_HANDLED
}

public vintov1(id)
{
	new mMENU4 = menu_create("\w[\y V.I.P \w] \r Оружейка", "menu_5")
	
	menu_additem(mMENU4, "\wВзять \r[\y Famas \r]\r","1")
	menu_additem(mMENU4, "\wВзять \r[\y Krieg SG552 \r]\r", "2")
	menu_additem(mMENU4, "\wВзять \r[\y AK47 \r]\r", "3")
	menu_additem(mMENU4, "\wВзять \r[\y M4A1 \r]\r","4")
	menu_additem(mMENU4, "\wВзять \r[\y Bullpup \r]\r","5")
	menu_additem(mMENU4, "\wВзять \r[\y Scout \r]\r","6")
	menu_additem(mMENU4, "\wВзять \r[\y AWP \r]\r", "7")
	menu_additem(mMENU4, "\wВзять \r[\y Galil \r]\r", "8")
	menu_additem(mMENU4, "\wВзять \r[\y CT Auto Sniper \r]\r", "9")
	menu_additem(mMENU4, "\wВзять \r[\y T Auto Sniper \r]\r", "10")
	menu_setprop(mMENU4, MPROP_NEXTNAME, "\yДальше")
	menu_setprop(mMENU4, MPROP_BACKNAME, "\yНазад")
	menu_setprop(mMENU4, MPROP_EXITNAME, "Выход")
	menu_setprop(mMENU4, MPROP_EXIT,MEXIT_ALL)
	
	menu_display(id,mMENU4,0)
	return PLUGIN_HANDLED
}

public drygoe1(id)
{
	new mMENU5 = menu_create("\w[\y V.I.P \w] \r Другое", "menu_6")
	
	menu_additem(mMENU5, "\wВзять \r[\y M249 \r]\r","1")
	menu_additem(mMENU5, "\wВзять рандомно \r[\y $1-16000 \r]\r", "2")
	
	menu_setprop(mMENU5, MPROP_EXITNAME, "\yВыход")
	menu_setprop(mMENU5, MPROP_EXIT,MEXIT_ALL)
	
	menu_display(id,mMENU5,0)
	return PLUGIN_HANDLED
}

public menu_handler(id, menu, item)
{
	if(item == MENU_EXIT)
	{
		menu_destroy(menu)
		return PLUGIN_HANDLED
	}

	new data[6], iName[64], access, callback
	menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
	
	new key = str_to_num(data)
	
	switch(key)
	{
		case 1:
		{
			vintov1(id)
		}

		case 2:
		{
			drygoe1(id)
		}
	}
	return PLUGIN_HANDLED
}

public menu_5(id, mMENU4, item)
{
	if(is_user_alive(id)&& !has_used[id] )
	{
		if ( round_number <= 2 )
		{
			ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 3 раунда!" );
			return PLUGIN_HANDLED;
		}

		if(item == MENU_EXIT)
		{
			menu_destroy(mMENU4)
			return PLUGIN_HANDLED;
		}

		new data[6], iName[64], access, callback
		menu_item_getinfo(mMENU4, item, access, data, 5, iName, 63, callback)
		
		new key = str_to_num(data)

		switch(key)
		{
			case 1:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_famas" )
				cs_set_user_bpammo( id , CSW_FAMAS, 90 )
			}

			case 2:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_sg552" )
				cs_set_user_bpammo( id , CSW_SG552, 90 )
			}

			case 3:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_ak47" )
				cs_set_user_bpammo( id , CSW_AK47, 90 )
			}

			case 4:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_m4a1" )
				cs_set_user_bpammo( id , CSW_M4A1, 90 )
			}

			case 5:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_aug" )
				cs_set_user_bpammo( id , CSW_AUG, 90 )
			}

			case 6:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_scout" )
				cs_set_user_bpammo( id , CSW_SCOUT, 90 )
			}

			case 7:
			{
				if ( round_number <= 3 )
				{
					ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 4 раунда!" );
					return PLUGIN_HANDLED;
				}
				drop_weapons(id, 1)
				give_item(id, "weapon_awp" )
				cs_set_user_bpammo( id , CSW_AWP, 30 )
			}

			case 8:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_galil" )
				cs_set_user_bpammo( id , CSW_GALIL, 100 )
			}

			case 9:
			{
				if ( round_number <= 4 )
				{
					ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
					return PLUGIN_HANDLED;
				}
				drop_weapons(id, 1)
				give_item(id, "weapon_g3sg1" )
				cs_set_user_bpammo( id , CSW_G3SG1, 90 )
			}
			case 10:
			{
				if ( round_number <= 4 )
				{
					ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
					return PLUGIN_HANDLED;
				}
				drop_weapons(id, 1)
				give_item(id, "weapon_sg550" )
				cs_set_user_bpammo( id , CSW_SG550, 90 )
			}
		}
		has_used[id] = true;
	}else{
		ChatColor(id, "!g[V.I.P]!team Вы уже использовали.Подождите...");
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}

public menu_6(id, mMENU5, item)
{
	if(is_user_alive(id)&& !has_used[id] )
	{
		if ( round_number <= 5 )
		{
			ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 6 раунда!" );
			return PLUGIN_HANDLED;
		}
		if(item == MENU_EXIT)
		{
			menu_destroy(mMENU5)
			return PLUGIN_HANDLED
		}

		new data[6], iName[64], access, callback
		menu_item_getinfo(mMENU5, item, access, data, 5, iName, 63, callback)

		new key = str_to_num(data)
		
		switch(key)
		{
			case 1:
			{
				drop_weapons(id, 1)
				give_item(id, "weapon_m249" )
				cs_set_user_bpammo( id , CSW_M249, 200 )
			}

			case 2:
			{
				loter(id)
			}
		}
		has_used[id] = true;
	}else{
		ChatColor(id, "!g[V.I.P]!team Вы уже использовали.Подождите...");
		return PLUGIN_HANDLED;
	}
	return PLUGIN_HANDLED;
}

public adminka(id)
{
	show_motd(id, "adminka.txt")
}

public client_authorized(id)
{
	client_cmd(id, "bind ^"F3^" ^"vipmenu^"")
}

public ResetHUD(id)
{
	set_task(0.5, "VIP", id + 6910)
}

public VIP(TaskID)
{
	new id = TaskID - 6910

	if (get_user_flags(id) & VIP_FLAG)
	{
		for (new i = 0; i < 6; i++)
		{
			if (fm_strip_user_gun(id, pistols[i]))
			{
				break;
			}
			message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
			write_byte(id)
			write_byte(4)
			message_end()
			give_item( id,"weapon_hegrenade" )
			give_item( id, "weapon_flashbang" );
			give_item( id, "weapon_flashbang" );
			give_item( id, "weapon_smokegrenade" );
			give_item( id, "item_assaultsuit" );
			give_item( id, "item_thighpack" );
			drop_weapons(id, 2)
			give_item( id, "weapon_deagle")
			give_item( id, "ammo_50ae" )
			give_item( id, "ammo_50ae" )
			give_item( id, "ammo_50ae" )
			give_item( id, "ammo_50ae" )
			give_item( id, "ammo_50ae" )
		}
	}
	return PLUGIN_HANDLED
}

public ShowMotd(id)
{
	show_motd(id, "vip.txt")
}

public event_new_round()
{
	arrayset(has_used, false, 33)
}

public loter(id)
{
	new shans;
	shans = random_num(1, 16000);
	cs_set_user_money(id, cs_get_user_money(id) + shans);
	ChatColor(id,"!g[V.I.P]!team Вы Выйграли !g %d$ !!!", shans);
	return PLUGIN_HANDLED
}

stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!team", "^3") // Team Color
	replace_all(msg, 190, "!team2", "^0") // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players[i]))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
				write_byte(players[i]);
				write_string(msg);
				message_end();
			}
		}
	}
}

stock drop_weapons(id, dropwhat)
{
	static weapons[32], num, i, weaponid
	num = 0 
	get_user_weapons(id, weapons, num)

	for (i = 0; i < num; i++)
	{
		weaponid = weapons[i]

		if ((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
		{
			static wname[32]
			get_weaponname(weaponid, wname, charsmax(wname))

			engclient_cmd(id, "drop", wname)
		}
	}
}

p.s сложно плагин в тег code запихнуть?
 

Joraronnik

New Member
Ой извиняюсь,чето не подумал!В следующий раз так и сделаем!Извиняюсь что затруднил изменение плагина больше чем могло быть!!!Огромное Спасибо!читай ЛС!
1)Плагин работает,но при спавне когда даеться deagle,выбрасываеться usp и deagle,а в руках как не странно остаеться еще 1 дигл))))
2)deagle выбрасываеться каждый раунд и даеться новый))
ето можно подправить???
 

๖ۣۣۜCrAsH™

Завсегдатый
Код:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta_util>

#define VIP_FLAG ADMIN_LEVEL_H
new round_number
new bool:has_used[33]
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

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)

public plugin_init()
{
        register_plugin("Vip weapon V2", "2.0", "7eVen");

	RegisterHam(Ham_Spawn, "player", "SpawnPlayer")

        register_event("ResetHUD", "ResetHUD", "be");
        register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
        register_logevent("event_new_round", 2, "1=Round_Start")
        register_clcmd("say /adminka", "adminka");
        register_clcmd("say /vipka","ShowMotd");
        register_clcmd("vipmenu", "function_menu");
        maxplayers = get_maxplayers()
        gmsgSayText = get_user_msgid("SayText")
        register_clcmd("say", "handle_say")
        register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

public SpawnPlayer(id)
{
	if(is_user_alive(id) && is_user_connected(id))
	{
		give_item( id,"weapon_hegrenade" )
		give_item( id, "weapon_flashbang" );
		give_item( id, "weapon_flashbang" );
		give_item( id, "weapon_smokegrenade" );
		give_item( id, "item_assaultsuit" );
		give_item( id, "item_thighpack" );

		drop_weapons(id, 2)
		give_item( id, "weapon_deagle")
		give_item( id, "ammo_50ae" )
		give_item( id, "ammo_50ae" )
		give_item( id, "ammo_50ae" )
		give_item( id, "ammo_50ae" )
		give_item( id, "ammo_50ae" )
	}
}

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

public event_round_start ( )
{
        round_number++
}

public print_adminlist(user)
{
        new adminnames[33][32]
        new message[256]
        new contactinfo[256], contact[112]
        new id, count, x, len

        for(id = 1 ; id <= maxplayers ; id++)
        {
                if(is_user_connected(id))
                {
                        if(get_user_flags(id) & ADMIN_LEVEL_H)
                        {
                                get_user_name(id, adminnames[count++], 31)

                                len = format(message, 255, "%s Випы онлайн ",COLOR)
                                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, "%s ",COLOR)
                                                }
                                        }
                                        print_message(user, message)
                                }else{
                                        len += format(message[len], 255-len, "Випов нету онлайн.")
                                        print_message(user, message)
                                }

                                get_cvar_string("amx_contactinfo", contact, 63)

                                if(contact[0]) 
                                {
                                        format(contactinfo, 111, "%s Контакт администратора -- %s", COLOR, contact)
                                        print_message(user, contactinfo)
                                }
                        }
                }
        }
}

print_message(id, msg[]) 
{
        message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
        write_byte(id)
        write_string(msg)
        message_end()
}

public function_menu(id)
{
        if ( ! ( get_user_flags ( id ) & VIP_FLAG ) )
        {
                ChatColor ( id , "!g[V.I.P]!team Меню только для !g[V.I.P] !teamИграков!" );
                return PLUGIN_HANDLED;
        }
        
        new menu = menu_create("\w[\y V.I.P \w] \r Меню", "menu_handler")
        
        menu_additem(menu, "\yОружейка\r","1")
        menu_additem(menu, "\yДругое\r", "2")
        
        menu_setprop(menu, MPROP_EXITNAME, "\yВыход")
        menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
        
        menu_display(id,menu,0)
        return PLUGIN_HANDLED
}

public vintov1(id)
{
        new mMENU4 = menu_create("\w[\y V.I.P \w] \r Оружейка", "menu_5")
        
        menu_additem(mMENU4, "\wВзять \r[\y Famas \r]\r","1")
        menu_additem(mMENU4, "\wВзять \r[\y Krieg SG552 \r]\r", "2")
        menu_additem(mMENU4, "\wВзять \r[\y AK47 \r]\r", "3")
        menu_additem(mMENU4, "\wВзять \r[\y M4A1 \r]\r","4")
        menu_additem(mMENU4, "\wВзять \r[\y Bullpup \r]\r","5")
        menu_additem(mMENU4, "\wВзять \r[\y Scout \r]\r","6")
        menu_additem(mMENU4, "\wВзять \r[\y AWP \r]\r", "7")
        menu_additem(mMENU4, "\wВзять \r[\y Galil \r]\r", "8")
        menu_additem(mMENU4, "\wВзять \r[\y CT Auto Sniper \r]\r", "9")
        menu_additem(mMENU4, "\wВзять \r[\y T Auto Sniper \r]\r", "10")
        menu_setprop(mMENU4, MPROP_NEXTNAME, "\yДальше")
        menu_setprop(mMENU4, MPROP_BACKNAME, "\yНазад")
        menu_setprop(mMENU4, MPROP_EXITNAME, "Выход")
        menu_setprop(mMENU4, MPROP_EXIT,MEXIT_ALL)
        
        menu_display(id,mMENU4,0)
        return PLUGIN_HANDLED
}

public drygoe1(id)
{
        new mMENU5 = menu_create("\w[\y V.I.P \w] \r Другое", "menu_6")
        
        menu_additem(mMENU5, "\wВзять \r[\y M249 \r]\r","1")
        menu_additem(mMENU5, "\wВзять рандомно \r[\y $1-16000 \r]\r", "2")
        
        menu_setprop(mMENU5, MPROP_EXITNAME, "\yВыход")
        menu_setprop(mMENU5, MPROP_EXIT,MEXIT_ALL)
        
        menu_display(id,mMENU5,0)
        return PLUGIN_HANDLED
}

public menu_handler(id, menu, item)
{
        if(item == MENU_EXIT)
        {
                menu_destroy(menu)
                return PLUGIN_HANDLED
        }

        new data[6], iName[64], access, callback
        menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
        
        new key = str_to_num(data)
        
        switch(key)
        {
                case 1:
                {
                        vintov1(id)
                }

                case 2:
                {
                        drygoe1(id)
                }
        }
        return PLUGIN_HANDLED
}

public menu_5(id, mMENU4, item)
{
        if(is_user_alive(id)&& !has_used[id] )
        {
                if ( round_number <= 2 )
                {
                        ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 3 раунда!" );
                        return PLUGIN_HANDLED;
                }

                if(item == MENU_EXIT)
                {
                        menu_destroy(mMENU4)
                        return PLUGIN_HANDLED;
                }

                new data[6], iName[64], access, callback
                menu_item_getinfo(mMENU4, item, access, data, 5, iName, 63, callback)
                
                new key = str_to_num(data)

                switch(key)
                {
                        case 1:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_famas" )
                                cs_set_user_bpammo( id , CSW_FAMAS, 90 )
                        }

                        case 2:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_sg552" )
                                cs_set_user_bpammo( id , CSW_SG552, 90 )
                        }

                        case 3:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_ak47" )
                                cs_set_user_bpammo( id , CSW_AK47, 90 )
                        }

                        case 4:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_m4a1" )
                                cs_set_user_bpammo( id , CSW_M4A1, 90 )
                        }

                        case 5:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_aug" )
                                cs_set_user_bpammo( id , CSW_AUG, 90 )
                        }

                        case 6:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_scout" )
                                cs_set_user_bpammo( id , CSW_SCOUT, 90 )
                        }

                        case 7:
                        {
                                if ( round_number <= 3 )
                                {
                                        ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 4 раунда!" );
                                        return PLUGIN_HANDLED;
                                }
                                drop_weapons(id, 1)
                                give_item(id, "weapon_awp" )
                                cs_set_user_bpammo( id , CSW_AWP, 30 )
                        }

                        case 8:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_galil" )
                                cs_set_user_bpammo( id , CSW_GALIL, 100 )
                        }

                        case 9:
                        {
                                if ( round_number <= 4 )
                                {
                                        ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
                                        return PLUGIN_HANDLED;
                                }
                                drop_weapons(id, 1)
                                give_item(id, "weapon_g3sg1" )
                                cs_set_user_bpammo( id , CSW_G3SG1, 90 )
                        }
                        case 10:
                        {
                                if ( round_number <= 4 )
                                {
                                        ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
                                        return PLUGIN_HANDLED;
                                }
                                drop_weapons(id, 1)
                                give_item(id, "weapon_sg550" )
                                cs_set_user_bpammo( id , CSW_SG550, 90 )
                        }
                }
                has_used[id] = true;
        }else{
                ChatColor(id, "!g[V.I.P]!team Вы уже использовали.Подождите...");
                return PLUGIN_HANDLED;
        }
        return PLUGIN_HANDLED;
}

public menu_6(id, mMENU5, item)
{
        if(is_user_alive(id)&& !has_used[id] )
        {
                if ( round_number <= 5 )
                {
                        ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 6 раунда!" );
                        return PLUGIN_HANDLED;
                }
                if(item == MENU_EXIT)
                {
                        menu_destroy(mMENU5)
                        return PLUGIN_HANDLED
                }

                new data[6], iName[64], access, callback
                menu_item_getinfo(mMENU5, item, access, data, 5, iName, 63, callback)

                new key = str_to_num(data)
                
                switch(key)
                {
                        case 1:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_m249" )
                                cs_set_user_bpammo( id , CSW_M249, 200 )
                        }

                        case 2:
                        {
                                loter(id)
                        }
                }
                has_used[id] = true;
        }else{
                ChatColor(id, "!g[V.I.P]!team Вы уже использовали.Подождите...");
                return PLUGIN_HANDLED;
        }
        return PLUGIN_HANDLED;
}

public adminka(id)
{
        show_motd(id, "adminka.txt")
}

public client_authorized(id)
{
        client_cmd(id, "bind ^"F3^" ^"vipmenu^"")
}

public ResetHUD(id)
{
        set_task(0.5, "VIP", id + 6910)
}

public VIP(TaskID)
{
        new id = TaskID - 6910

        if (get_user_flags(id) & VIP_FLAG)
        {
		message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
		write_byte(id)
		write_byte(4)
		message_end()
        }
        return PLUGIN_HANDLED
}

public ShowMotd(id)
{
        show_motd(id, "vip.txt")
}

public event_new_round()
{
        arrayset(has_used, false, 33)
}

public loter(id)
{
        new shans;
        shans = random_num(1, 16000);
        cs_set_user_money(id, cs_get_user_money(id) + shans);
        ChatColor(id,"!g[V.I.P]!team Вы Выйграли !g %d$ !!!", shans);
        return PLUGIN_HANDLED
}

stock ChatColor(const id, const input[], any:...)
{
        new count = 1, players[32]
        static msg[191]
        vformat(msg, 190, input, 3)
        
        replace_all(msg, 190, "!g", "^4") // Green Color
        replace_all(msg, 190, "!y", "^1") // Default Color
        replace_all(msg, 190, "!team", "^3") // Team Color
        replace_all(msg, 190, "!team2", "^0") // Team2 Color
        
        if (id) players[0] = id; else get_players(players, count, "ch")
        {
                for (new i = 0; i < count; i++)
                {
                        if (is_user_connected(players[i]))
                        {
                                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
                                write_byte(players[i]);
                                write_string(msg);
                                message_end();
                        }
                }
        }
}

stock drop_weapons(id, dropwhat)
{
        static weapons[32], num, i, weaponid
        num = 0 
        get_user_weapons(id, weapons, num)

        for (i = 0; i < num; i++)
        {
                weaponid = weapons[i]

                if ((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
                {
                        static wname[32]
                        get_weaponname(weaponid, wname, charsmax(wname))

                        engclient_cmd(id, "drop", wname)
                }
        }
}
 

Joraronnik

New Member
'๖ۣۣۜCrAsH™' проблему с deagl-ам решили,а вот то что когда у тебя например есть m4a1 и ты берешб awp.m4a1 не выбрасываеться,а остаеться!В прошлом исправлении было наоборот!)))))
 

๖ۣۣۜCrAsH™

Завсегдатый
Не поленился, поставил плаг. Зашел, ввел vipmenu, предварительно купив ака, взял авп - проблем нет, так же как и с другими
 

Joraronnik

New Member
Не поленился, поставил плаг. Зашел, ввел vipmenu, предварительно купив ака, взял авп - проблем нет, так же как и с другими
ОгОгО что я обнаружил в плагине!Там нет проверки на флаг или что-то подобное!Дигл и гранаты даються при респе с 2 раунда,2 оружие при выборе с меню выбрасываеться(это хорошо),еще одна особеннасть,usp при респе не выкидываеться,а пропадает,дигл и гранаты даються всем игрокам на сервере с второго раунда))))) (это плохо)
Можешь сам проверить (или то что я поменял флаг "t" на "о" оно так себе ведет гыгыггыгыгыггыгы)
Наверное проще плагин новый написать)))))
Код:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta_util>

#define VIP_FLAG ADMIN_LEVEL_C
new round_number
new bool:has_used[33]
static const COLOR[] = "^x04" //green
static const CONTACT[] = ""
new maxplayers
new gmsgSayText

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)

public plugin_init()
{
        register_plugin("Vip weapon V2", "2.0", "7eVen");

        RegisterHam(Ham_Spawn, "player", "SpawnPlayer")

        register_event("ResetHUD", "ResetHUD", "be");
        register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
        register_logevent("event_new_round", 2, "1=Round_Start")
        register_clcmd("say /adminka", "adminka");
        register_clcmd("say /vipka","ShowMotd");
        register_clcmd("vipmenu", "function_menu");
        maxplayers = get_maxplayers()
        gmsgSayText = get_user_msgid("SayText")
        register_clcmd("say", "handle_say")
        register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
}

public SpawnPlayer(id)
{
        if(is_user_alive(id) && is_user_connected(id))
        {
                give_item( id,"weapon_hegrenade" )
                give_item( id, "weapon_flashbang" );
                give_item( id, "weapon_flashbang" );
                give_item( id, "weapon_smokegrenade" );
                give_item( id, "item_assaultsuit" );
                give_item( id, "item_thighpack" );

                drop_weapons(id, 2)
                give_item( id, "weapon_deagle")
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
        }
}

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

public event_round_start ( )
{
        round_number++
}

public print_adminlist(user)
{
        new adminnames[33][32]
        new message[256]
        new contactinfo[256], contact[112]
        new id, count, x, len

        for(id = 1 ; id <= maxplayers ; id++)
        {
                if(is_user_connected(id))
                {
                        if(get_user_flags(id) & ADMIN_LEVEL_C)
                        {
                                get_user_name(id, adminnames[count++], 31)

                                len = format(message, 255, "%s Випы онлайн ",COLOR)
                                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, "%s ",COLOR)
                                                }
                                        }
                                        print_message(user, message)
                                }else{
                                        len += format(message[len], 255-len, "Випов нету онлайн.")
                                        print_message(user, message)
                                }

                                get_cvar_string("amx_contactinfo", contact, 63)

                                if(contact[0]) 
                                {
                                        format(contactinfo, 111, "%s Контакт администратора -- %s", COLOR, contact)
                                        print_message(user, contactinfo)
                                }
                        }
                }
        }
}

print_message(id, msg[]) 
{
        message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
        write_byte(id)
        write_string(msg)
        message_end()
}

public function_menu(id)
{
        if ( ! ( get_user_flags ( id ) & VIP_FLAG ) )
        {
                ChatColor ( id , "!g[V.I.P]!team Меню только для !g[V.I.P] !teamИграков!" );
                return PLUGIN_HANDLED;
        }
        
        new menu = menu_create("\w[\y V.I.P \w] \r Меню", "menu_handler")
        
        menu_additem(menu, "\yОружейка\r","1")
        menu_additem(menu, "\yДругое\r", "2")
        
        menu_setprop(menu, MPROP_EXITNAME, "\yВыход")
        menu_setprop(menu, MPROP_EXIT,MEXIT_ALL)
        
        menu_display(id,menu,0)
        return PLUGIN_HANDLED
}

public vintov1(id)
{
        new mMENU4 = menu_create("\w[\y V.I.P \w] \r Оружейка", "menu_5")
        
        menu_additem(mMENU4, "\wВзять \r[\y Famas \r]\r","1")
        menu_additem(mMENU4, "\wВзять \r[\y Krieg SG552 \r]\r", "2")
        menu_additem(mMENU4, "\wВзять \r[\y AK47 \r]\r", "3")
        menu_additem(mMENU4, "\wВзять \r[\y M4A1 \r]\r","4")
        menu_additem(mMENU4, "\wВзять \r[\y Bullpup \r]\r","5")
        menu_additem(mMENU4, "\wВзять \r[\y Scout \r]\r","6")
        menu_additem(mMENU4, "\wВзять \r[\y AWP \r]\r", "7")
        menu_additem(mMENU4, "\wВзять \r[\y Galil \r]\r", "8")
        menu_additem(mMENU4, "\wВзять \r[\y CT Auto Sniper \r]\r", "9")
        menu_additem(mMENU4, "\wВзять \r[\y T Auto Sniper \r]\r", "10")
        menu_setprop(mMENU4, MPROP_NEXTNAME, "\yДальше")
        menu_setprop(mMENU4, MPROP_BACKNAME, "\yНазад")
        menu_setprop(mMENU4, MPROP_EXITNAME, "Выход")
        menu_setprop(mMENU4, MPROP_EXIT,MEXIT_ALL)
        
        menu_display(id,mMENU4,0)
        return PLUGIN_HANDLED
}

public drygoe1(id)
{
        new mMENU5 = menu_create("\w[\y V.I.P \w] \r Другое", "menu_6")
        
        menu_additem(mMENU5, "\wВзять \r[\y M249 \r]\r","1")
        menu_additem(mMENU5, "\wВзять рандомно \r[\y $1-16000 \r]\r", "2")
        
        menu_setprop(mMENU5, MPROP_EXITNAME, "\yВыход")
        menu_setprop(mMENU5, MPROP_EXIT,MEXIT_ALL)
        
        menu_display(id,mMENU5,0)
        return PLUGIN_HANDLED
}

public menu_handler(id, menu, item)
{
        if(item == MENU_EXIT)
        {
                menu_destroy(menu)
                return PLUGIN_HANDLED
        }

        new data[6], iName[64], access, callback
        menu_item_getinfo(menu, item, access, data, 5, iName, 63, callback)
        
        new key = str_to_num(data)
        
        switch(key)
        {
                case 1:
                {
                        vintov1(id)
                }

                case 2:
                {
                        drygoe1(id)
                }
        }
        return PLUGIN_HANDLED
}

public menu_5(id, mMENU4, item)
{
        if(is_user_alive(id)&& !has_used[id] )
        {
                if ( round_number <= 2 )
                {
                        ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 3 раунда!" );
                        return PLUGIN_HANDLED;
                }

                if(item == MENU_EXIT)
                {
                        menu_destroy(mMENU4)
                        return PLUGIN_HANDLED;
                }

                new data[6], iName[64], access, callback
                menu_item_getinfo(mMENU4, item, access, data, 5, iName, 63, callback)
                
                new key = str_to_num(data)

                switch(key)
                {
                        case 1:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_famas" )
                                cs_set_user_bpammo( id , CSW_FAMAS, 90 )
                        }

                        case 2:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_sg552" )
                                cs_set_user_bpammo( id , CSW_SG552, 90 )
                        }

                        case 3:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_ak47" )
                                cs_set_user_bpammo( id , CSW_AK47, 90 )
                        }

                        case 4:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_m4a1" )
                                cs_set_user_bpammo( id , CSW_M4A1, 90 )
                        }

                        case 5:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_aug" )
                                cs_set_user_bpammo( id , CSW_AUG, 90 )
                        }

                        case 6:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_scout" )
                                cs_set_user_bpammo( id , CSW_SCOUT, 90 )
                        }

                        case 7:
                        {
                                if ( round_number <= 3 )
                                {
                                        ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 4 раунда!" );
                                        return PLUGIN_HANDLED;
                                }
                                drop_weapons(id, 1)
                                give_item(id, "weapon_awp" )
                                cs_set_user_bpammo( id , CSW_AWP, 30 )
                        }

                        case 8:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_galil" )
                                cs_set_user_bpammo( id , CSW_GALIL, 100 )
                        }

                        case 9:
                        {
                                if ( round_number <= 4 )
                                {
                                        ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
                                        return PLUGIN_HANDLED;
                                }
                                drop_weapons(id, 1)
                                give_item(id, "weapon_g3sg1" )
                                cs_set_user_bpammo( id , CSW_G3SG1, 90 )
                        }
                        case 10:
                        {
                                if ( round_number <= 4 )
                                {
                                        ChatColor ( id , "!g[V.I.P]!team Это оружие доступно с 5 раунда!" );
                                        return PLUGIN_HANDLED;
                                }
                                drop_weapons(id, 1)
                                give_item(id, "weapon_sg550" )
                                cs_set_user_bpammo( id , CSW_SG550, 90 )
                        }
                }
                has_used[id] = true;
        }else{
                ChatColor(id, "!g[V.I.P]!team Вы уже использовали. Подождите...");
                return PLUGIN_HANDLED;
        }
        return PLUGIN_HANDLED;
}

public menu_6(id, mMENU5, item)
{
        if(is_user_alive(id)&& !has_used[id] )
        {
                if ( round_number <= 5 )
                {
                        ChatColor ( id , "!g[V.I.P]!team Это действие доступно с 6 раунда!" );
                        return PLUGIN_HANDLED;
                }
                if(item == MENU_EXIT)
                {
                        menu_destroy(mMENU5)
                        return PLUGIN_HANDLED
                }

                new data[6], iName[64], access, callback
                menu_item_getinfo(mMENU5, item, access, data, 5, iName, 63, callback)

                new key = str_to_num(data)
                
                switch(key)
                {
                        case 1:
                        {
                                drop_weapons(id, 1)
                                give_item(id, "weapon_m249" )
                                cs_set_user_bpammo( id , CSW_M249, 200 )
                        }

                        case 2:
                        {
                                loter(id)
                        }
                }
                has_used[id] = true;
        }else{
                ChatColor(id, "!g[V.I.P]!team Вы уже использовали. Подождите...");
                return PLUGIN_HANDLED;
        }
        return PLUGIN_HANDLED;
}

public adminka(id)
{
        show_motd(id, "adminka.txt")
}

public client_authorized(id)
{
        client_cmd(id, "bind ^"F3^" ^"vipmenu^"")
}

public ResetHUD(id)
{
        set_task(0.5, "VIP", id + 6910)
}

public VIP(TaskID)
{
        new id = TaskID - 6910

        if (get_user_flags(id) & VIP_FLAG)
        {
                message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
                write_byte(id)
                write_byte(4)
                message_end()
        }
        return PLUGIN_HANDLED
}

public ShowMotd(id)
{
        show_motd(id, "vip.txt")
}

public event_new_round()
{
        arrayset(has_used, false, 33)
}

public loter(id)
{
        new shans;
        shans = random_num(1, 16000);
        cs_set_user_money(id, cs_get_user_money(id) + shans);
        ChatColor(id,"!g[V.I.P]!team Вы Выйграли !g %d$ !!!", shans);
        return PLUGIN_HANDLED
}

stock ChatColor(const id, const input[], any:...)
{
        new count = 1, players[32]
        static msg[191]
        vformat(msg, 190, input, 3)
        
        replace_all(msg, 190, "!g", "^4") // Green Color
        replace_all(msg, 190, "!y", "^1") // Default Color
        replace_all(msg, 190, "!team", "^3") // Team Color
        replace_all(msg, 190, "!team2", "^0") // Team2 Color
        
        if (id) players[0] = id; else get_players(players, count, "ch")
        {
                for (new i = 0; i < count; i++)
                {
                        if (is_user_connected(players[i]))
                        {
                                message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
                                write_byte(players[i]);
                                write_string(msg);
                                message_end();
                        }
                }
        }
}

stock drop_weapons(id, dropwhat)
{
        static weapons[32], num, i, weaponid
        num = 0 
        get_user_weapons(id, weapons, num)

        for (i = 0; i < num; i++)
        {
                weaponid = weapons[i]

                if ((dropwhat == 1 && ((1<<weaponid) & PRIMARY_WEAPONS_BIT_SUM)) || (dropwhat == 2 && ((1<<weaponid) & SECONDARY_WEAPONS_BIT_SUM)))
                {
                        static wname[32]
                        get_weaponname(weaponid, wname, charsmax(wname))

                        engclient_cmd(id, "drop", wname)
                }
        }
}
 

๖ۣۣۜCrAsH™

Завсегдатый
Замени

Код:
public SpawnPlayer(id)
{
        
        if(is_user_alive(id) && is_user_connected(id))
        {
                give_item( id,"weapon_hegrenade" )
                give_item( id, "weapon_flashbang" );
                give_item( id, "weapon_flashbang" );
                give_item( id, "weapon_smokegrenade" );
                give_item( id, "item_assaultsuit" );
                give_item( id, "item_thighpack" );

                drop_weapons(id, 2)
                give_item( id, "weapon_deagle")
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
        }
}
на

Код:
public SpawnPlayer(id)
{
        if(is_user_alive(id) && is_user_connected(id) && get_user_flags(id) & VIP_FLAG)
        {
                give_item( id,"weapon_hegrenade" )
                give_item( id, "weapon_flashbang" );
                give_item( id, "weapon_flashbang" );
                give_item( id, "weapon_smokegrenade" );
                give_item( id, "item_assaultsuit" );
                give_item( id, "item_thighpack" );

                drop_weapons(id, 2)
                give_item( id, "weapon_deagle")
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
                give_item( id, "ammo_50ae" )
        }
}
 
Сверху