Raised This Month: $51 Target: $400
 12% 

Solved Limit player velocity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mrshark45
Member
Join Date: Jan 2016
Old 09-27-2019 , 17:40   Limit player velocity
Reply With Quote #1

Hey, I want to limit the velocity for some players, but not all, exactly like sv_maxvelocity , but only for some players, how can I achieve that?

Last edited by mrshark45; 12-19-2019 at 14:14.
mrshark45 is offline
JocAnis
Veteran Member
Join Date: Jun 2010
Old 09-27-2019 , 21:27   Re: Limit player velocity
Reply With Quote #2

Choose your max velocity of the player...if he got more velocity than THAT, make his velocity THAT..in player think probably
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
mrshark45
Member
Join Date: Jan 2016
Old 09-28-2019 , 06:41   Re: Limit player velocity
Reply With Quote #3

Quote:
Originally Posted by JocAnis View Post
Choose your max velocity of the player...if he got more velocity than THAT, make his velocity THAT..in player think probably
how?
mrshark45 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 09-28-2019 , 07:47   Re: Limit player velocity
Reply With Quote #4

You want to limit player speed or player velocity?
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
mrshark45
Member
Join Date: Jan 2016
Old 09-28-2019 , 08:11   Re: Limit player velocity
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
You want to limit player speed or player velocity?
player velocity, like sv_maxvelocity
mrshark45 is offline
mrshark45
Member
Join Date: Jan 2016
Old 12-15-2019 , 13:32   Re: Limit player velocity
Reply With Quote #6

If anyone still needs it, I figured it out:
PHP Code:
public limit_user_velocity(idvalue){
    new 
Float:velocity[3], Float:xFloat:y;
    
get_user_velocity(idvelocity);
    new 
Float:speed floatsqroot(floatpower(velocity[0],2.0) + floatpower(velocity[1],2.0));
    if(
speed value){
        
velocity[0]/speed;
        
velocity[1]/speed;
        
velocity[0] = value;
        
velocity[1] = value;
    }
    
set_user_velocity(idvelocity);
    return 
PLUGIN_CONTINUE;

mrshark45 is offline
mrshark45
Member
Join Date: Jan 2016
Old 12-19-2019 , 13:52   Re: Limit player velocity
Reply With Quote #7

Can you mark it as solved?
mrshark45 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-19-2019 , 14:08   Re: Limit player velocity
Reply With Quote #8

Quote:
Originally Posted by mrshark45 View Post
Can you mark it as solved?
You're the one who can mark it. Edit your thread -> Go advanced -> add the "Solved" prefix.
__________________

Last edited by OciXCrom; 12-19-2019 at 14:09.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
mrshark45
Member
Join Date: Jan 2016
Old 12-19-2019 , 14:15   Re: Limit player velocity
Reply With Quote #9

Quote:
Originally Posted by OciXCrom View Post
You're the one who can mark it. Edit your thread -> Go advanced -> add the "Solved" prefix.
Thanks
mrshark45 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 01:40.


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