Help with MatrixJump
Can somebody fix and update that code
PHP Code:
/* Plugin generated by AMXX-Studio */
#define USE_KZ_ARG
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #include <engine> #include <fun>
#if defined USE_KZ_ARG #include <kzarg> #endif
#define PLUGIN "MatrixJump" #define VERSION "1.0" #define AUTHOR "GmTx"
new g_isMatrix[33]
new bool:Matrixjump[33]
new g_rewarditem
public plugin_init() { register_plugin(PLUGIN, VERSION, AUTHOR) register_forward(FM_PlayerPreThink, "fwdPlayerPreThink") register_event("DeathMsg", "evDeath", "a") RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1) g_rewarditem = kz_rewards_item_register("MatrixJump", "") }
public fwdPlayerPreThink(id) { if( g_isMatrix[id] ) { set_pev( id, pev_sequence, 3 ) set_pev( id, pev_gaitsequence, 1 ) set_pev( id, pev_frame, 1.0 ) set_pev( id, pev_framerate, 1.0 ) if(!(get_user_button(id) & IN_JUMP)) { if(!(Matrixjump[id] = true)) { if (!(pev(id, pev_flags)&FL_ONGROUND) && !(pev(id, pev_flags)&FL_SWIM)) { new Float:velocity[3]; pev(id, pev_velocity, velocity); if (velocity[2] < -1999) velocity[2] += 120.0; else if (velocity[2] < -1500) velocity[2] += 60.0; else if (velocity[2] < -1000) velocity[2] += 30.0; else if (velocity[2] < -500) velocity[2] += 15.0; else if (velocity[2] < 1990) velocity[2] += 10.5; else if (velocity[2] < 1991) velocity[2] += 9.5; else if (velocity[2] < 1992) velocity[2] += 8.5; else if (velocity[2] < 1993) velocity[2] += 7.5; else if (velocity[2] < 1994) velocity[2] += 6.5; else if (velocity[2] < 1995) velocity[2] += 5.5; else if (velocity[2] < 1996) velocity[2] += 4.5; else if (velocity[2] < 1997) velocity[2] += 3.5; else if (velocity[2] < 1998) velocity[2] += 2.5; else if (velocity[2] < 1999) velocity[2] += 1.5; set_pev(id, pev_velocity, velocity); } } } } }
public PlayerSpawn(id) { g_isMatrix[id] = false; Matrixjump[id] = false; }
public kz_itemrewardsmenu(id, item, page) { if( item == g_rewarditem ) g_isMatrix[id] = true; Matrixjump[id] = true; #if defined USE_KZ_ARG kz_cheat_detection(id, "MatrixJump") Matrixjump[id] = false; #endif }
public evDeath() { new iVictim = read_data( 2 ); g_isMatrix[iVictim] = false }
|