Raised This Month: $ Target: $400
 0% 

cant catch landing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-03-2011 , 03:16   Re: cant catch landing
Reply With Quote #1

Quote:
Originally Posted by jim_yang View Post
Code:
get_pdata_float(id, 255)
Is there a name for this offset?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-03-2011 , 03:27   Re: cant catch landing
Reply With Quote #2

m_flFallVelocity, sorry to not list it in test plugin, cause i'm lazy
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-03-2011 , 10:10   Re: cant catch landing
Reply With Quote #3

Quote:
Originally Posted by jim_yang View Post
m_flFallVelocity
Is there a difference between this and pev_flFallVelocity?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-03-2011 , 04:11   Re: cant catch landing
Reply With Quote #4

jim yang. strange but it loops the sound..
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 08-03-2011 at 04:19.
avril-lavigne is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-03-2011 , 04:37   Re: cant catch landing
Reply With Quote #5

sorry, no idea about the sound part...
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-03-2011 , 04:40   Re: cant catch landing
Reply With Quote #6

ah ok. just tested your code. than forgot to make proper backup.... and do my plugin again (
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
avril-lavigne
Banned
Join Date: Apr 2009
Old 08-03-2011 , 04:43   Re: cant catch landing
Reply With Quote #7

for everyone who need such plugin as Im making for my MOD
here it is. thanks to all


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

new const Version[] = "0.1";

new 
pcvar_jumpimpulse;
new 
snd_jump[][] = { "quad/jump.wav" }
new 
snd_land[][] =  { "quad/land1.wav" }



const 
BUTTONS = ( IN_FORWARD IN_BACK IN_MOVELEFT IN_MOVERIGHT IN_JUMP );
new 
g_OffGround g_LandEntity g_iMaxPlayers;

public 
plugin_init() 
{
    
register_plugin"Hook Landing" Version "bugsy" );
    
register_forwardFM_CmdStart "fw_FMCmdStart" );
    
pcvar_jumpimpulse register_cvar("hj_impulse""385");
    
g_iMaxPlayers get_maxplayers();
}

public 
plugin_precache() {
             static 
i
          
for(0sizeof snd_jumpi++)
         
precache_sound(snd_jump[i])
              for(
0sizeof snd_landi++)
        
precache_sound(snd_land[i])
 }

public 
fw_FMCmdStartid uc_handle seed )
{
    if ( ( 
get_ucuc_handle UC_Buttons ) | pevid pev_oldbuttons ) ) & BUTTONS )
    {
            

        if ( !( 
pevid pev_flags ) & FL_ONGROUND ) )
        {           
      
            
g_OffGround |= ( << ( id 31 ) );

            if ( !
g_LandEntity )
                
CreateLandEntity();

            
entity_set_floatg_LandEntity EV_FL_nextthink get_gametime() + 0.01 );
        }               
    }
      if ((
get_uc(uc_handleUC_Buttons) & IN_JUMP) && !(pev(idpev_oldbuttons) & IN_JUMP) && (pev(idpev_flags) & FL_ONGROUND))
    {
        new 
Float:velocity[3];
               
pev(idpev_velocityvelocity)
                
velocity[2] = get_pcvar_float(pcvar_jumpimpulse);
              
set_pev(idpev_velocityvelocity)
               
client_cmd(id,"play quad/jump"
    }
}

public 
LandEntityThinkiEntity )
{
    for ( new 
id id <= g_iMaxPlayers id++ )
    {
        if ( 
g_OffGround & ( << ( id 31 ) ) )
        {
            if ( 
pevid pev_flags ) & FL_ONGROUND )
            {
                 
emit_sound(idCHAN_BODYsnd_land[random_num(0sizeof snd_land 1)], VOL_NORMATTN_NORM0PITCH_NORM)
                
                
g_OffGround &= ~( << ( id 31 ) );
                
                if ( !
g_OffGround )
                    break;
            }
        }
    }
    
    if ( 
g_OffGround )
        
entity_set_floatg_LandEntity EV_FL_nextthink get_gametime() + 0.01 );
}

CreateLandEntity()
{
    
g_LandEntity create_entity"info_target" );
    
entity_set_stringg_LandEntity EV_SZ_classname "land_entity" );
    
register_think"land_entity" "LandEntityThink" );    

__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc
avril-lavigne is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-03-2011 , 20:30   Re: cant catch landing
Reply With Quote #8

haven't found any use of pev_flFallVelocity in hlsdk, so the difference is unknown.
A proper guess is pev struct use for any entity, but m_* is member var of CBasePlayer class, seems game likes to restore and update its member var each time instead of the pev_ struct.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>

Last edited by jim_yang; 08-03-2011 at 20:43.
jim_yang is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-03-2011 , 22:29   Re: cant catch landing
Reply With Quote #9

Quote:
Originally Posted by jim_yang View Post
haven't found any use of pev_flFallVelocity in hlsdk, so the difference is unknown.
A proper guess is pev struct use for any entity, but m_* is member var of CBasePlayer class, seems game likes to restore and update its member var each time instead of the pev_ struct.
That's weird since I've seen it used in a plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 03:27.


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