AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to detect (https://forums.alliedmods.net/showthread.php?t=130205)

zombieplague 06-21-2010 10:30

How to detect
 
How to detect if the person is moving or not moving ??

Arkshine 06-21-2010 11:34

Re: How to detect
 
Check his velocity.

zombieplague 06-21-2010 11:57

Re: How to detect
 
Quote:

Originally Posted by Arkshine (Post 1215410)
Check his velocity.

Hmmm how ?

Can you show me the code ?

Alka 06-21-2010 12:07

Re: How to detect
 
PHP Code:

    new Float:vVel[3];
    
pev(entpev_velocityvVel);
    
    if(
vector_length(vVel) > 0)
        
//moving...(x,y,z) 


zombieplague 06-21-2010 12:32

Re: How to detect
 
Quote:

Originally Posted by Alka (Post 1215441)
PHP Code:

    new Float:vVel[3];
    
pev(entpev_velocityvVel);
 
    if(
vector_length(vVel) > 0)
        
//moving...(x,y,z) 


Thanks... But, I need more codes. However, how about not moving ?

mottzi 06-21-2010 12:51

Re: How to detect
 
Quote:

Originally Posted by zombieplague (Post 1215457)
Thanks... But, I need more codes. However, how about not moving ?

You just add an °else° block?

drekes 06-21-2010 12:51

Re: How to detect
 
PHP Code:

new Float:vVel[3];
    
pev(entpev_velocityvVel);
 
    if(
vector_length(vVel) == 0)
        
//not moving...(x,y,z) 


mottzi 06-21-2010 12:52

Re: How to detect
 
SRY FOR POST....

zombieplague 06-21-2010 13:28

Re: How to detect
 
Quote:

Originally Posted by drekes (Post 1215483)
PHP Code:

new Float:vVel[3];
    
pev(entpev_velocityvVel);
 
    if(
vector_length(vVel) == 0)
        
//not moving...(x,y,z) 


Just that ?

How about the public ?

like public somethihng(id ) ??

RedRobster 06-21-2010 13:31

Re: How to detect
 
Well, what are you trying to do to them if they aren't moving? That'll help us know what you want to trigger this.


All times are GMT -4. The time now is 14:49.

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