Raised This Month: $ Target: $400
 0% 

[ H3LP ] Block IN_BACK


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kushfield
Member
Join Date: Jan 2017
Location: Estonia
Old 06-22-2018 , 09:38   Re: [ H3LP ] Block IN_BACK
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
You can do this, get user velocity, strip backward velocity, then set his velocity.
You can have backwards velocity without using IN_BACK as well, I think the goal here is to block just IN_BACK.

I've been looking for a way to do this as well, and finally ended up with this:
PHP Code:
public fwdRG_PM_Move()
{
    new 
ucmd get_pmove(pm_cmd);
    new 
Float:fwmove get_ucmd(ucmducmd_forwardmove);
    if(
fwmove 0)
    {
        
set_ucmd(ucmducmd_forwardmove0.0);
        
//set_ucmd(ucmd, ucmd_buttons, get_ucmd(ucmd, ucmd_buttons) & ~IN_BACK);
    
}

Blocking movement this way is somewhat laggy for the client though, since it starts moving instantly and then gets reset after the command reaches the server.

Last edited by Kushfield; 06-22-2018 at 09:38.
Kushfield is offline
 



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 12:43.


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