Участник
- Сообщения
- 2,491
- Реакции
- 2,794
- Помог
- 61 раз(а)
Идеи для изменений могут заинтересованные накидывать)Pokemoshka, как вариант. Там не так много изменений.
#include <amxmodx>
#include <fakemeta>
#include <engine>
#include <fun>
new const Float:g_fWeaponRunSpeed[] = // CONFIGURABLE - weapon running speed (edit the numbers in the list)
{
150.0, // Zoomed speed with any weapon
250.0, // P228
0.0, // SHIELD (not used)
260.0, // SCOUT
250.0, // HEGRENADE
240.0, // XM1014
250.0, // C4
250.0, // MAC10
240.0, // AUG
250.0, // SMOKEGRENADE
250.0, // ELITE
250.0, // FIVESEVEN
250.0, // UMP45
210.0, // SG550
240.0, // GALIL
240.0, // FAMAS
250.0, // USP
250.0, // GLOCK18
210.0, // AWP
250.0, // MP5NAVY
220.0, // M249
230.0, // M3
230.0, // M4A1
250.0, // TMP
210.0, // G3SG1
250.0, // FLASHBANG
250.0, // DEAGLE
235.0, // SG552
221.0, // AK47
250.0, // KNIFE
245.0, // P90
0.0, // Kevlar (not used)
0.0, // Kevlar + Helm (not used)
0.0 // NVG (not used)
}
const Float:SPEED_ADRENALINE = 1.3 // speed while using "speed" adrenaline combo (this and SPEED_FLAG are cumulative)
const Float:SPEED_FLAG = 0.9 // speed while carying the enemy flag
const ADRENALINE_SPEED = 1
#define player_hasFlag(%1) (g_iFlagHolder[TEAM_RED] == %1 || g_iFlagHolder[TEAM_BLUE] == %1)
// 510 - setinfo _vgui_menus (1<<0), _ah (1<<8), uses_shield (1<<16), has_shield (1<<24)
const m_iUserPrefs = 510
enum
{
TEAM_NONE = 0,
TEAM_RED,
TEAM_BLUE,
TEAM_SPEC
}
new g_iFlagHolder[3]
new bool:g_bAlive[33]
new Float:g_fWeaponSpeed[33]
new g_iAdrenalineUse[33]
public plugin_init() {
register_event("CurWeapon", "player_currentWeapon", "be", "1=1")
register_event("SetFOV", "player_currentWeapon", "be", "1>1")
}
public player_currentWeapon(id)
{
if(!g_bAlive[id])
return
static bool:bZoom[33]
new iZoom = read_data(1)
if(1 < iZoom <= 90) /* setFOV event */
bZoom[id] = bool:(iZoom <= 40)
else /* CurWeapon event */
{
if(!bZoom[id]) /* if not zooming, get weapon speed */
g_fWeaponSpeed[id] = g_fWeaponRunSpeed[read_data(2)]
else /* if zooming, set zoom speed */
g_fWeaponSpeed[id] = g_fWeaponRunSpeed[0]
player_updateSpeed(id)
}
}
public client_PostThink(id)
{
if(!g_bAlive[id])
return
static iOffset
static iShield[33]
iOffset = get_pdata_int(id, m_iUserPrefs)
if(iOffset & (1<<24)) /* Shield available */
{
if(iOffset & (1<<16)) /* Uses shield */
{
if(iShield[id] < 2) /* Trigger only once */
{
iShield[id] = 2
g_fWeaponSpeed[id] = 180.0
player_updateSpeed(id)
}
}
else if(iShield[id] == 2) /* Doesn't use the shield anymore */
{
iShield[id] = 1
g_fWeaponSpeed[id] = 250.0
player_updateSpeed(id)
}
}
else if(iShield[id]) /* Shield not available anymore */
iShield[id] = 0
}
player_updateSpeed(id)
{
new Float:fSpeed = 1.0
if(player_hasFlag(id))
fSpeed *= SPEED_FLAG
if(g_iAdrenalineUse[id] == ADRENALINE_SPEED)
fSpeed *= SPEED_ADRENALINE
set_user_maxspeed(id, g_fWeaponSpeed[id] * fSpeed)
}
I am having several problems, my serve, game, and amxx can not run on my server, another doubt my buytime should be this infinite, it still does not workТак как свободного времени не сильно много на полноценные обновления, потому пока что так. Убрал хук орфея для вызова окончания раунда заменив его на реапи. А также пофиксил хук ботов в хаме. Переделка очень небольшая.