AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Check if a entity isn't moving (https://forums.alliedmods.net/showthread.php?t=306841)

LOLpgl 04-16-2018 09:31

Check if a entity isn't moving
 
Hi ! How i can check if a entity isn't moving ?

THC420 04-16-2018 10:47

Re: Check if a entity isn't moving
 
checking if the speed of the entity is 0 ?

LOLpgl 04-16-2018 11:14

Re: Check if a entity isn't moving
 
Quote:

Originally Posted by THC420 (Post 2587990)
checking if the speed of the entity is 0 ?

Yes

klippy 04-16-2018 12:29

Re: Check if a entity isn't moving
 
PHP Code:

#include <xs>
#include <fakemeta> 

PHP Code:

new Float:velocity[3];
pev(entityIndexpev_velocityvelocity);
if(
xs_vec_len(velocity) < 0.01) {
    
// The entity isn't moving



LOLpgl 04-16-2018 13:06

Re: Check if a entity isn't moving
 
Thanks


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

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