Здравствуйте, гость ( Вход | Регистрация )


JOMUS
no avatar
<-FirstBlood->

Группа: <Users>
Сообщений: 1
Регистрация: 19.7.2022
Пользователь №: 14 282

Отправлено: 19.7.2022, 10:08
В КОДЕ :
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <strip_weapon>
#include <fakemeta>
#include <engine>
#define VIP_FLAG ADMIN_LEVEL_H //флаг доступа для вип по умолчанию t
#define RegisterMenu(%1,%2) register_menucmd(register_menuid(%1),1023,%2)
// backweapons
#define is_weapon_primary(%1) (PRIMARY_WEAPONS & (1<<%1))
#define cs_get_weapon_type(%1) get_pdata_int(%1, OFFSET_WEAPONTYPE, EXTRAOFFSET_WEAPONS)
#define cs_get_user_hasprim(%1) get_pdata_int(%1, OFFSET_PRIMARYWEAPON)
#define cs_get_user_autoswitch(%1) get_pdata_int(%1, OFFSET_AUTOSWITCH)
#define cs_get_user_shield(%1) (get_pdata_int(%1, OFFSET_SHIELD) & HAS_SHIELD) ? 1 : 0
#define MAX_PLAYERS 32
#define OFFSET_PRIMARYWEAPON 116
#define OFFSET_WEAPONTYPE 43
#define EXTRAOFFSET_WEAPONS 4
#define OFFSET_AUTOSWITCH 509
#define OFFSET_SHIELD 510
#define HAS_SHIELD (1<<24)
#define PRIMARY_WEAPONS (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)
//
#define PRIMARY_ONLY 1
#define SECONDARY_ONLY 2
#define GRENADES_ONLY 4



