Raised This Month: $32 Target: $400
 8% 

[SOLVED] Really best way to set max speed?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-15-2015 , 10:48   [SOLVED] Really best way to set max speed?
Reply With Quote #1

Hi there all,

I'm so confused about all methods those are available for setting a player max speed.
Well, the usual way is this:
PHP Code:
//required fun module
set_user_maxspeedid, ... ); 
But it does require to reset the speed again when weapon changes.

I heart some experts advising use Ham_Reset_Maxspeed. I searched but didn't find anything directly about this.

Now my question is: What's the best way to set max speed and how to it?

Thanks.
P.S.: Searched a lot
P.P.S: Searched a lot again
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...

Last edited by xEhsaan; 05-18-2015 at 13:20.
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 05-15-2015 , 11:00   Re: Really best way to set max speed?
Reply With Quote #2

You didn't search a lot

PHP Code:
new Ham:Ham_Player_ResetMaxSpeed Ham_Item_PreFrame;

public 
plugin_init(){
    
RegisterHam(Ham_Player_ResetMaxSpeed,"player","playerResetMaxSpeed"1)
}

public 
playerResetMaxSpeed(id){
    
set_user_maxspeed(id300.0);

__________________

Last edited by Neeeeeeeeeel.-; 05-15-2015 at 11:02.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-15-2015 , 11:06   Re: Really best way to set max speed?
Reply With Quote #3

Umm, I saw that code, but how can I make the speed default?
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...

Last edited by xEhsaan; 05-15-2015 at 11:06.
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 05-15-2015 , 14:26   Re: Really best way to set max speed?
Reply With Quote #4

http://www.amxmodx.org/doc/index.htm...r_maxspeed.htm
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
wickedd
Veteran Member
Join Date: Nov 2009
Old 05-15-2015 , 16:59   Re: Really best way to set max speed?
Reply With Quote #5

For future reference use this site.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-15-2015 , 23:44   Re: Really best way to set max speed?
Reply With Quote #6

I tried this:
PHP Code:
set_user_maxspeedid ); // to return to default 
But it just freezes the player.
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 05-16-2015 , 14:29   Re: Really best way to set max speed?
Reply With Quote #7

i think so normal speed is 240
just remove the task and set max speed to 240
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
Old 05-16-2015, 14:45
HamletEagle
This message has been deleted by HamletEagle.
Nextra
Veteran Member
Join Date: Apr 2008
Location: Germany
Old 05-16-2015 , 15:12   Re: Really best way to set max speed?
Reply With Quote #8

Quote:
Originally Posted by xEhsaan View Post
I tried this:
PHP Code:
set_user_maxspeedid ); // to return to default 
But it just freezes the player.
That does not reset to default and is expected behavior. You can simply tell the game to reset the max speed by calling ExecuteHamB(Ham_CS_Player_ResetMaxSpeed, client). Obviously you need to make sure your own Ham_CS_Player_ResetMaxSpeed hook does not overwrite the value again.
__________________
In Flames we trust!

Last edited by Nextra; 05-16-2015 at 15:13.
Nextra is offline
xEhsaan
Member
Join Date: Mar 2015
Location: Isfahan, Iran
Old 05-16-2015 , 15:23   Re: Really best way to set max speed?
Reply With Quote #9

Ohhh, finally a working way, Thanks a lot.
__________________
* Wait for something awesome...
* AMX Mod X Plugin Translation Repository [Paused Temporarily]
* Knife Deathmatch Shop
* Knife CFG Detector
* Looking for an idea...
xEhsaan is offline
Send a message via Skype™ to xEhsaan
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 05-18-2015 , 10:59   Re: Really best way to set max speed?
Reply With Quote #10

Quote:
Originally Posted by indraraj striker View Post
i think so normal speed is 240
just remove the task and set max speed to 240
The default speed depends on the weapon you are carring... so a hardcoded value won't work.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
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 23:47.


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