AlliedModders

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

GhostMan 02-05-2013 08:49

max speed
 
set_user_maxspeed should be used in
PHP Code:

RegisterHam(Ham_Item_PreFrame"player""FwdPreFrame_Post"1

Or

PHP Code:

register_event("CurWeapon""HookCurWeapon""be""1=1"

In both functions it works, but which one is better to use?

Napoleon_be 02-05-2013 10:00

Re: max speed
 
id prefer CurWeapon since it allows you to save cpu storage.

Kiske 02-05-2013 11:08

Re: max speed
 
I think ItemPreFrame is better.

Arkshine 02-05-2013 11:16

Re: max speed
 
Quote:

Originally Posted by Napoleon_be (Post 1887528)
id prefer CurWeapon since it allows you to save cpu storage.

You miss the point that ItemPostFrame() with "player" is equivalent to ResetMaxSpeed() because using the same offset.
ResetMaxSpeed is a virtual function which is not included with the current Ham version. It's in the unofficial version though.

So, the answer is the first, since you will modify onyl maxspeed when needs.

Napoleon_be 02-05-2013 12:17

Re: max speed
 
Quote:

Originally Posted by Arkshine (Post 1887575)
You miss the point that ItemPostFrame() with "player" is equivalent to ResetMaxSpeed() because using the same offset.
ResetMaxSpeed is a virtual function which is not included with the current Ham version. It's in the unofficial version though.

So, the answer is the first, since you will modify onyl maxspeed when needs.

Mhh okay didn't know that :D


All times are GMT -4. The time now is 20:40.

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