new AK_W_MODEL_D[] = "models/w_ak47.mdl"
new M4_W_MODEL_D[] = "models/w_m4a1.mdl"
new DG_W_MODEL_D[] = "models/w_deagle.mdl"
new AWP_W_MODEL_D[] = "models/w_awp.mdl"
new FMS_W_MODEL_D[] = "models/w_famas.mdl"
new AK_V_MODEL[] = "models/dp/v_ak47.mdl"
new M4_V_MODEL[] = "models/dp/v_m4a1.mdl"
new DG_V_MODEL[] = "models/dp/v_deagle.mdl"
new AWP_V_MODEL[] = "models/dp/v_awp.mdl"
new FMS_V_MODEL[] = "models/dp/v_famas.mdl"
new AK_P_MODEL[] = "models/dp/p_ak47.mdl"
new M4_P_MODEL[] = "models/dp/p_m4a1.mdl"
new DG_P_MODEL[] = "models/dp/p_deagle.mdl"
new AWP_P_MODEL[] = "models/dp/p_awp.mdl"
new FMS_P_MODEL[] = "models/dp/p_famas.mdl"
new AK_W_MODEL[] = "models/dp/w_ak47.mdl"
new M4_W_MODEL[] = "models/dp/w_m4a1.mdl"
new DG_W_MODEL[] = "models/dp/w_deagle.mdl"
new AWP_W_MODEL[] = "models/dp/w_awp.mdl"
new FMS_W_MODEL[] = "models/dp/w_famas.mdl"
new AK_V_MODEL_ASI[] = "models/dp/v_ak47_asi.mdl"
new M4_V_MODEL_ASI[] = "models/dp/v_m4a1_asi.mdl"
new DG_V_MODEL_ASI[] = "models/dp/v_deagle_asi.mdl"
new AWP_V_MODEL_ASI[] = "models/dp/v_awp_asi.mdl"
new FMS_V_MODEL_ASI[] = "models/dp/v_famas_asi.mdl"
new AK_P_MODEL_ASI[] = "models/dp/p_ak47_asi_v2.mdl"
new M4_P_MODEL_ASI[] = "models/dp/p_m4a1_asi_v2.mdl"
new DG_P_MODEL_ASI[] = "models/dp/p_deagle_asi.mdl"
new AWP_P_MODEL_ASI[] = "models/dp/p_awp_asi_v2.mdl"
new FMS_P_MODEL_ASI[] = "models/dp/p_famas_asi.mdl"
new AK_W_MODEL_ASI[] = "models/dp/w_ak47_asi_v2.mdl"
new M4_W_MODEL_ASI[] = "models/dp/w_m4a1_asi_v2.mdl"
new DG_W_MODEL_ASI[] = "models/dp/w_deagle_asi.mdl"
new AWP_W_MODEL_ASI[] = "models/dp/w_awp_asi_v2.mdl"
new FMS_W_MODEL_ASI[] = "models/dp/w_famas_asi.mdl"
new dkmodel_p[] = "models/dp/dk.mdl"
new dkmodel_w[] = "models/dp/w_thighpack.mdl"
new dkclass[] = "backdk"
new g_weaponent[MAX_PLAYERS+1]
new g_weaponclass[] = "backweapon"
new g_weaponmodel[] = "models/backweaponsnew.mdl"
stock IsBlockMap(){
new got_line, line_num, len;
new cfgdir[64];
new cfgpath[64];
new mapname[64];
new txt[64];
get_localinfo("amxx_configsdir", cfgdir, charsmax(cfgdir));
get_mapname(mapname, charsmax(cfgdir));
formatex(cfgpath, charsmax(cfgpath), "%s/vip/gold_block_maps.cfg", cfgdir);
if (file_exists(cfgpath))
{
got_line = read_file(cfgpath, line_num, txt,charsmax(cfgpath), len);
while (got_line>0)
{
if (equali(txt, mapname)) return 1;
line_num++;
got_line = read_file(cfgpath, line_num, txt, charsmax(cfgpath), len);
}
}
return 0;
}
public plugin_precache(){
precache_model(g_weaponmodel)
precache_model(AK_V_MODEL)
precache_model(AK_P_MODEL)
precache_model(AK_W_MODEL)
precache_model(M4_V_MODEL)
precache_model(M4_P_MODEL)
precache_model(M4_W_MODEL)
precache_model(DG_V_MODEL)
precache_model(DG_P_MODEL)
precache_model(DG_W_MODEL)
precache_model(AWP_V_MODEL)
precache_model(AWP_P_MODEL)
precache_model(AWP_W_MODEL)
precache_model(FMS_V_MODEL)
precache_model(FMS_P_MODEL)
precache_model(FMS_W_MODEL)
precache_model(AK_V_MODEL_ASI)
precache_model(AK_P_MODEL_ASI)
precache_model(AK_W_MODEL_ASI)
precache_model(M4_V_MODEL_ASI)
precache_model(M4_P_MODEL_ASI)
precache_model(M4_W_MODEL_ASI)
precache_model(DG_V_MODEL_ASI)
precache_model(DG_P_MODEL_ASI)
precache_model(DG_W_MODEL_ASI)
precache_model(AWP_V_MODEL_ASI)
precache_model(AWP_P_MODEL_ASI)
precache_model(AWP_W_MODEL_ASI)
precache_model(FMS_V_MODEL_ASI)
precache_model(FMS_P_MODEL_ASI)
precache_model(FMS_W_MODEL_ASI)
precache_model(dkmodel_p)
precache_model(dkmodel_w)
}
new g_weapons[][] =
{
"weapon_p228",
"weapon_scout",
"weapon_hegrenade",
"weapon_xm1014",
"weapon_c4",
"weapon_mac10",
"weapon_aug",
"weapon_smokegrenade",
"weapon_elite",
"weapon_fiveseven",
"weapon_ump45",
"weapon_sg550",
"weapon_galil",
"weapon_famas",
"weapon_usp",
"weapon_glock18",
"weapon_awp",
"weapon_mp5navy",
"weapon_m249",
"weapon_m3",
"weapon_m4a1",
"weapon_tmp",
"weapon_g3sg1",
"weapon_flashbang",
"weapon_deagle",
"weapon_sg552",
"weapon_ak47",
"weapon_knife",
"weapon_p90"
}
new bool:gold[4562],bool:asi[4562],set_weapon[33]
new bool:dkgold[33]
new dgid,round_number,weapon_gives[33],awp_gives[33],buytime
new iKey = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<9)
new bool:autoshow[33]
new bool:dmgadder = true
new Float:dmgadder_c
new cv_p[33]
new bool:en_map_r
new bool:vip_b_en
new bool:ADDER[33]
new r_en
new chance_g,chance_asi,vip_tag_en
new dk_enabled,backweapons
new bool:dk_enabled_fwm
new g_weaponent2[33]
new max_pl
public plugin_init(){
register_plugin("VIP", "1.5", "by4udilo")
register_dictionary("vip_gold.txt");
cv_p[0] = register_cvar("vip_enabled", "1") // pCVar_enabled
cv_p[1] = register_cvar("vip_armor_round", "1") // = vip_armor_r
cv_p[2] = register_cvar("vip_dk_round", "2") //vip_dk_r
cv_p[3] = register_cvar("vip_gr_round", "2") // = vip_gr_r
cv_p[4] = register_cvar("vip_dg_round", "2") // = vip_dg_r
cv_p[5] = register_cvar("vip_menu_round", "1") //vip_menu_r
cv_p[6] = register_cvar("vip_awp_start", "4") //vip_awp_s
cv_p[7] = register_cvar("vip_awp_delay", "3") //vip_awp_d
cv_p[8] = register_cvar("vip_buy_time", "60") //vip_buy_t
cv_p[9] = register_cvar("vip_dmg", "1") //dmg_enabled
cv_p[10] = register_cvar("vip_bonus_dmg", "105") //dmg_add
cv_p[11] = register_cvar("vip_dmgmsg", "1") //dmg_message
r_en = register_cvar("vip_weaponrandom", "1")
cv_p[14] = register_cvar("vip_random_all", "1")
cv_p[15] = register_cvar("vip_random_g", "10")
cv_p[16] = register_cvar("vip_random_a", "10")
dk_enabled = register_cvar("vip_dk_en", "1")
backweapons = register_cvar("backweapons_en", "1")
max_pl = get_maxplayers()

vip_tag_en = register_cvar("vip_tag", "1")
new cfg[256]
get_configsdir(cfg,255)
server_cmd("exec %s/vip/vip_asi&&gold.cfg",cfg)
server_exec();
get_pcvar_num(dk_enabled) ? (dk_enabled_fwm = true) : (dk_enabled_fwm = false)

dmgadder_c = get_pcvar_num(cv_p[10]) * 0.01
if(!get_pcvar_num(cv_p[9]) || get_pcvar_num(cv_p[10]) == 100 ) dmgadder = false
if(get_pcvar_num(cv_p[14])) en_map_r = true
// vip_on_random()
if(get_pcvar_num(cv_p[0])){
IsBlockMap() ? (vip_b_en = false) : (vip_b_en = true)
RegisterHam(Ham_Spawn,"player","SPAWN",1)
RegisterMenu( "weaponmenu", "Actionweaponmenu" ) ;

if(get_pcvar_num(cv_p[8]) != 0) set_task(1.0, "buytimer", _, _, _, "b")
if(dmgadder){
RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage_Pre", 0);
dmgadder_c = get_pcvar_num(cv_p[10]) * 0.01
RegisterHam( Ham_Item_Deploy, "weapon_deagle" , "hamdeagle2", 0);
RegisterHam( Ham_Item_Deploy, "weapon_ak47" , "hamak472", 0);
RegisterHam( Ham_Item_Deploy, "weapon_m4a1" , "hamm4a12", 0);
RegisterHam( Ham_Item_Deploy, "weapon_awp" , "hamawp2", 0);
RegisterHam( Ham_Item_Deploy, "weapon_famas" , "hamfamas2", 0);
}
RegisterHam(Ham_AddPlayerItem,"player","bacon_addplayeritem")
RegisterHam( Ham_Item_Deploy, "weapon_deagle" , "hamdeagle", 1);
RegisterHam( Ham_Item_Deploy, "weapon_ak47" , "hamak47", 1);
RegisterHam( Ham_Item_Deploy, "weapon_m4a1" , "hamm4a1", 1);
RegisterHam( Ham_Item_Deploy, "weapon_awp" , "hamawp", 1);
RegisterHam( Ham_Item_Deploy, "weapon_famas" , "hamfamas", 1);


register_forward(FM_SetModel, "set_model", 1)
RegisterHam(Ham_Spawn, "weaponbox", "SpawnWeaponBox_Post", true);


if(get_pcvar_num(r_en)){
chance_g = get_pcvar_num(cv_p[15])
chance_asi = get_pcvar_num(cv_p[16])
RegisterHam(Ham_Touch, "armoury_entity", "fw_TouchPre2",0) //weaponbox
RegisterHam(Ham_Touch, "armoury_entity", "fw_TouchPre3",1) // или в хам деплой_ хз
register_srvcmd("vip_randommap","vip_map")
if(get_pcvar_num(cv_p[14])) en_map_r = true
vip_wrandom()

}
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_event("TextMsg","EventRestart","a","2&#Game_w")
register_event("TextMsg","EventRestart","a","2&#Game_C");
register_clcmd( "weaponmenu", "open_weaponmenu" ) ;
register_clcmd( "say /weaponmenu", "open_weaponmenu" ) ;
register_clcmd( "say_team /weaponmenu", "open_weaponmenu" ) ;
register_clcmd( "say /menu", "open_weaponmenu" ) ;
register_clcmd( "say_team /menu", "open_weaponmenu" ) ;
if(get_pcvar_num(dk_enabled)){
RegisterHam(Ham_Touch, "item_thighpack","dkgold_pre",1)
}
if(get_pcvar_num(dk_enabled) || get_pcvar_num(backweapons))
register_event("DeathMsg","event_death","a")

if(get_pcvar_num(backweapons)){
RegisterHam(Ham_RemovePlayerItem, "player", "bacon_removeplayeritem")

for(new i = 0; i < sizeof g_weapons; i++)
{
RegisterHam(Ham_Item_AttachToPlayer, g_weapons, "bacon_item_attachtoplayer_post", 1)
RegisterHam(Ham_Item_Deploy, g_weapons, "bacon_item_deploy_post", 1)
}
}

state SetModelDisabled;
}
}
public EventRestart(){
set_task(0.1,"clear_ents") // событие нового раунда вызывается раньше события удаления лежащего оружия,насчет рестарта лень тестить
arrayset(awp_gives, 0, sizeof awp_gives);
round_number = 0
}

