Raised This Month: $ Target: $400
 0% 

Lock and jump squats


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
artist
Member
Join Date: Nov 2013
Old 12-22-2014 , 19:14   Lock and jump squats
Reply With Quote #1

Code:
#include <amxmodx> #include <fakemeta> public plugin_init() {     register_forward(FM_PlayerPreThink, "player_think", 1) } public player_think(id) {     static button; button = pev(id, pev_button)         if(button & IN_DUCK) set_pev(id, pev_button, button &~ IN_DUCK)     if(button & IN_JUMP) set_pev(id, pev_button, button &~ IN_JUMP) }

Not working...
artist is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-22-2014 , 22:39   Re: Lock and jump squats
Reply With Quote #2

So, you want to restrict IN_DUCK and IN_JUMP function?
zmd94 is offline
artist
Member
Join Date: Nov 2013
Old 12-23-2014 , 03:52   Re: Lock and jump squats
Reply With Quote #3

Yes ))

Watched for mp.dll sourse:

Code:
void CBasePlayer::PreThink(void) {     ...         if (pev->button & IN_JUMP)         Jump();     if ((pev->button & IN_DUCK) || FBitSet(pev->flags, FL_DUCKING) || (m_afPhysicsFlags & PFLAG_DUCKING))         Duck();     .... }
artist is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 12-23-2014 , 03:57   Re: Lock and jump squats
Reply With Quote #4

This plugin will restrict player from jump:
PHP Code:
#include <amxmodx>
#include <engine>
#include <hamsandwich>

#define VERSION "0.0.1"

public plugin_init()
{
    
register_plugin("No-Jump"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Player_Jump"player""Player_Jump")
}

public 
Player_Jump(id)
{
    static 
iOldbuttons iOldbuttons entity_get_int(idEV_INT_oldbuttons)
    if( !(
iOldbuttons IN_JUMP) )
    {
        
entity_set_int(idEV_INT_oldbuttonsiOldbuttons IN_JUMP)
        return 
HAM_HANDLED
    
}
    return 
HAM_IGNORED

zmd94 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 15:26.


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