Добрый день имеется ВИП меню.
Вот кто подскажет как убрать ограничения на раунд? и убрать из него два тех оружия которые там идут и вместо их сделать голд ак и голд m4ai ?
и все надписи вывести в lang файл
C++:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <dhudmessage>
new Vip_Invis[33]
new Vip_money[33]
new Vipka_grav_guitar[33]
new Vipka_grav_balrog3[33]
new Vipka_speed[33]
new Vipka[33]
new Spead[33]
new Vipka_bron[33]
new Ammo[33]
new bool:bDamage[33];
new bool:bAmmo[33];
// CS Offsets
#if cellbits == 32
const OFFSET_CLIPAMMO = 51
#else
const OFFSET_CLIPAMMO = 65
#endif
const OFFSET_LINUX_WEAPONS = 4
// Max Clip for weapons
new const MAXCLIP[] = { -1, 13, -1, 10, 1, 7, -1, 30, 30, 1, 30, 20, 25, 30, 35, 25, 12, 20,
10, 30, 100, 8, 30, 30, 20, 2, 7, 30, 30, -1, 50 }
#define PLUGIN "VIP CSDM"
#define VERSION "1.0"
#define AUTHOR "Godzilla"
new iMaxPlayers;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_menu("Vip_Menu", 1023, "func_menu")
register_clcmd("vipmenu", "VipMenu")
register_event("CurWeapon", "MaxPlayerSpeed", "be", "1=1")
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
register_event("HLTV", "RoundNew", "a", "1=0", "2=0")
RegisterHam(Ham_TraceAttack, "func_breakable", "HamHook_Entity_TraceAttack", false);
RegisterHam(Ham_TraceAttack, "hostage_entity", "HamHook_Entity_TraceAttack", false);
RegisterHam(Ham_TraceAttack, "info_target", "HamHook_Entity_TraceAttack", false);
RegisterHam(Ham_TraceAttack, "player", "HamHook_Entity_TraceAttack", false);
RegisterHam(Ham_Killed, "player", "HamHook_PlayerKilled", false);
iMaxPlayers = get_maxplayers();
}
public HamHook_PlayerKilled(const iVictim, const iAttacker)
{
if(!is_user_connected(iVictim))
return HAM_IGNORED;
if (bDamage[iVictim]) bDamage[iVictim] = false;
if (bAmmo[iVictim]) bAmmo[iVictim] = false;
if (Spead[iVictim]) Spead[iVictim] = false;
return HAM_IGNORED;
}
public client_authorized(id)
{
new iFlags = get_user_flags(id);
if (iFlags & ADMIN_LEVEL_D)
{
Vip_Invis[id] = 1
Vip_money[id] = 1
Vipka_grav_guitar[id] = 1
Vipka_grav_balrog3[id] = 1
Vipka_speed[id] = 1
Vipka[id] = 1
Vipka_bron[id] = 1
Ammo[id] = 1
}
}
public HamHook_Entity_TraceAttack(const iEntity, const iAttacker, Float: flDamage)
{
if (!is_user_connected(iAttacker))
return HAM_IGNORED;
if (!bDamage[iAttacker])
return HAM_IGNORED;
SetHamParamFloat(3, flDamage * 2.0);
return HAM_IGNORED;
}
public RoundNew()
{
for(new id = 1;id <= iMaxPlayers; id++)
{
Vip_Invis[id] = 3
Vip_money[id] = 5
Vipka_grav_guitar[id] = 3
Vipka_grav_balrog3[id] = 3
Vipka_speed[id] = 4
Vipka[id] = 3
Vipka_bron[id] = 5
Ammo[id] = 5
}
}
public VipMenu(id)
{
static menu[512], Len; Len = 0;
Len = formatex(menu[Len], charsmax(menu) - Len, "\wВип Меню \r[\yVIP\r]^n\dПацанский CSDM^n^n");
new iAccess = (get_user_flags(id) & ADMIN_LEVEL_D);
if(iAccess && Vipka_grav_guitar[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r1. \wАвтомат \yGuitar Rock\d[\r%i\d]^n", Vipka_grav_guitar[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d1. \wАвтомат Guitar Rock\d[\rНедоступно\d]^n")
}
if(iAccess && Vipka_grav_balrog3[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r2. \wАвтомат \yBalrog-5 \d[\r%i\d]^n", Vipka_grav_balrog3[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d2. \wАвтомат Balrog-5\d[\rНедоступно\d]^n")
}
if(iAccess && Vipka_speed[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r3. \wСкорость \y+500 \d[\r%i\d]^n", Vipka_speed[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d3. \wСкорость +500 \d[\rНедоступно\d]^n")
}
if(iAccess && Vipka_bron[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r4. \wБроня \y+300 \d[\r%i\d]^n", Vipka_bron[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d4. \wБроня +300 \d[\rНедоступно\d]^n");
}
if(iAccess && Vip_Invis[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r5. \wНевидимость \d[\r%i\d]^n", Vip_Invis[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d5. \wНевидимость \d[\rНедоступно\d]^n")
}
if(iAccess && Vipka[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r6. \wЗдоровье \y+250 \d[\r%i\d]^n", Vipka[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d6. \wЗдоровье +250 \d[\rНедоступно\d]^n");
}
if(iAccess && Vip_money[id])
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\r7. \wВзять \y+16000$ \d[\r%i\d]^n^n", Vip_money[id])
}
else
{
Len += formatex(menu[Len], charsmax(menu) - Len, "\d7. \wВзять +16000$ \d[\rНедоступно\d]^n^n")
}
Len += formatex(menu[Len], charsmax(menu) - Len, "\y0. \wВыход^n")
show_menu(id, 1023, menu, -1, "Vip_Menu");
return PLUGIN_HANDLED
}
public func_menu(id, key)
{
if (!is_user_connected(id))
return PLUGIN_HANDLED;
if (!(get_user_flags(id) & ADMIN_LEVEL_D))
return PLUGIN_HANDLED;
switch(key)
{
case 0:
{
if(!Vipka_grav_guitar[id])
{
return PLUGIN_HANDLED;
}
else
{
client_cmd(id, "gitara")
Vipka_grav_guitar[id] -= 1;
}
}
case 1:
{
if(!Vipka_grav_balrog3[id])
{
return PLUGIN_HANDLED;
}
else
{
client_cmd(id, "admin_get_balrog3")
Vipka_grav_balrog3[id] -= 1;
}
}
case 2:
{
if(!Vipka_speed[id])
{
return PLUGIN_HANDLED;
}
else
{
set_user_maxspeed(id, 1500.0)
Spead[id] = true
Vipka_speed[id] -= 1;
}
}
case 3:
{
if(!Vipka_bron[id])
{
return PLUGIN_HANDLED;
}
else
{
cs_set_user_armor(id, 250, CS_ARMOR_VESTHELM)
Vipka_bron[id] -= 1;
}
}
case 4:
{
if(!Vip_Invis[id])
{
return PLUGIN_HANDLED;
}
else
{
user_invis(id);
Vip_Invis[id] -= 1;
}
}
case 5:
{
if(!Vipka[id])
{
return PLUGIN_HANDLED;
}
else
{
set_user_health(id, 250)
set_user_armor(id, 250)
Vipka[id] -= 1;
}
}
case 6:
{
if(!Vip_money[id])
{
return PLUGIN_HANDLED;
}
else
{
cs_set_user_money(id, cs_get_user_money(id) + 16000)
Vip_money[id] -= 1;
}
}
default: return PLUGIN_HANDLED
}
VipMenu(id)
return PLUGIN_HANDLED
}
public MaxPlayerSpeed(id)
{
if (!is_user_connected(id))
return;
if(Spead[id])
{
set_user_maxspeed(id, 750.0)
}
}
// Unlimited clip code
public message_cur_weapon(msg_id, msg_dest, msg_entity)
{
// Player doesn't have the unlimited clip upgrade
if (!bAmmo[msg_entity])
return;
// Player not alive or not an active weapon
if (!is_user_alive(msg_entity) || get_msg_arg_int(1) != 1)
return;
static weapon, clip
weapon = get_msg_arg_int(2) // get weapon ID
clip = get_msg_arg_int(3) // get weapon clip
// Unlimited Clip Ammo
if (MAXCLIP[weapon] > 2) // skip grenades
{
set_msg_arg_int(3, get_msg_argtype(3), MAXCLIP[weapon]) // HUD should show full clip all the time
if (clip < 2) // refill when clip is nearly empty
{
// Get the weapon entity
static wname[32], weapon_ent
get_weaponname(weapon, wname, sizeof wname - 1)
weapon_ent = fm_find_ent_by_owner(-1, wname, msg_entity)
// Set max clip on weapon
set_pdata_int(weapon_ent, OFFSET_CLIPAMMO, MAXCLIP[weapon], OFFSET_LINUX_WEAPONS);
}
}
}
// Find entity by its owner (from fakemeta_util)
stock fm_find_ent_by_owner(entity, const classname[], owner)
{
while ((entity = engfunc(EngFunc_FindEntityByString, entity, "classname", classname)) && pev(entity, pev_owner) != owner) {}
return entity;
}
public user_invis(id)
{
if (!is_user_connected(id))
return;
if(!Vip_Invis[id])
return;
set_user_rendering( id, kRenderFxNone, 0, 0, 0, kRenderTransAlpha, 35 )
//new name[32]; get_user_name(id,name,31)
//set_task(240.0, "offinvis", id)
}
public offinvis(id)
{
if (!is_user_connected(id))
return;
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderNormal,0)
new name[32]; get_user_name(id,name,31)
client_print(id, print_chat, " %s У вас кончилась невидимость теперь вы видимы!",name)
}
Вот кто подскажет как убрать ограничения на раунд? и убрать из него два тех оружия которые там идут и вместо их сделать голд ак и голд m4ai ?
и все надписи вывести в lang файл