AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Blocking button (https://forums.alliedmods.net/showthread.php?t=173392)

Mr. Frost 12-04-2011 11:37

Blocking button
 
How to blocking jump button and add my function? I know that's possible.

Mr. Frost 12-04-2011 11:56

Re: Blocking button
 
Is jump button hookable?

brian201049 12-04-2011 11:57

Re: Blocking button
 
Quote:

Originally Posted by Mr. Frost (Post 1607665)
Is jump button hookable?

Sure

Mr. Frost 12-04-2011 11:58

Re: Blocking button
 
That don't work

brian201049 12-04-2011 12:00

Re: Blocking button
 
Quote:

Originally Posted by Mr. Frost (Post 1607669)
That don't work

Show us your code please

Mr. Frost 12-04-2011 12:05

Re: Blocking button
 
I used your code

bibu 12-04-2011 12:11

Re: Blocking button
 
That won't work, you can't block jump like that:

To OP, see this plugin:

http://forums.alliedmods.net/showthread.php?t=173309

And search next time...

brian201049 12-04-2011 12:12

Re: Blocking button
 
Quote:

Originally Posted by Mr. Frost (Post 1607678)
I used your code

Try this

Code:

#include <amxmodx>

public plugin_init()
{
register_plugin("Jump button function", "1.0", "Your name")

register_clcmd("+@jump", "clcmd_jump1")
register_clcmd("-@jump", "clcmd_jump2")
}

public clcmd_jump1(id)
{
// Player push jump button

// Here your function

return PLUGIN_HANDLED
}

public clcmd_jump2(id)
{
// Player release jump button

// Here your function

return PLUGIN_HANDLED
}


Devil259 12-04-2011 13:21

Re: Blocking button
 
From my Aim Freeze plugin :

Code:
#include < amxmodx > #include < hamsandwich > public plugin_init( ) {     RegisterHam( Ham_Player_Jump , "player" , "Player_Jump" , false ) } public Player_Jump( id ) {     if( is_user_frozen( id ) && !get_pcvar_num( pCvarAllowJump ) )     {         return HAM_SUPERCEDE     }         return HAM_IGNORED }

Mr. Frost 12-04-2011 13:34

Re: Blocking button
 
brian201049, this also doesn't work.

I tried this:
PHP Code:

#include <amxmodx>
#include <hamsandwich>
public plugin_init()
     
RegisterHam(Ham_Player_Jump"player""player_jump"0);
public 
player_jump(id)
     return 
HAM_SUPERCEDE

But it also doesn't work. Why!? :cry:


All times are GMT -4. The time now is 11:48.

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