// Другие мои плагины: http://vk.com/cs_rain
new g_ForAll, g_szFlagParachute[32], pFallSpeed = 100
new cvar_for_all, cvar_flag, cvar_fall_speed
new bool:g_has_parachute[33]
register_plugin("Parachute", "2.0", "Leo_[BH]")
cvar_for_all = register_cvar("parachute_all", "1")
cvar_flag = register_cvar("parachute_flag", "t")
cvar_fall_speed = register_cvar("parachute_fall_speed", "100")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_forward(FM_ClientDisconnect, "fw_ClientDisconnect")
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
server_cmd("exec addons/amxmodx/configs/parachute.cfg")
public event_round_start() // Изменения в кварах вступают в силу со следующего раунда
g_ForAll = get_pcvar_num(cvar_for_all)
pFallSpeed = get_pcvar_num(cvar_fall_speed)
get_pcvar_string(cvar_flag, g_szFlagParachute, 31)
public client_PreThink(id)
if(!g_is_alive[id]) return;
if(!g_has_parachute[id]) return;
new Float:fallspeed = pFallSpeed * -1.0
new button = get_user_button(id)
new oldbutton = get_user_oldbutton(id)
if (get_user_gravity(id) == 0.1) set_user_gravity(id, 1.0)
entity_get_vector(id, EV_VEC_velocity, velocity)
entity_set_int(id, EV_INT_sequence, 3)
entity_set_int(id, EV_INT_gaitsequence, 1)
entity_set_float(id, EV_FL_frame, 1.0)
entity_set_float(id, EV_FL_framerate, 1.0)
set_user_gravity(id, 0.1)
velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
entity_set_vector(id, EV_VEC_velocity, velocity)
else if ((oldbutton & IN_USE))
set_user_gravity(id, 1.0)
// // // // // // // // // // // // // // //
public client_putinserver(id)
public fw_ClientDisconnect(id)
g_has_parachute[id] = false
// // // // // // // // // // // // // // //
public fw_PlayerSpawn_Post(id)
public fw_PlayerKilled(victim, attacker)
g_is_alive[victim] = false
// // // // // // // // // // // // // // //
g_has_parachute[id] = true
g_has_parachute[id] = true
g_has_parachute[id] = false
stock bool:access_parachute(id)
flags = get_user_flags(id)
get_flags(flags, u_flags, 31)
return (containi(u_flags,g_szFlagParachute) != -1) ? true : false;
// // // // // // // // // // // // // // //
// Другие мои плагины: http://vk.com/cs_rain
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
// Автор плагина: Leo_[BH]
// Мои плагины: http://vk.com/cs_rain
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
// Я предоставляю услуги в сфере Amx Mod X
// Написание плагинов на заказ: https://goo.gl/forms/7DwrBdaTnc0pJRqy2
// Создание сборки сервера под ключ: https://goo.gl/forms/GIyvSAw1IJ48szDn2
// Магазин плагинов: https://vk.com/cs_rain
// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =