Мне не для ReAPI есть еще ?
Мне не для ReAPI есть еще ?
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#define PARACHUTE_SPEED 100 // Скорость падения парашюта или типо того :D
new g_iAlive[33];
public plugin_init()
{
register_plugin("Parachute", "1.1", "maeStro | neygomon");
RegisterHam(Ham_Spawn, "player", "fwdHamPlayerSpawn", true);
RegisterHam(Ham_Killed, "player", "fwdHamPlayerKilled", true);
}
public client_putinserver(id)
g_iAlive[id] = 0;
public fwdHamPlayerSpawn(id)
g_iAlive[id] = is_user_alive(id);
public fwdHamPlayerKilled(id)
g_iAlive[id] = 0;
public client_PreThink(id)
{
if(!g_iAlive[id] || ~get_user_button(id) & IN_USE || get_entity_flags(id) & FL_ONGROUND) return;
static Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity);
if(velocity[2] < 0)
{
velocity[2] = (velocity[2] + 40.0 < PARACHUTE_SPEED * -1.0) ? velocity[2] + 40.0 : PARACHUTE_SPEED * -1.0;
entity_set_vector(id, EV_VEC_velocity, velocity);
}
}
СпасибоPHP:#include <amxmodx> #include <hamsandwich> #include <engine> #define PARACHUTE_SPEED 100 // Скорость падения парашюта или типо того :D new g_iAlive[33]; public plugin_init() { register_plugin("Parachute", "1.1", "maeStro | neygomon"); RegisterHam(Ham_Spawn, "player", "fwdHamPlayerSpawn", true); RegisterHam(Ham_Killed, "player", "fwdHamPlayerKilled", true); } public client_putinserver(id) g_iAlive[id] = 0; public fwdHamPlayerSpawn(id) g_iAlive[id] = is_user_alive(id); public fwdHamPlayerKilled(id) g_iAlive[id] = 0; public client_PreThink(id) { if(!g_iAlive[id] || ~get_user_button(id) & IN_USE || get_entity_flags(id) & FL_ONGROUND) return; static Float:velocity[3]; entity_get_vector(id, EV_VEC_velocity, velocity); if(velocity[2] < 0) { velocity[2] = (velocity[2] + 40.0 < PARACHUTE_SPEED * -1.0) ? velocity[2] + 40.0 : PARACHUTE_SPEED * -1.0; entity_set_vector(id, EV_VEC_velocity, velocity); } }
А можно бы такой вот плагин. Когда юзаешь parachute, то не теряется гравитация.