Raised This Month: $51 Target: $400
 12% 

Quick Code erasing


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
kmal2t
BANNED
Join Date: Apr 2006
Old 11-19-2006 , 20:50   Quick Code erasing
#1

This is an old modified plugin I've been using. I don't really need any help adding anything, I just need someone to help me with a deleting job. Right now the plugin increases team 2s velocity when you jump and does the walljump thing. I want the walljump part removed. No bouncing off walls when you touch them. The only thing it should do is increase a players velocity on jump. I need one thing added though. One additional condition for it to activate is that you have to be "in ducking" as well. Not pressing duck but in the process of a duck and not at stand yet. As in, it only does it for crouch jumps. This is a 2 minute job for a coder. Help please

Code:
include <amxmodx>
#include <engine>
#include <fakemeta>

new bool:caughtJump[33]
new bool:doJump[33]
new Float:jumpVeloc[33][3]
new newButton[33]
new numJumps[33]
new bool:is_sprinting[33] = false

//====================================================================================================
static const TITLE[] = "Wall Jump"
static const VERSION[] = "0.6"
static const AUTHOR[] = "OneEyed"
//====================================================================================================

public plugin_init()
{
    register_plugin(TITLE,VERSION,AUTHOR)
    
    register_cvar("walljump_str","300.0")
    register_cvar("walljump_num","3")


    register_clcmd("+666555111","start_speed") 
    register_clcmd("-666555111","end_speed")

    register_touch("player", "worldspawn", "Touch_World")
    register_touch("player", "func_wall", "Touch_World")
    register_touch("player", "func_breakable", "Touch_World")
} 

//----------------------------------------------------------------

public plugin_modules()
    {
    require_module("Engine");
    require_module("FakeMeta");
    }

public start_speed(id)
    {
    is_sprinting[id] = true
    return PLUGIN_HANDLED;
    }

public end_speed(id)
    {
    is_sprinting[id] = false
    return PLUGIN_HANDLED;
    }

public server_frame()
    {
    for(new i=0; i < get_maxplayers(); i++) 
        {
        if(is_sprinting[i] == true)
            {
            set_speed(i);
            end_speed(i)
            }
        }
    }

public set_speed(id)
    {
    if(!is_user_alive(id)) return PLUGIN_HANDLED;
    new Float:returnV[3], Float:Original[3]

    VelocityByAim ( id, 700, returnV )
    pev(id,pev_velocity,Original)
    returnV[2] = Original[2]
    
    set_pev(id,pev_velocity,returnV)
    return PLUGIN_HANDLED;
    }

//--------------------------------------------------------------

public client_disconnect(id) {
    caughtJump[id] = false
    doJump[id] = false
    for(new x=0;x<3;x++)
        jumpVeloc[id][x] = 0.0
    newButton[id] = 0
    numJumps[id] = 0
}

public client_PreThink(id) 
    {   
    if((is_user_alive(id)) && (get_team_int(id) == 1)) 
        { 
        newButton[id] = get_user_button(id) 
        new oldButton = get_user_oldbutton(id) 
        new flags = get_entity_flags(id) 
        
        //reset if we are on ground 
        if(caughtJump[id] && (flags & FL_ONGROUND)) 
            { 
            numJumps[id] = 0 
            caughtJump[id] = false 
        } 
        
        //begin when we jump 
        if((newButton[id] & IN_JUMP) && (flags & FL_ONGROUND) && !caughtJump[id] && !(oldButton & IN_JUMP) && !numJumps[id]) 
            { 
            caughtJump[id] = true 
            entity_get_vector(id,EV_VEC_velocity,jumpVeloc[id]) 
            jumpVeloc[id][2] = get_cvar_float("walljump_str") 
            start_speed(id)
            }

        } 
    } 


public client_PostThink(id) 
    { 
    if(is_user_alive(id)) 
        { 
        //do velocity if we walljumped 
        if(doJump[id]) 
            { 
            entity_set_vector(id,EV_VEC_velocity,jumpVeloc[id]) 
            
            doJump[id] = false 
            
            if(numJumps[id] >= get_cvar_num("walljump_num")) //reset if we ran out of jumps 
                { 
                numJumps[id] = 0 
                caughtJump[id] = false 
            } 
        } 
    } 
} 

public Touch_World(id, world) 
    { 
    if(is_user_alive(id)) 
        { 
        //if we touch wall and have jump pressed, setup for jump 
        if(caughtJump[id] && (newButton[id] & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND)) 
            { 
            
            //reverse velocity 
            for(new x=0;x<2;x++) 
                jumpVeloc[id][x] *= -1.0 
            
            numJumps[id]++ 
            doJump[id] = true 
        }    
    } 
}

stock get_team_int(id) 
    { 
    new TeamString[8] 
    get_user_team(id,TeamString,7) 
    if(equali(TeamString,"VAMPIRE")) 
        return 1 
    if(equali(TeamString,"SLAYER")) 
        return 2 
    return 0 
}
kmal2t is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 11-19-2006 , 21:42   Re: Quick Code erasing
#2

you guys rearranged the forums. put this in the wrong forum sry delete this thread
kmal2t is offline
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:05.


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