View Single Post
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 03-14-2019 , 09:28   Re: A specific effect when the player moves/standing
Reply With Quote #4

Quote:
Originally Posted by SonicSonedit View Post
In your case, yes.
PHP Code:
static Float:Velocity[3], i pev(idpev_velocityVelocity) if (Velocity[0] > 0.0 || Velocity[1] > 0.0 || Velocity[2] > 0.0
Use static: the differance between new and static is that static variables are not allocated (destroyed&re-created) each time function is called, and prethink is called goddamn pretty often. You can also check some KZ & Deathrun plugins, they are really good examples.
I can't code now but here this might help.

Last edited by Moody92; 03-14-2019 at 09:29.
Moody92 is offline