Raised This Month: $ Target: $400
 0% 

What is this?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Spy123
BANNED
Join Date: Jul 2011
Location: Giurgiu / Romania
Old 05-07-2013 , 12:11   Re: What is this?
Reply With Quote #4

This is it:

PHP Code:
public client_PreThink(id)
{
    if( 
is_kickball && is_valid_ent(aball) && is_user_connected(id))
    {
        new 
button entity_get_int(idEV_INT_button)
        new 
relode = (button IN_RELOAD)
        new 
usekey = (button IN_USE)
        new 
up = (button IN_FORWARD)
        new 
down = (button IN_BACK)
        new 
moveright = (button IN_MOVERIGHT)
        new 
moveleft = (button IN_MOVELEFT)
        new 
jump = (button IN_JUMP)
        new 
flags entity_get_int(idEV_INT_flags)
        new 
onground flags FL_ONGROUND
        
if( (moveright || moveleft) && !up && !down && jump && onground && !g_sprint[id] && id != ballholder)
            
SideJump[id] = 1
        
        
if(!Coord_Off_Z_active)
        {
            if(
onground)
            {
                new 
User_Origin[3]
                
get_user_origin(idUser_Origin)
                
Coord_Off_Z_active 1
                Coord_Off_Z 
User_Origin[2] - 35
                Coord_Off_Y 
User_Origin[1]
            }
        }

        if(
ballholder 0)
        {
            
no_ball 1
            entity_set_float
(aball,EV_FL_framerate,0.0)
            
entity_set_int(aball,EV_INT_sequence,0)
        }
        else
        {
            if(
no_ball)
            {
                
no_ball 0
                entity_set_int
(aballEV_INT_sequence2);
                
entity_set_float(aballEV_FL_framerate22.0);
            }
        }

        
        
        if(
relode)
        {
            
        
entity_set_float(idEV_FL_framerate0.0);    //FLY CHARGE
        
entity_set_int(idEV_INT_sequence54);
        
entity_set_float(idEV_FL_animtime1.0)
        }



        if(
g_sprint[id])
            
entity_set_float(idEV_FL_fuser20.0)
            

        if( 
id != ballholder )
            
PressedAction[id] = usekey
        
else 
        {
            if( 
usekey && !PressedAction[id]) 
            {
                
kickBall(ballholder0)
                        
                if(
get_pcvar_num(CVAR_OFFSIDE))
                    
Adelantado(id)                    
            }
            else if( !
usekey && PressedAction[id])
                
PressedAction[id] = 0
        
}    
        
        if(
soy_spec[id] || is_user_foul[id] || is_offside[id])
        {
            if((
button IN_ATTACK || button IN_ATTACK2)) 
                
entity_set_int(idEV_INT_button, (button & ~IN_ATTACK) & ~IN_ATTACK2)
        }

/****************************************************************** FRAG O NO FRAG ************************************************************************/
        
new auxiliar get_pcvar_num(CVAR_FRAG)
        if(!
auxiliar)
        {
            if( 
id != ballholder && (button IN_ATTACK || button IN_ATTACK2) ) 
            {

/****************************************************************** FRAG EN AREA ************************************************************************/
            
                
static Float:maxdistance
                
static Float:maxdistancem
                
static ferencere
                
static distancemax

                
new fteam get_user_team(id)
            
                
distancemax Mascots[fteam]
                
maxdistancem get_pcvar_float(CVAR_KILLNEARAREA)
                
                if(
ballholder 0
                {
                    
ferencere ballholder
                    maxdistance 
get_pcvar_float(CVAR_KILLNEARHOLDER)
                }            
                else {
                    
ferencere aball
                    maxdistance 
get_pcvar_float(CVAR_KILLNEARBALL)
                }
                
                if(!
maxdistance)
                    return
                    
                if(
entity_range(idferencere) > maxdistance && entity_range(iddistancemax) > maxdistancem)
                    
entity_set_int(idEV_INT_button, (button & ~IN_ATTACK) & ~IN_ATTACK2)
            }
        }
    }


Last edited by Spy123; 05-07-2013 at 17:22.
Spy123 is offline
 



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 10:48.


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