AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help with MatrixJump (https://forums.alliedmods.net/showthread.php?t=101978)

GmTx 08-29-2009 04:57

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(PLUGINVERSIONAUTHOR)
    
    
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_pevidpev_sequence,    )
        
set_pevidpev_gaitsequence,    )
        
set_pevidpev_frame,        1.0 )
        
set_pevidpev_framerate,    1.0 )
        
        if(!(
get_user_button(id) & IN_JUMP)) 
        {
            if(!(
Matrixjump[id] = true))        
            {
                if (!(
pev(idpev_flags)&FL_ONGROUND) && !(pev(idpev_flags)&FL_SWIM)) 
                {
                    new 
Float:velocity[3];
                    
pev(idpev_velocityvelocity);
                    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(idpev_velocityvelocity);
                }
            }    
        }
    }
}

public 
PlayerSpawn(id)
{
    
g_isMatrix[id] = false;  
    
Matrixjump[id] = false;
}


public 
kz_itemrewardsmenu(iditempage)
{
    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);
    
    
g_isMatrix[iVictim] = false




All times are GMT -4. The time now is 15:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.