Здравствуйте, у меня не большая проблема, имеется плагин IDEAL VIP, но в этом плагине добавлены модели оружия, но дело в том, что сам код вписан только для V модели, а мне хотелось бы чтобы игрок видел у другого игрока со стороны модельку оружия P модель, и чтобы было видно на земле модельку оружия, то есть W модель,так вот вопрос, какой код нужно добавить чтобы эти виды моделей оружия работали ? И да в vip меню всего 8 видов оружия.
Я просто новичок в этом деле, и я не знаю какой код нужно добавить,если эта тема тут не уместна, то я постучусь в тему "Заказы"
Вот такой код вписан для V Модели.
Там есть добавлены P и W модели, но это от незнайки.
Я просто новичок в этом деле, и я не знаю какой код нужно добавить,если эта тема тут не уместна, то я постучусь в тему "Заказы"
Вот такой код вписан для V Модели.
Там есть добавлены P и W модели, но это от незнайки.
Код:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <dhudmessage>
#include <reapi>
#define PLUGIN "IDEAL VIP by JIeTKa*TM | KOT9RA"
#define VERSION "3.3"
#define AUTHOR "JIeTKa*TM | KOT9RA"
#define VIP_TAG (1<<2) // vip в таблицу
#define vip_flag ADMIN_LEVEL_H // флаг доступа
//#define music // Если звук при входе админа не нужен, то поставьте // перед #define
#define MAX_TEXT_LENGTH 200
#define MAX_NAME_LENGTH 40
#pragma semicolon 1
#define IMPULSE_WEAPONKEY_AK47 723836
#define IMPULSE_WEAPONKEY_M4A1 723837
#define IMPULSE_WEAPONKEY_AWP 723838
#define IMPULSE_WEAPONKEY_FAMAS 723839
#define IMPULSE_WEAPONKEY_SCOUT 7238340
#define IMPULSE_WEAPONKEY_DEAGLE 7238341
#define IMPULSE_WEAPONKEY_USP 7238342
#define IMPULSE_WEAPONKEY_GLOCK 7238343
#define AK_AMMO_MAGAZIN 35
#define M4_AMMO_MAGAZIN 35
#define AWP_AMMO_MAGAZIN 15
#define SCOUT_AMMO_MAGAZIN 30
#define FAMAS_AMMO_MAGAZIN 35
#define DEAGLE_AMMO_MAGAZIN 10
#define USP_AMMO_MAGAZIN 15
#define GLOCK_AMMO_MAGAZIN 25
new bool:g_bBlockMap;
new g_Round, g_iWeapon[33], g_iVip ;
new g_iPlayerBomb[33] = false;
new cvar_connect, cvar_red, cvar_green, cvar_blue, Float: cvar_x, Float: cvar_y;
new cvar_prefix;
new cvar_round, cvar_open, cvar_show, cvar_chat, cvar_pistols, cvar_funk, cvar_tab, cvar_awp;
new cvar_health, cvar_health_head, cvar_health_max;
new cvar_money, cvar_money_head;
new cvar_damage, cvar_hudsek;
new vip_opened[33];
new g_iMaxPlayers = 0;
new msgSayText;
new g_iPistols[6] = {CSW_USP, CSW_GLOCK18, CSW_ELITE, CSW_FIVESEVEN, CSW_P228, CSW_DEAGLE};
new bool: g_Chosen[33] = false;
new string[32];
new hud;
public plugin_precache(){
if(IsBlockMap())
{
g_bBlockMap = true;
return;
}
#if defined(music)
precache_sound("IDEAL_VIP/ideal_sound.wav");
#endif
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_ak_47gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/p_ak_47gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/w_ak_47gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/SKIN/v_m4_a1gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/SKIN/p_m4_a1gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/SKIN/w_m4_a1gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_awp_gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/p_awp_gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/w_awp_gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_famas_gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_scout_gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_deagl_gold.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_usp_golden.mdl");
engfunc(EngFunc_PrecacheModel, "models/PREMIUM/v_glock_gold.mdl");
}
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR);
if(g_bBlockMap)
server_cmd("amxx pause IDEAL_VIP.amxx");
register_dictionary("ideal_vip.txt");
g_iMaxPlayers = get_maxplayers();
register_message(get_user_msgid( "ScoreAttrib" ), "msgScoreAttrib");
register_event("HLTV", "EventRoundStart", "a", "1=0", "2=0");
register_event("TextMsg", "EventRoundRestart", "a", "2=#Game_will_restart_in","2=#Game_Commencing");
register_event("Damage", "EventDamage", "b", "2!0", "3=0", "4!0");
RegisterHam(Ham_Killed, "player", "HamPlayerKilled_Post", 1);
RegisterHam(Ham_Spawn, "player", "HamSpawn_Post", 1);
RegisterHam(Ham_Item_Deploy, "weapon_ak47", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_m4a1", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_awp", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_famas", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_scout", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_deagle", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_usp", "Ham_ItemDeploy_Post", true);
RegisterHam(Ham_Item_Deploy, "weapon_glock18", "Ham_ItemDeploy_Post", true);
register_clcmd("say /vipmenu", "Show_MainMenu");
register_clcmd("say_team /vipmenu", "Show_MainMenu");
register_clcmd("say /vip_menu", "Show_MainMenu");
register_clcmd("say_team /vip_menu", "Show_MainMenu");
register_clcmd("vipmenu", "Show_MainMenu");
register_clcmd("say /vips", "vip_online");
register_clcmd("say_team /vips", "vip_online");
register_clcmd("say /admin", "admin_motd");
register_clcmd("say_team /admin", "admin_motd");
register_clcmd("say /vip", "vip_motd");
register_clcmd("say_team /vip", "vip_motd");
register_clcmd("say /spon", "spon_motd");
register_clcmd("say_team /spon", "spon_motd");
register_clcmd("say /immuna", "immuna_motd");
register_clcmd("say_team /immuna", "immuna_motd");
register_clcmd("say /pref", "pref_motd");
register_clcmd("say_team /pref", "pref_motd");
register_menucmd(register_menuid("Show_MainMenu"), (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<9), "Handle_MainMenu");
msgSayText = get_user_msgid("SayText");
hud = CreateHudSyncObj();
}
public plugin_cfg(){
new szConfigDir[128];
get_localinfo("amxx_configsdir", szConfigDir, charsmax(szConfigDir));
server_cmd("exec %s/ideal_vip.cfg", szConfigDir);
cvar_round = get_pcvar_num(register_cvar("amx_vipround", "2"));
cvar_awp = get_pcvar_num(register_cvar("amx_awpvipround", "3"));
cvar_open = get_pcvar_num(register_cvar("amx_vipzaround", "0"));
cvar_show = get_pcvar_num(register_cvar("amx_vipshow","1"));
cvar_chat = get_pcvar_num(register_cvar("amx_chatshow", "1"));
cvar_pistols = get_pcvar_num(register_cvar("amx_vipautopistols", "0"));
cvar_funk = get_pcvar_num(register_cvar("amx_vipautoset", "1"));
cvar_health = get_pcvar_num(register_cvar("amx_viphealth", "30"));
cvar_health_head = get_pcvar_num(register_cvar("amx_viphealth_head", "60"));
cvar_health_max = get_pcvar_num(register_cvar("amx_viphealth_max", "100"));
cvar_money = get_pcvar_num(register_cvar("amx_vipmoney", "500"));
cvar_money_head = get_pcvar_num(register_cvar("amx_vipmoney_head", "1000"));
cvar_tab = get_pcvar_num(register_cvar("amx_viptab", "1"));
cvar_connect = get_pcvar_num(register_cvar("amx_showconnect", "2"));
cvar_red = get_pcvar_num(register_cvar("amx_vipRED", "100"));
cvar_green = get_pcvar_num(register_cvar("amx_vipGREEN", "100"));
cvar_blue = get_pcvar_num(register_cvar("amx_vipBLUE", "100"));
cvar_x = get_pcvar_float(register_cvar("amx_vipXcoord", "-1.0"));
cvar_y = get_pcvar_float(register_cvar("amx_vipYcoord", "0.6"));
cvar_prefix = register_cvar("amx_vip_prefix", "!y[!g.::VIP::.!y]");
#if defined(music)
cvar_music = get_pcvar_num(register_cvar("amx_vipMusic", "0"));
#endif
cvar_damage = get_pcvar_num(register_cvar("amx_vipdamager", "0"));
cvar_hudsek = get_pcvar_num(register_cvar("amx_viphudsek", "5.0"));
get_pcvar_string(cvar_prefix, string, charsmax(string));
}
public admin_motd(id, level, cid){
if(!cmd_access(id, level, cid, 1))
return PLUGIN_CONTINUE;
show_motd(id, "admin.txt", "Купить админку");
return PLUGIN_CONTINUE;
}
public vip_motd(id, level, cid){
if(!cmd_access(id, level, cid, 1))
return PLUGIN_CONTINUE;
show_motd(id, "vip.txt", "Купить випку");
return PLUGIN_CONTINUE;
}
public spon_motd(id, level, cid){
if(!cmd_access(id, level, cid, 1))
return PLUGIN_CONTINUE;
show_motd(id, "spon.txt", "Купить спонсора");
return PLUGIN_CONTINUE;
}
public immuna_motd(id, level, cid){
if(!cmd_access(id, level, cid, 1))
return PLUGIN_CONTINUE;
show_motd(id, "immuna.txt", "Купить иммунитет");
return PLUGIN_CONTINUE;
}
public pref_motd(id, level, cid){
if(!cmd_access(id, level, cid, 1))
return PLUGIN_CONTINUE;
show_motd(id, "pref.txt", "Купить префикс");
return PLUGIN_CONTINUE;
}
public client_putinserver(id){
client_cmd(id, "bind ^"F5^" ^"vipmenu^"");
g_iWeapon[id] = 0;
if(IsUserCool(id))
set_task(0.5, "vip_connect", id + 132);
}
public client_disconnect(id){
g_iWeapon[id] = 0;
g_Chosen[id] = false;
}
public vip_connect(TASKID){
new id = TASKID - 132;
#if defined(music)
if(cvar_music)
client_cmd(0, "spk IDEAL_VIP/ideal_sound.wav");
#endif
new name[32]; get_user_name(id, name, charsmax(name));
switch(cvar_connect)
{
case 1:
{
ChatColor(0, "%L", id, "VIP_CONNECT", string, name);
}
case 2:
{
set_hudmessage(cvar_red, cvar_green, cvar_blue, cvar_x, cvar_y, 0, 0.0, 5.0, 0.0, 0.0, -1);
show_hudmessage(0, "%L", id, "VIP_CONNECT1", name);
}
case 3:
{
set_dhudmessage(cvar_red, cvar_green, cvar_blue, cvar_x, cvar_y, 0, 0.0, 5.0, 0.0, 0.0, false);
show_dhudmessage(0, "%L", id, "VIP_CONNECT1", name);
}
case 4:
{
ChatColor(0, "%L", id, "VIP_CONNECT", string, name);
set_hudmessage(cvar_red, cvar_green, cvar_blue, cvar_x, cvar_y, 0, 0.0, 5.0, 0.0, 0.0, -1);
show_hudmessage(0, "%L", id, "VIP_CONNECT1", name);
}
case 5:
{
ChatColor(0, "%L", id, "VIP_CONNECT", string, name);
set_dhudmessage(cvar_red, cvar_green, cvar_blue, cvar_x, cvar_y, 0, 0.0, 5.0, 0.0, 0.0, false);
show_dhudmessage(0, "%L", id, "VIP_CONNECT1", name);
}
}
}
public EventRoundStart() g_Round++;
public EventRoundRestart() g_Round = 0;
public EventDamage(id){
if(cvar_damage == 0)
return;
if(!is_user_connected(id))
return;
new iVictim = id;
new iKiller = get_user_attacker(id);
if(iVictim == iKiller)
return;
if(!IsUserCool(iKiller) && !IsUserCool(iVictim))
return;
if(get_user_team(iKiller) == get_user_team(iVictim))
return;
new iDamage = read_data(2);
if(iDamage <= 0)
return;
if(IsUserCool(iVictim))
{
set_hudmessage(255, 0, 0, 0.6, 0.5, 0, 0.0, float(cvar_hudsek), 0.0, 0.0, 1);
ShowSyncHudMsg(iVictim, hud, "%d", iDamage);
}
if(IsUserCool(iKiller))
{
set_hudmessage(0, 100, 255, 0.4, 0.5, 0, 0.0, float(cvar_hudsek), 0.0, 0.0, 2);
ShowSyncHudMsg(iKiller, hud, "%d", iDamage);
}
}
public HamSpawn_Post(id){
g_iPlayerBomb[id] = false;
vip_opened[id] = 0;
if(IsUserCool(id))
{
if(g_Round == 0) FirstMenu(id);
if(is_user_alive(id))
{
if(cvar_funk == 1) task_funk(id);
if(cvar_show == 1 && g_Round >= cvar_round) Show_MainMenu(id);
}
}
}
public HamPlayerKilled_Post(iVictim, iKiller, corpse)
{
if(IsUserCool(iVictim))
if(!g_Chosen[iVictim])
set_task(1.0, "FirstMenu", iVictim);
if(IsUserCool(iKiller))
{
if(is_user_alive(iKiller))
{
if( get_pdata_int( iVictim, 75 ) == HIT_HEAD)
{
set_user_health(iKiller, get_user_health(iKiller) + cvar_health_head);
if(get_user_health(iKiller) > cvar_health_max)
set_user_health(iKiller, cvar_health_max);
cs_set_user_money(iKiller, cs_get_user_money(iKiller) + cvar_money_head);
}
else
{
set_user_health(iKiller, get_user_health(iKiller) + cvar_health);
if(get_user_health(iKiller) > cvar_health_max)
set_user_health(iKiller, cvar_health_max);
cs_set_user_money(iKiller, cs_get_user_money(iKiller) + cvar_money);
}
}
}
}
public Ham_ItemDeploy_Post(iEntity)
{
new id = get_pdata_cbase(iEntity, 41/*m_pPlayer*/, 4/*linux_diff_weapon*/);
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new iWeaponKey = pev(iEntity, pev_impulse);
if(iWeaponKey == IMPULSE_WEAPONKEY_AK47) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_ak_47gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_AK47) set_pev(id, pev_viewmodel2, "models/PREMIUM/p_ak_47gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_AK47) set_pev(id, pev_viewmodel2, "models/PREMIUM/w_ak_47gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_M4A1) set_pev(id, pev_viewmodel2, "models/PREMIUM/SKIN/v_m4_a1gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_M4A1) set_pev(id, pev_viewmodel2, "models/PREMIUM/SKIN/p_m4_a1gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_M4A1) set_pev(id, pev_viewmodel2, "models/PREMIUM/SKIN/w_m4_a1gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_AWP) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_awp_gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_AWP) set_pev(id, pev_viewmodel2, "models/PREMIUM/p_awp_gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_AWP) set_pev(id, pev_viewmodel2, "models/PREMIUM/w_awp_gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_FAMAS) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_famas_gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_SCOUT) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_scout_gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_DEAGLE) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_deagl_gold.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_USP) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_usp_golden.mdl");
else if(iWeaponKey == IMPULSE_WEAPONKEY_GLOCK) set_pev(id, pev_viewmodel2, "models/PREMIUM/v_glock_gold.mdl");
}
}
Последнее редактирование: