AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   velocity (https://forums.alliedmods.net/showthread.php?t=27762)

wonsae 04-28-2006 17:40

velocity
 
hi i would learn about velocity and what it does because i looked at the docs and the inc and it doesn't show much about it my point to this is to make a player speed because set_user_maxspeed doesn't work :\

v3x 04-28-2006 18:01

What are you trying to do?

wonsae 04-28-2006 18:01

I want to speed up players in TS

v3x 04-28-2006 18:02

Show me how you're using set_user_maxspeed.

wonsae 04-28-2006 18:15

Code:
set_user_maxspeed(id,1000)
the only way to speed him up with this is to go right and left and i don't like that

Batman/Gorlag 04-28-2006 18:18

Just to let you know it should be

Code:
set_user_maxspeed(id, 1000.0)

not 1000. Otherwise you'll get a tag mismatch warning.

wonsae 04-28-2006 18:18

yeah.. I meant that... but still it only speeds with right and left buttons

v3x 04-28-2006 18:20

This is an example of what I do with the knife in my server:
Code:
#include <amxmodx> #include <fun> public plugin_init() {   register_plugin("test" , "0.1" , "v3x");   register_event("CurWeapon" , "event_CurWeapon" , "b" , "1=1" , "2=29"); // 29 = CSW_KNIFE } public event_CurWeapon(id) {   if(!is_user_alive(id))     return PLUGIN_CONTINUE;   set_user_maxspeed(id , get_user_maxspeed(id) + 75.0);   return PLUGIN_CONTINUE; }
Edit: Just saw your latest post :?

wonsae 04-28-2006 18:24

So... could you help me understand velocity?

GHW_Chronic 04-28-2006 19:09

maxspeed allows you to set a player's top speed (pretty much how fast he runs) except whenever the player changes weapons HL changes the player's maxspeed according to what the maxspeed of the weapon is. That's why v3x hooked curweapon there. Now setting maxspeed will do shit AMXX side unless you do:
Code:
set_cvar_num("sv_maxspeed",1000)

end of talking.


All times are GMT -4. The time now is 04:59.

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