Raised This Month: $ Target: $400
 0% 

Changing/canceling JUMP event in NS


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Blackhawk
Member
Join Date: Apr 2005
Old 04-09-2005 , 16:28   Changing/canceling JUMP event in NS
Reply With Quote #1

I'm looking for a way to change the Jump behaviour in NS.
For the moment, i need to check if someones want to jump and 'disable' it if neccesary on a gived player. IE this jump he tryed should not be executed. But the next maybe has to work....

I try'd


Code:
public forward_playerprethink(id) {
    entity_set_int(id, EV_INT_button, entity_get_int(id, EV_INT_button) & ~(IN_JUMP))
}

public plugin_init() {
        register_forward(FM_PlayerPreThink, "forward_playerprethink")
}
give from an example seen here in the forums, but if didn't work. Any ideas how i can change the jump event?
Blackhawk is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-09-2005 , 22:08  
Reply With Quote #2

Try it with Engine:

Code:
public client_PreThink(id) {    if(!is_user_alive(id)) {       return PLUGIN_CONTINUE;    }    new button = get_user_button(id);    if(button & IN_JUMP) {       entity_set_int(id,EV_INT_button,button & ~IN_JUMP);    }    return PLUGIN_CONTINUE; }
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-10-2005 , 00:34  
Reply With Quote #3

Dumb question.. What does the ~ do?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Blackhawk
Member
Join Date: Apr 2005
Old 04-10-2005 , 18:59  
Reply With Quote #4

Whatever, i'm sorry to say that this solution didn't work as expected in NS
Blackhawk is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 04-10-2005 , 22:31  
Reply With Quote #5

FM doesnt work right a lot of times. Use Engine.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Reply


Thread Tools
Display Modes

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 10:02.


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