Raised This Month: $51 Target: $400
 12% 

Stealth - Not moving


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 04-13-2008 , 15:19   Stealth - Not moving
Reply With Quote #1

Hello ,

Simple question : How you make someone invisble(stealth) when he just stand still(not moving) , stealth part no problem I just dont know how to get if a player stands still .

Greetings Grim
__________________
I am out of order!
grimvh2 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-13-2008 , 15:33   Re: Stealth - Not moving
Reply With Quote #2

Code:
bool:player_is_still(index) {     new Float:vVelocity[3];     pev(index, pev_velocity, vVelocity);     vVelocity[2] = 0.0;     return (vector_length(vVelocity) == 0.0); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 04-13-2008 , 15:58   Re: Stealth - Not moving
Reply With Quote #3

Hmm ? And so if i just put that in my .sma it works?
I know , I am still a newbie xD
__________________
I am out of order!
grimvh2 is offline
atomen
Veteran Member
Join Date: Oct 2006
Location: Stockholm, Sweden
Old 04-13-2008 , 16:04   Re: Stealth - Not moving
Reply With Quote #4

PHP Code:
public check(id)
{
 if(
player_is_still == true)
 {
  
//code
 
}
}

bool:player_is_still(index)
{
  new 
Float:vVelocity[3];
  
pev(indexpev_velocityvVelocity);
  
vVelocity[2] = 0.0;
  return (
vector_length(vVelocity) == 0.0);

__________________

Last edited by atomen; 04-13-2008 at 16:40.
atomen is offline
Send a message via MSN to atomen
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 04-13-2008 , 16:17   Re: Stealth - Not moving
Reply With Quote #5

sry, but why dont you just check if pev_speed == 0.0 ?
__________________
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 04-13-2008 , 16:20   Re: Stealth - Not moving
Reply With Quote #6

Quote:
Originally Posted by Greenberet View Post
sry, but why dont you just check if pev_speed == 0.0 ?
I dont think thats a good idea
__________________
I am out of order!
grimvh2 is offline
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-13-2008 , 16:21   Re: Stealth - Not moving
Reply With Quote #7

You can check:
http://users.svn.alliedmods.net/view...52&view=markup
Styles is offline
Send a message via AIM to Styles
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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