Raised This Month: $ Target: $400
 0% 

How do I reset a users speed?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 05-07-2006 , 10:56   How do I reset a users speed?
Reply With Quote #1

I tried using set_user_maxspeed( id );

So the second value would just default to -1.0, but the player cant move... its like i start to move but then move back to my position its weird, is anyone else having this problem?
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 05-07-2006 , 11:01  
Reply With Quote #2

isn't the normal speed 320?

cant you do:
Code:
 new Speed[]  get_user_maxspeed(id, Speed)  set_user_maxspeed(id, Speed)
wouter is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-07-2006 , 11:59  
Reply With Quote #3

Quote:
Originally Posted by wouter
isn't the normal speed 320?

cant you do:
Code:
 new Speed[]  get_user_maxspeed(id, Speed)  set_user_maxspeed(id, Speed)
What?

My guess is that you're setting the speed in an event like CurWeapon or something like that.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Sneakpeek
Member
Join Date: Dec 2005
Location: Who cares really?
Old 05-07-2006 , 12:08  
Reply With Quote #4

I think what wouter ment, which I also do in my plugin:
Before you actually change the persons speed somewhere in your plugin, save their normal speed to a variable.
Code:
//on top of the plugin because it gotta be global new NormalSpeed[33]   //somewhere else NormalSpeed[id] = get_user_maxspeed(id) set_user_maxspeed(id, what ever you want) //and when you want to reset it you just do this set_user_maxspeed(id, NormalSpeed[id])
__________________
Yes, you did
Sneakpeek is offline
Geesu
Veteran Member
Join Date: Mar 2004
Location: Cincinnati, OH
Old 05-07-2006 , 12:13  
Reply With Quote #5

Quote:
Originally Posted by Hawk552
Quote:
Originally Posted by wouter
isn't the normal speed 320?

cant you do:
Code:
 new Speed[]  get_user_maxspeed(id, Speed)  set_user_maxspeed(id, Speed)
What?

My guess is that you're setting the speed in an event like CurWeapon or something like that.
this is correct But at times I need to "reset" the maxspeed to not listen to my value...

i.e.

I set their speed to 320 while they're holding shield
I now want to reset it...
They make shield "hidden", but they have movespeed of 320 b/c this didn't fire CurWeapon..

See what i mean? I need to be able to like set it to what it should be :/
__________________
Need war3ft help? DO NOT PM ME... Check the forums
Geesu is offline
Send a message via AIM to Geesu Send a message via MSN to Geesu
Ramono
Veteran Member
Join Date: Nov 2005
Location: Netherlands
Old 05-07-2006 , 14:10  
Reply With Quote #6

set_user_maxspeed(index,0.0)

0.0 = default
1.0 = stop user
__________________
Um, hi.
Ramono is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-07-2006 , 14:17  
Reply With Quote #7

AFAIK, 250.0 is the default value.
VEN is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 05-07-2006 , 15:56  
Reply With Quote #8

Make sure you have the real default:
Code:
set_user_maxspeed(id, 320.0)
Peli is offline
Send a message via MSN to Peli
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 05-07-2006 , 15:59  
Reply With Quote #9

i dont think there is a real default, it depends from the server max speed and the client max speed, and some plugins change both of them...
wouter is offline
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 05-07-2006 , 16:03  
Reply With Quote #10

Quote:
Originally Posted by wouter
i dont think there is a real default, it depends from the server max speed and the client max speed, and some plugins change both of them...
Yes but, this is the default as in if you don't modify anything, this is the default. Don't really get what he's trying to do... Do you mean CurWeapon event doesn't work when you try it to set the speed when they switch from weapon to shield?
Peli is offline
Send a message via MSN to Peli
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 05:08.


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