Raised This Month: $ Target: $400
 0% 

Block Jump | Duck [Ham]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-31-2011 , 11:59   Block Jump | Duck [Ham]
Reply With Quote #1

Hello,

PHP Code:
RegisterHamHam_Player_Jump"player""Ham_PlayerBlock" )
RegisterHamHam_Player_Duck"player""Ham_PlayerBlock" )

public 
Ham_PlayerBlock(id) {
    if( 
get_pcvar_num(cStatus) )
        return 
HAM_SUPERCEDE;
    return 
HAM_IGNORED

Why this won't work?
And if its not possible with ham, could u give me other ways please.
__________________
Retired.
Xalus is offline
Kreation
Veteran Member
Join Date: Jan 2010
Location: Illinois
Old 07-31-2011 , 12:00   Re: Block Jump | Duck [Ham]
Reply With Quote #2

Did you check the value of 'cStatus'?
__________________
Hi.
Kreation is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-31-2011 , 12:47   Re: Block Jump | Duck [Ham]
Reply With Quote #3

Those function are just functions that update animations, what are you expect to block ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-31-2011 , 12:53   Re: Block Jump | Duck [Ham]
Reply With Quote #4

so player just stand on ground
__________________
Retired.
Xalus is offline
Old 07-31-2011, 13:05
pingplug
This message has been deleted by ConnorMcLeod. Reason: Fakeplayer
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-31-2011 , 13:05   Re: Block Jump | Duck [Ham]
Reply With Quote #5

You won't block jump or duck using those forwards.

Only thing you can block is SetAnimation and conveyor speed add.
Code:
void CBasePlayer::Duck( )
{
	if (pev->button & IN_DUCK) 
	{
		if ( m_IdealActivity != ACT_LEAP )
		{
			SetAnimation( PLAYER_WALK );
		}
	}
}

void CBasePlayer::Jump()
{
	Vector		vecWallCheckDir;// direction we're tracing a line to find a wall when walljumping
	Vector		vecAdjustedVelocity;
	Vector		vecSpot;
	TraceResult	tr;
	
	if (FBitSet(pev->flags, FL_WATERJUMP))
		return;
	
	if (pev->waterlevel >= 2)
	{
		return;
	}

	// jump velocity is sqrt( height * gravity * 2)

	// If this isn't the first frame pressing the jump button, break out.
	if ( !FBitSet( m_afButtonPressed, IN_JUMP ) )
		return;         // don't pogo stick

	if ( !(pev->flags & FL_ONGROUND) || !pev->groundentity )
	{
		return;
	}

// many features in this function use v_forward, so makevectors now.
	UTIL_MakeVectors (pev->angles);

	// ClearBits(pev->flags, FL_ONGROUND);		// don't stairwalk
	
	SetAnimation( PLAYER_JUMP );

	if ( m_fLongJump &&
		(pev->button & IN_DUCK) &&
		( pev->flDuckTime > 0 ) &&
		pev->velocity.Length() > 50 )
	{
		SetAnimation( PLAYER_SUPERJUMP );
	}

	// If you're standing on a conveyor, add it's velocity to yours (for momentum)
	entvars_t *pevGround = VARS(pev->groundentity);
	if ( pevGround && (pevGround->flags & FL_CONVEYOR) )
	{
		pev->velocity = pev->velocity + pev->basevelocity;
	}
}
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 07-31-2011, 13:08
pingplug
This message has been deleted by ConnorMcLeod. Reason: Fakeplayer
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-31-2011 , 13:09   Re: Block Jump | Duck [Ham]
Reply With Quote #6

So Prethink needed or a better way?
__________________
Retired.
Xalus is offline
Old 07-31-2011, 13:09
Xalus
This message has been deleted by Xalus.
Old 07-31-2011, 13:10
pingplug
This message has been deleted by ConnorMcLeod. Reason: Fakeplayer
Old 07-31-2011, 13:10
Xalus
This message has been deleted by ConnorMcLeod. Reason: Reply to deleted posts.
bibu
Veteran Member
Join Date: Sep 2010
Old 07-31-2011 , 13:13   Re: Block Jump | Duck [Ham]
Reply With Quote #7

Would work fine with orpheu if you're interested.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Old 07-31-2011, 13:14
pingplug
This message has been deleted by ConnorMcLeod. Reason: Fakeplayer
Old 07-31-2011, 13:19
pingplug
This message has been deleted by ConnorMcLeod. Reason: Fakeplayer
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-31-2011 , 13:26   Re: Block Jump | Duck [Ham]
Reply With Quote #8

bibu I never worked with orpheu but U can try if U wanna

@pingplug
Posting bullshit like that isn't helping -_-
__________________
Retired.
Xalus is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 07-31-2011 , 14:16   Re: Block Jump | Duck [Ham]
Reply With Quote #9

Bibu:
I made some tests & recherche
and I think

PHP Code:
drop_to_floor(id)
entity_set_float(idEV_FL_fuser20.0); 
Is good enough
__________________
Retired.
Xalus is offline
Old 07-31-2011, 14:41
Kreation
This message has been deleted by ConnorMcLeod. Reason: Reply to deleted posts.
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-31-2011 , 15:46   Re: Block Jump | Duck [Ham]
Reply With Quote #10

Code:
#include < amxmodx > #include < orpheu > #include < orpheu_stocks > #include < hlsdk_const > new OrpheuStruct:g_ppmove; public plugin_init( ) {     OrpheuRegisterHook( OrpheuGetDLLFunction( "pfnPM_Move", "PM_Move" ), "PM_Move" );     OrpheuRegisterHook( OrpheuGetFunction( "PM_Jump" ), "PM_Jump" );     OrpheuRegisterHook( OrpheuGetFunction( "PM_Duck" ), "PM_Duck" ); } public PM_Move( OrpheuStruct:ppmove, server ) {     g_ppmove = ppmove; } public PM_Jump( ) {     new iPlayer = OrpheuGetStructMember( g_ppmove, "player_index" ) + 1;         if( is_user_alive( iPlayer ) )     {         OrpheuSetStructMember( g_ppmove, "oldbuttons", OrpheuGetStructMember( g_ppmove, "oldbuttons" ) | IN_JUMP );     } } public PM_Duck( ) {     new iPlayer = OrpheuGetStructMember( g_ppmove, "player_index" ) + 1;         if( is_user_alive( iPlayer ) )     {         new OrpheuStruct:cmd = OrpheuStruct:OrpheuGetStructMember( g_ppmove, "cmd" );         OrpheuSetStructMember( cmd, "buttons", OrpheuGetStructMember( cmd, "buttons" ) & ~IN_DUCK );     } }

Requires Orpheu and the PM Functions pack.
__________________
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 19:11.


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