public dkgold_pre(ent, id){
if(!is_user_alive(id)) return 0
static model[32]
// if(!cs_get_user_defuse(id) && cs_get_user_team(id) == 2 ){
entity_get_string(ent, EV_SZ_model, model, charsmax(model))
if(equali(model, dkmodel_w, charsmax(model)))
dkgold_set(id)
// }
return 1
}

public bacon_item_deploy_post(ent)
{
static id; id = pev(ent, pev_owner)
if(is_user_alive(id))
{
if(is_weapon_primary(cs_get_weapon_type(ent)) || cs_get_user_shield(id))
fm_set_entity_visibility(g_weaponent[id], 0)

else if(cs_get_user_hasprim(id))
fm_set_entity_visibility(g_weaponent[id], 1)
}
}
public bacon_removeplayeritem(id, ent)
{
if(is_weapon_primary(cs_get_weapon_type(ent)) && pev_valid(g_weaponent[id]))
fm_set_entity_visibility(g_weaponent[id], 0)
}
public bacon_item_attachtoplayer_post(ent, id) if(is_user_alive(id) && !cs_get_user_autoswitch(id))
{
if(is_weapon_primary(cs_get_weapon_type(ent)) && pev_valid(g_weaponent[id]))
fm_set_entity_visibility(g_weaponent[id], 1)
}
public dkgold_set(id){
if(_:cs_get_user_team(id) == 2){
if(round_number >= get_pcvar_num(cv_p[2])){
give_item(id,"item_thighpack")
if(get_pcvar_num(dk_enabled)){
cs_set_user_submodel(id, 0)
dkgold[id] = true
fm_set_entity_visibility(g_weaponent2[id], 1)
set_pev(g_weaponent2[id], pev_body, 1)
}
}
}else{
if(get_pcvar_num(dk_enabled)){
fm_set_entity_visibility(g_weaponent2[id], 0)
dkgold[id] = false
}
}
}
public client_disconnect(id)
{
if(get_pcvar_num(dk_enabled)){
if(g_weaponent2[id] > 0 && pev_valid(g_weaponent2[id]))
engfunc(EngFunc_RemoveEntity, g_weaponent2[id])
dkgold[id] = false
}
if(get_pcvar_num(backweapons)){
if(g_weaponent[id] > 0 && pev_valid(g_weaponent[id]))
engfunc(EngFunc_RemoveEntity, g_weaponent[id])
g_weaponent[id] = 0
}
}
public client_putinserver(id){
autoshow[id] = true
set_weapon[id] = 0
if(get_pcvar_num(dk_enabled)){
static infotarget2
if(!infotarget2) infotarget2 = engfunc(EngFunc_AllocString, "info_target")
g_weaponent2[id] = engfunc(EngFunc_CreateNamedEntity, infotarget2)
if(pev_valid(g_weaponent2[id]))
{
engfunc(EngFunc_SetModel, g_weaponent2[id], dkmodel_p)
set_pev(g_weaponent2[id], pev_classname, dkclass)
set_pev(g_weaponent2[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_weaponent2[id], pev_effects, EF_NODRAW)
set_pev(g_weaponent2[id], pev_aiment, id)
}
}
if(get_pcvar_num(backweapons)){
static infotarget
if(!infotarget) infotarget = engfunc(EngFunc_AllocString, "info_target")

g_weaponent[id] = engfunc(EngFunc_CreateNamedEntity, infotarget)
if(pev_valid(g_weaponent[id]))
{
engfunc(EngFunc_SetModel, g_weaponent[id], g_weaponmodel)
set_pev(g_weaponent[id], pev_classname, g_weaponclass)
set_pev(g_weaponent[id], pev_movetype, MOVETYPE_FOLLOW)
set_pev(g_weaponent[id], pev_effects, EF_NODRAW)
set_pev(g_weaponent[id], pev_aiment, id)
}
}
}

public event_death(){
if(get_pcvar_num(dk_enabled)){
fm_set_entity_visibility(g_weaponent2[read_data(2)], 0)
dkgold[read_data(2)] ? (dgid = read_data(2)) : (dgid = 0)
dkgold[read_data(2)] = false
}
if(get_pcvar_num(backweapons)){
fm_set_entity_visibility(g_weaponent[read_data(2)], 0)
}
}

public fw_TouchPre2(ent, id){
if(!is_user_alive(id)) return 0
static model[32]
entity_get_string(ent, EV_SZ_model, model, charsmax(model))
if(equali(model, AK_W_MODEL_ASI, charsmax(model))){
if(!cs_get_user_hasprim(id)){
asi[id]=true
}
}
if(equali(model, AK_W_MODEL, charsmax(model))){
if(!cs_get_user_hasprim(id)){
gold[id]=true
}
}
if(equali(model, AWP_W_MODEL_ASI, charsmax(model))){
if(!cs_get_user_hasprim(id)){
asi[id]=true
}
}
if(equali(model, AWP_W_MODEL, charsmax(model))){
if(!cs_get_user_hasprim(id)){
gold[id]=true
}
}
if(equali(model, FMS_W_MODEL_ASI, charsmax(model))){
if(!cs_get_user_hasprim(id)){
asi[id]=true
}
}
if(equali(model, FMS_W_MODEL, charsmax(model))){
if(!cs_get_user_hasprim(id)){
gold[id]=true
}
}
if(equali(model, M4_W_MODEL_ASI, charsmax(model))){
if(!cs_get_user_hasprim(id)){
asi[id]=true
}
}
if(equali(model, M4_W_MODEL, charsmax(model))){
if(!cs_get_user_hasprim(id)){
gold[id]=true
}
}
if(equali(model, DG_W_MODEL_ASI, charsmax(model))){
if(!user_has_weapon(id,SECONDARY_ONLY))
asi[id]=true
}
if(equali(model, DG_W_MODEL, charsmax(model))){
if(!user_has_weapon(id,SECONDARY_ONLY)){
gold[id]=true
}
}
return 1
}

public fw_TouchPre3(ent, id){
asi[id]=false
gold[id]=false
}

public vip_map(){
new mapname[33],currentmap[33];read_args(mapname,32);remove_quotes(mapname)
get_mapname(currentmap,charsmax(currentmap))
if(equal(mapname,currentmap)) en_map_r = true
}

public SpawnWeaponBox_Post(const ent)
{
state SetModelEnabled;
}

public set_model(ent, model[]) <SetModelDisabled>
return;

public set_model(ent, model[]) <SetModelEnabled>
{
if(!pev_valid(ent))
return;

state SetModelDisabled;

if(equali(model, "models/w_ak47.mdl", 12)){
new ModelWeapon
ModelWeapon = find_ent_by_owner ( -1, "weapon_ak47", ent )
if(gold[ModelWeapon])
engfunc(EngFunc_SetModel, ent, AK_W_MODEL)
if(asi[ModelWeapon])
engfunc(EngFunc_SetModel, ent, AK_W_MODEL_ASI)
}
if(equali(model, "models/w_m4a1.mdl", 12)){
new ModelWeapon
ModelWeapon = find_ent_by_owner ( -1, "weapon_m4a1", ent )
if(gold[ModelWeapon])
engfunc(EngFunc_SetModel, ent, M4_W_MODEL)
if(asi[ModelWeapon])
engfunc(EngFunc_SetModel, ent, M4_W_MODEL_ASI)
}
if(equali(model, "models/w_deagle.mdl", 12)){
new ModelWeapon
ModelWeapon = find_ent_by_owner ( -1, "weapon_deagle", ent )
if(gold[ModelWeapon])
engfunc(EngFunc_SetModel, ent, DG_W_MODEL)
if(asi[ModelWeapon])
engfunc(EngFunc_SetModel, ent, DG_W_MODEL_ASI)
}
if(equali(model, "models/w_awp.mdl", 12)){
new ModelWeapon
ModelWeapon = find_ent_by_owner ( -1, "weapon_awp", ent )
if(gold[ModelWeapon])
engfunc(EngFunc_SetModel, ent, AWP_W_MODEL)
if(asi[ModelWeapon])
engfunc(EngFunc_SetModel, ent, AWP_W_MODEL_ASI)
}
if(equali(model, "models/w_famas.mdl", 12)){
new ModelWeapon
ModelWeapon = find_ent_by_owner ( -1, "weapon_famas", ent )
if(gold[ModelWeapon])
engfunc(EngFunc_SetModel, ent, FMS_W_MODEL)
if(asi[ModelWeapon])
engfunc(EngFunc_SetModel, ent, FMS_W_MODEL_ASI)
}
if(dk_enabled_fwm){
if(equal(model, "models/w_thighpack.mdl",13))
{
new String[11]
num_to_str(dgid,String,10)
entity_set_string(ent, EV_ENT_owner, String)
if(dgid != 0){
engfunc(EngFunc_SetModel, ent, dkmodel_w)
dkgold[dgid] = true
dgid = 0
}
}
}
}
public hamdeagle2( entity ) ADDER[get_pdata_cbase( entity, 41, 4 )] = false
public hamak472( entity ) ADDER[get_pdata_cbase( entity, 41, 4 )] = false
public hamm4a12( entity ) ADDER[get_pdata_cbase( entity, 41, 4 )] = false
public hamawp2( entity ) ADDER[get_pdata_cbase( entity, 41, 4 )] = false
public hamfamas2( entity ) ADDER[get_pdata_cbase( entity, 41, 4 )] = false

public hamdeagle( entity )
{
if(gold[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, DG_V_MODEL)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, DG_P_MODEL)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
if(asi[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, DG_V_MODEL_ASI)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, DG_P_MODEL_ASI)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
}
public hamak47( entity )
{
if(gold[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, AK_V_MODEL)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, AK_P_MODEL)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
if(asi[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, AK_V_MODEL_ASI)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, AK_P_MODEL_ASI)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
}
public hamm4a1( entity )
{
if(gold[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, M4_V_MODEL)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, M4_P_MODEL)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
if(asi[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, M4_V_MODEL_ASI)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, M4_P_MODEL_ASI)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
}
public hamawp( entity )
{
if(gold[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, AWP_V_MODEL)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, AWP_P_MODEL)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
if(asi[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, AWP_V_MODEL_ASI)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, AWP_P_MODEL_ASI)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
}

public hamfamas( entity )
{
if(gold[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, FMS_V_MODEL)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, FMS_P_MODEL)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
if(asi[entity] == true){
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_viewmodel2, FMS_V_MODEL_ASI)
set_pev(get_pdata_cbase( entity, 41, 4 ), pev_weaponmodel2, FMS_P_MODEL_ASI)
ADDER[get_pdata_cbase( entity, 41, 4 )] = true
}
}
public fw_TakeDamage_Pre(victim, inflictor, attacker, Float:damage, bits){
if(1 <= attacker <= max_pl) if(ADDER[attacker]) if(bits & DMG_BULLET) SetHamParamFloat(4, damage * dmgadder_c)
}

