| CS-A-Roland |
07-14-2012 16:27 |
Dont have to hold the key pressed
Hey by the way i tink about another part of another script....
Here it is and also NOT MINE i try to fix it...:
Code:
static iButton;
iButton = get_user_button( id );
if( iButton & IN_USE )
{
static Float:fOrigin[ 3 ];
pev( id, pev_origin, fOrigin );
if( get_distance_f( fOrigin, g_flWallOrigin[ id ] ) > 10.0 )
return;
if( pev( id, pev_flags ) & FL_ONGROUND )
return;
if( iButton & IN_FORWARD )
{
static Float:fVelocity[ 3 ];
velocity_by_aim( id, 240, fVelocity );
set_pev( id, pev_velocity, fVelocity );
}
else if( iButton & IN_BACK )
{
static Float:fVelocity[ 3 ];
velocity_by_aim( id, -240, fVelocity );
set_pev( id, pev_velocity, fVelocity );
}
}
When i dont want to hold the key pressed but want more to stay or run to the wall ive been at this moment, did i must delede the "iButton &" code in front of the IN_FORWARD IN_BACK ?!
The idea iss to Jump to the wall, press the key and then the function to climb is on and if i jump from the wall or press the key again i lost the climb function...
Thanks for understanding it! And thanks for anyone who help! :wink:
|