public bacon_addplayeritem(id, ent){
if(gold[id] == true) gold[ent] = true
if(asi[id] == true) asi[ent] = true
if(get_pcvar_num(backweapons)){
static weaponid; weaponid = cs_get_weapon_type(ent)

if(is_weapon_primary(weaponid) && pev_valid(g_weaponent[id]))
{
fm_set_entity_visibility(g_weaponent[id], 0)
if(gold[ent] == false && asi[ent] == false)
set_pev(g_weaponent[id], pev_body, get_weapon_model(weaponid))
if(gold[ent] == true)
set_pev(g_weaponent[id], pev_body, get_weapon_modelgold(weaponid))
if(asi[ent] == true)
set_pev(g_weaponent[id], pev_body, get_weapon_modelasi(weaponid))
}
}
}
public event_round_start(){
round_number++
buytime = get_pcvar_num(cv_p[8])
set_task(0.1,"clear_ents") // событие нового раунда вызывается раньше удаления лежащего оружия
}
public clear_ents(){
for(new i=1;i<=(global_get(glb_maxEntities));i++){
if(!is_valid_ent(i)){ //!is_valid_ent(i)
gold = false
asi = false
}
}
}
public vip_wrandom(){
if(!en_map_r) return 0
for(new i=1;i<=global_get(glb_maxEntities);i++){
if(!pev_valid(i)) return 0
static szClassName[33]
entity_get_string(i, EV_SZ_classname, szClassName, charsmax(szClassName))
if(equal(szClassName,"armoury_entity")){
//этот шансовый код
new model
if(random_num(0,100-(chance_g+chance_asi)) < chance_g+chance_asi)
model = random_num(0,chance_g) > random_num(0,chance_asi) ? 1 : 2
else model = 0
// готово
new wid = cs_get_armoury_type(i)
if(model == 0){
if(wid == CSW_AK47 ){ engfunc(EngFunc_SetModel, i, AK_W_MODEL_D);}
if(wid == CSW_M4A1){ engfunc(EngFunc_SetModel, i, M4_W_MODEL_D);}
if(wid == CSW_DEAGLE){ engfunc(EngFunc_SetModel, i, DG_W_MODEL_D);}
if(wid == CSW_FAMAS){ engfunc(EngFunc_SetModel, i, FMS_W_MODEL_D);}
if(wid == CSW_AWP){ engfunc(EngFunc_SetModel, i, AWP_W_MODEL_D);}
}
if(model == 1){
if(wid == CSW_AK47 ){ engfunc(EngFunc_SetModel, i, AK_W_MODEL);}
if(wid == CSW_M4A1){ engfunc(EngFunc_SetModel, i, M4_W_MODEL);}
if(wid == CSW_DEAGLE){ engfunc(EngFunc_SetModel, i, DG_W_MODEL);}
if(wid == CSW_FAMAS){ engfunc(EngFunc_SetModel, i, FMS_W_MODEL);}
if(wid == CSW_AWP){ engfunc(EngFunc_SetModel, i, AWP_W_MODEL);}
}
if(model == 2){
if(wid == CSW_AK47 ){ engfunc(EngFunc_SetModel, i, AK_W_MODEL_ASI);}
if(wid == CSW_M4A1){ engfunc(EngFunc_SetModel, i, M4_W_MODEL_ASI);}
if(wid == CSW_DEAGLE){ engfunc(EngFunc_SetModel, i, DG_W_MODEL_ASI);}
if(wid == CSW_FAMAS){ engfunc(EngFunc_SetModel, i, FMS_W_MODEL_ASI);}
if(wid == CSW_AWP){ engfunc(EngFunc_SetModel, i, AWP_W_MODEL_ASI);}
}
}
}
return 1
}
public vip_tag(id){
if(!is_user_alive(id) || !get_pcvar_num(vip_tag_en)) return 0
if (get_user_flags ( id ) & VIP_FLAG)
{
if(!user_has_weapon(id,CSW_C4) && is_user_connected(id)){
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"))
write_byte(id)
write_byte(4)
message_end()
}
}
return 1
}
public SPAWN(id)
{
vip_tag(id)
if(!is_user_alive(id) ) return 0
if(get_pcvar_num(backweapons)) if(!cs_get_user_hasprim(id)) fm_set_entity_visibility(g_weaponent[id], 0)
if(!vip_b_en) return 0
if( ~get_user_flags( id ) & VIP_FLAG ) return 0
weapon_gives[id] = 0
if(awp_gives[id] > 0) awp_gives[id]--
if(round_number >= get_pcvar_num(cv_p[1])){ give_item(id,"item_assaultsuit"); give_item(id,"item_kevlar");}
if(round_number >= get_pcvar_num(cv_p[4]) < get_pcvar_num(cv_p[5])){
strip_weapons(id,SECONDARY_ONLY)
give_item( id, "weapon_deagle" );cs_set_user_bpammo( id , CSW_DEAGLE, 35 )
}
if(round_number >= get_pcvar_num(cv_p[3])){
give_item(id,"weapon_hegrenade");give_item(id,"weapon_flashbang");
give_item(id,"weapon_flashbang");give_item(id,"weapon_smokegrenade")
}
if(round_number >= get_pcvar_num(cv_p[5])){
if(autoshow[id] == true) open_weaponmenu(id)
}
if(_:cs_get_user_team(id) == 2){
if(round_number >= get_pcvar_num(cv_p[2])){
give_item(id,"item_thighpack")
if(get_pcvar_num(dk_enabled))
dkgold_set(id)
}
}else{
if(get_pcvar_num(dk_enabled)){
fm_set_entity_visibility(g_weaponent2[id], 0)
}
dkgold_set(id)
}
return 1
}
public open_weaponmenu(id){
if(!(get_user_flags(id) & VIP_FLAG)){
ChatColor ( id, "%L",LANG_PLAYER,"NO_VIP_CHAT");
return 0;
}
new s_Menu[512],iLen
iLen = formatex(s_Menu[iLen],charsmax(s_Menu)-iLen,"^n\yВип Меню^n^n");
if(round_number >= get_pcvar_num(cv_p[5]))
{
if(get_pcvar_num(cv_p[10]) == 100 || !get_pcvar_num(cv_p[9]) || set_weapon[id] <=1){
if((weapon_gives[id] < 1) && (buytime >= 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r1. \wВзять \r[\yAK-47\r]^n") ;
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d1. \dВзять \d[\dAK-47\d]^n") ;
if((weapon_gives[id] < 1) && (buytime >= 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r2. \wВзять \r[\yM4a1\r]^n") ;
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d2. \dВзять \d[\dM4a1\d]^n") ;
if((weapon_gives[id] < 1) && (buytime >= 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r3. \wВзять \r[\yFAMAS\r]^n") ;
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d3. \dВзять \d[\dFAMAS\d]^n") ;
if( round_number >= get_pcvar_num(cv_p[6]))
{
if((weapon_gives[id] < 1) && (buytime >= 0) && (awp_gives[id] == 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r4. \wВзять \r[\yAWP\r]^n") ;
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d4. \dВзять \d[\dAWP\d]^n");
}else{
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d4. Доступно с %dго раунда(\rсейчас раунд : %d\d) ^n",get_pcvar_num(cv_p[6]),round_number);
}
}else{
if((weapon_gives[id] < 1) && (buytime >= 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r1. \wВзять \r[\yAK-47\r] \r[\yDMG:%d%%\r]^n",get_pcvar_num(cv_p[10]));
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d1. \dВзять \d[\dAK-47\d] [DMG:%d%%]^n",get_pcvar_num(cv_p[10])) ;
if((weapon_gives[id] < 1) && (buytime >= 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r2. \wВзять \r[\yM4a1\r]\r [\yDMG:%d%%\r]^n",get_pcvar_num(cv_p[10]));
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d2. \dВзять \d[\dM4a1\d] [DMG:%d%%]^n",get_pcvar_num(cv_p[10])) ;
if((weapon_gives[id] < 1) && (buytime >= 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r3. \wВзять \r[\yFAMAS\r]\r [\yDMG:%d%%\r]^n",get_pcvar_num(cv_p[10]));
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d3. \dВзять \d[\dFAMAS\d] [DMG:%d%%]^n",get_pcvar_num(cv_p[10])) ;
if( round_number >= get_pcvar_num(cv_p[6]))
{
if((weapon_gives[id] < 1) && (buytime >= 0) && (awp_gives[id] == 0)) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r4. \wВзять \r[\yAWP\r]\r [\yDMG:%d%%\r]^n",get_pcvar_num(cv_p[10]));
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d4. \dВзять \d[\dAWP\d] [DMG:%d%%]^n",get_pcvar_num(cv_p[10])) ;
}else{
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d4. Доступно с %dго раунда(\rсейчас раунд : %d\d) ^n",get_pcvar_num(cv_p[6]),round_number);
}
}
}else{
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d1.AK47 Доступен с %dго раунда(\rсейчас раунд : %d\d) ^n",get_pcvar_num(cv_p[5]),round_number);
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d2.M4a1 Доступна с %dго раунда(\rсейчас раунд : %d\d) ^n",get_pcvar_num(cv_p[5]),round_number);
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d3.FAMAS Доступен с %dго раунда(\rсейчас раунд : %d\d) ^n",get_pcvar_num(cv_p[5]),round_number);
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\d4.AWP Доступно с %dго раунда(\rсейчас раунд : %d\d) ^n",get_pcvar_num(cv_p[5]),round_number);
}
if(autoshow[id] == true) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r5. \wАвтопоказ [\rВКЛЮЧЕН\w] ^n") ;
else iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r5. \wАвтопоказ [\rВЫКЛЮЧЕН\w] ^n") ;
if(set_weapon[id] == 0) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r6. \wОружие [\rНе выбрано\w] ^n")
if(set_weapon[id] == 1) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r6. \wОружие [\rОбычное\w] ^n")
if(set_weapon[id] == 2) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r6. \wОружие [\rGOLD\w] ^n")
if(set_weapon[id] == 3) iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r6. \wОружие [\rAsiimov\w] ^n")
iLen += formatex( s_Menu[ iLen ], charsmax( s_Menu ) - iLen, "\r0. Выход" ) ;
show_menu( id,iKey,s_Menu,-1,"weaponmenu" ) ;
return 1
}
public Actionweaponmenu( i, iKey )
{
if(!vip_b_en) return 0
if ( ! ( get_user_flags ( i ) & VIP_FLAG ) )
{
ChatColor ( i, "%L",LANG_PLAYER,"NO_VIP_CHAT");
return 0;
}
new s_Name[ 32 ] ;
get_user_name( i, s_Name, 31 ) ;
switch( iKey )
{
case 0:
{
if (!is_user_alive(i)) {
ChatColor(i, "%L",LANG_PLAYER,"DEAD_VIP");
return PLUGIN_HANDLED;}
if ( round_number < get_pcvar_num(cv_p[5] )){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_NO_USE_IN_ROUND",get_pcvar_num(cv_p[5]) ,round_number );
return PLUGIN_HANDLED; }
if(buytime <= 0){
ChatColor ( i , "%L",LANG_PLAYER,"TIME_IS_UP",get_pcvar_num(cv_p[8]) );
return PLUGIN_HANDLED; }
if(weapon_gives == 1){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_USED_WEAPON" );
return PLUGIN_HANDLED; }
if(!set_weapon){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_SELECT_WEAPON" );
client_cmd(i, "weaponmenu"); }
if(set_weapon==1){
strip_weapons(i,PRIMARY_ONLY)
give_item( i, "weapon_ak47" )
cs_set_user_bpammo( i , CSW_AK47, 90 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 35 )
}
if(set_weapon == 2){
strip_weapons(i,PRIMARY_ONLY)
gold = true
give_item( i, "weapon_ak47" )
gold = false
cs_set_user_bpammo( i , CSW_AK47, 120 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
gold = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 45 )
gold = false
}
if(set_weapon == 3){
strip_weapons(i,PRIMARY_ONLY)
asi = true
give_item( i, "weapon_ak47" )
asi = false
cs_set_user_bpammo( i , CSW_AK47, 140 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
asi = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 55 )
asi = false
}
}
case 1:
{
if ( ! is_user_alive ( i ) ) {
ChatColor(i, "%L",LANG_PLAYER,"DEAD_VIP");
return PLUGIN_HANDLED; }
if ( round_number < get_pcvar_num(cv_p[5] )){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_NO_USE_IN_ROUND",get_pcvar_num(cv_p[5]) ,round_number );
return PLUGIN_HANDLED; }
if(buytime <= 0){
ChatColor ( i , "%L",LANG_PLAYER,"TIME_IS_UP",get_pcvar_num(cv_p[8]) );
return PLUGIN_HANDLED; }
if(weapon_gives == 1){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_USED_WEAPON" );
return PLUGIN_HANDLED; }
if(!set_weapon){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_SELECT_WEAPON" );
client_cmd(i, "weaponmenu"); }
if(set_weapon == 1){
strip_weapons(i,PRIMARY_ONLY)
give_item( i, "weapon_m4a1" )
cs_set_user_bpammo( i , CSW_M4A1, 90 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 35 )
}
if(set_weapon == 2){
strip_weapons(i,PRIMARY_ONLY)
gold = true
give_item( i, "weapon_m4a1" )
gold = false
cs_set_user_bpammo( i , CSW_M4A1, 120 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
gold = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 45 )
gold = false
}
if(set_weapon == 3){
strip_weapons(i,PRIMARY_ONLY)
asi = true
give_item( i, "weapon_m4a1" )
asi = false
cs_set_user_bpammo( i , CSW_M4A1, 140 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
asi = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 55 )
asi = false
}
}
case 2:
{
if ( ! is_user_alive ( i ) ){
ChatColor(i, "%L",LANG_PLAYER,"DEAD_VIP");
return PLUGIN_HANDLED; }

if ( round_number < get_pcvar_num(cv_p[5] )){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_NO_USE_IN_ROUND",get_pcvar_num(cv_p[5]) ,round_number );
return PLUGIN_HANDLED; }
if(buytime <= 0){
ChatColor ( i , "%L",LANG_PLAYER,"TIME_IS_UP",get_pcvar_num(cv_p[8]) );
return PLUGIN_HANDLED; }
if(weapon_gives == 1){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_USED_WEAPON" );
return PLUGIN_HANDLED; }
if(!set_weapon){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_SELECT_WEAPON" );
client_cmd(i, "weaponmenu");}
if(set_weapon==1){
strip_weapons(i,PRIMARY_ONLY)
give_item( i, "weapon_famas" )
cs_set_user_bpammo( i , CSW_FAMAS, 90 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 35 )
}
if(set_weapon == 2){
strip_weapons(i,PRIMARY_ONLY)
gold = true
give_item( i, "weapon_famas" )
gold = false
cs_set_user_bpammo( i , CSW_FAMAS, 120 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
gold = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 45 )
gold = false
}
if(set_weapon == 3){
strip_weapons(i,PRIMARY_ONLY)
asi = true
give_item( i, "weapon_famas" )
asi = false
cs_set_user_bpammo( i , CSW_FAMAS, 140 )
weapon_gives = 1
strip_weapons(i,SECONDARY_ONLY)
asi = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 55 )
asi = false
}
}
case 3:
{
if ( ! is_user_alive ( i ) ){
ChatColor(i, "%L",LANG_PLAYER,"DEAD_VIP");
return PLUGIN_HANDLED; }
if ( round_number < get_pcvar_num(cv_p[6]) ){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_NO_USE_IN_ROUND",get_pcvar_num(cv_p[6]),round_number );
client_cmd(i, "weaponmenu")
return PLUGIN_HANDLED;}
if ( awp_gives > 0 ) {
ChatColor ( i , "%L",LANG_PLAYER,"VIP_DELAY_AWP",get_pcvar_num(cv_p[7]),awp_gives );
client_cmd(i, "weaponmenu")
return PLUGIN_HANDLED; }
if(buytime <= 0){
ChatColor ( i , "%L",LANG_PLAYER,"TIME_IS_UP",get_pcvar_num(cv_p[8]) );
return PLUGIN_HANDLED; }
if(weapon_gives == 1){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_USED_WEAPON" );
return PLUGIN_HANDLED; }
if(!set_weapon){
ChatColor ( i , "%L",LANG_PLAYER,"VIP_SELECT_WEAPON" );
client_cmd(i, "weaponmenu");}
if(set_weapon==1){
strip_weapons(i,PRIMARY_ONLY)
give_item( i, "weapon_awp" )
cs_set_user_bpammo( i , CSW_AWP, 30 )
weapon_gives = 1
awp_gives = get_pcvar_num(cv_p[7])
strip_weapons(i,SECONDARY_ONLY)
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 35 )
}
if(set_weapon == 2){
strip_weapons(i,PRIMARY_ONLY)
gold = true
give_item( i, "weapon_awp" )
gold = false
cs_set_user_bpammo( i , CSW_AWP, 40 )
weapon_gives = 1
awp_gives = get_pcvar_num(cv_p[7])
strip_weapons(i,SECONDARY_ONLY)
gold = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 45 )
gold = false
}
if(set_weapon == 3){
strip_weapons(i,PRIMARY_ONLY)
asi = true
give_item( i, "weapon_awp" )
asi = false
cs_set_user_bpammo( i , CSW_AWP, 50 )
weapon_gives = 1
awp_gives = get_pcvar_num(cv_p[7])
strip_weapons(i,SECONDARY_ONLY)
asi = true
give_item( i, "weapon_deagle" )
cs_set_user_bpammo( i , CSW_DEAGLE, 55 )
asi = false
}
}
case 4:
{
autoshow ? (autoshow = false) : (autoshow = true)
client_cmd(i, "weaponmenu")
}
case 5:
{
(set_weapon >= 3) ? (set_weapon = 1) : (set_weapon += 1)
client_cmd(i, "weaponmenu")
}
}
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();
}
}
}
}
enum
{
MODEL_NULL = 0,
MODEL_AUG = 1,
MODEL_AK47 = 2,
MODEL_AWP = 3,
MODEL_MP5NAVY = 4,
MODEL_P90 = 5,
MODEL_GALIL = 6,
MODEL_M4A1 = 7,
MODEL_SG550 = 8,
MODEL_SG552 = 9,
MODEL_SCOUT = 10,
MODEL_XM1014 = 11,
MODEL_M3 = 12,
MODEL_G3SG1 = 13,
MODEL_M249 = 14,
MODEL_FAMAS = 15,
MODEL_UMP45 = 16,
MODEL_AK47GOLD = 17,
MODEL_M4A1GOLD = 18,
MODEL_AWPGOLD = 19,
MODEL_FAMASGOLD = 20,
MODEL_AK47ASI = 21,
MODEL_M4A1ASI = 22,
MODEL_AWPASI = 23,
MODEL_FAMASASI = 24
}
stock get_weapon_model(weapon)
{
switch(weapon)
{
case CSW_SCOUT: return MODEL_SCOUT
case CSW_XM1014: return MODEL_XM1014
case CSW_AUG: return MODEL_AUG
case CSW_UMP45: return MODEL_UMP45
case CSW_SG550: return MODEL_SG550
case CSW_GALIL: return MODEL_GALIL
case CSW_FAMAS: return MODEL_FAMAS
case CSW_AWP: return MODEL_AWP
case CSW_MP5NAVY: return MODEL_MP5NAVY
case CSW_M249: return MODEL_M249
case CSW_M3: return MODEL_M3
case CSW_M4A1: return MODEL_M4A1
case CSW_G3SG1: return MODEL_G3SG1
case CSW_SG552: return MODEL_SG552
case CSW_AK47: return MODEL_AK47
case CSW_P90: return MODEL_P90
}
return 0
}
stock get_weapon_modelasi(weapon)
{
switch(weapon)
{

case CSW_FAMAS: return MODEL_FAMASASI
case CSW_AWP: return MODEL_AWPASI
case CSW_M4A1: return MODEL_M4A1ASI
case CSW_AK47: return MODEL_AK47ASI
}
return 0
}
stock get_weapon_modelgold(weapon)
{
switch(weapon)
{

case CSW_FAMAS: return MODEL_FAMASGOLD
case CSW_AWP: return MODEL_AWPGOLD
case CSW_M4A1: return MODEL_M4A1GOLD
case CSW_AK47: return MODEL_AK47GOLD
}
return 0
}
public buytimer() buytime--



1. ЕСЛИ Я ВЗЯЛ ОРУЖИЯ ВИП (у него в запесе 120 патронов) И ПАТОМ ВЗЯЛ ПОСЛЕ НЕГО ОРУЖИЯ ОБЫЧНОЕ, ТО ЗАПАС 120 ПАТРОНОВ ОСТАЛСЯ, ПО СУТИ ИЗМЕНИСЯ СКИН ТОЛЬКО (НУ И МОЩНОСТЬ ВРОДЕ ТОЖЕ) (ПРАВДА БАГ ИДЕТ КОГДА СТРЕЛЬНУЛ И ПРЕРЗПРЕДИЛСЯ)
2. ЕСЛИ В 1 РАУНДЕ (К ПРИМЕРУ) У МЕНЯ ГЛОК ТО 2 РАУДНЕ МЕНЯЕТСЯ НА ДИГЛ, НО ЗАЧЕМ МНЕ ДИГЛ ЕСЛИ ЕСТЬ СЕЙЧАС ГЛОК!

КАК ИСПРАВИТЬ ПОМОГИТЕ, ПОЖАЛУЙСТА! БУДУ ОЧЕНЬ ПРИЗНАТЕЛЕН!
СПАСИБО ЗАРАНИЕ!
Форум: Скрипты CS 1.6 · Просмотр сообщения: #66661 · Ответов: 1 · Просмотров: 1 670


  Открытая тема (есть новые ответы)
  Открытая тема (нет новых ответов)
  Горячая тема (есть новые ответы)
  Горячая тема (нет новых ответов)
  Опрос (есть новые голоса)
  Опрос (нет новых голосов)
  Закрытая тема
  Тема перемещена

Случайные сервера

[RUS](47/48)CSRulez.​ru​ ]Surf[
surf_iceday_final
ИГРОКОВ: 0 / 20
[RUS](47/48)CSRulez.​ru​ ]Diablomod[
de_chateau
ИГРОКОВ: 0 / 20
[RUS](47/48)CSRulez.​ru​ ]Jump[
kz_climbers_b01
ИГРОКОВ: 0 / 20
[RUS](47/48)CSRulez.​ru​ ]hns 364[
hns_bronx
ИГРОКОВ: 0 / 21