Raised This Month: $ Target: $400
 0% 

Get walking ground origin or smthn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
outsiderlv
Senior Member
Join Date: Mar 2010
Old 07-29-2010 , 13:39   Get walking ground origin or smthn
Reply With Quote #1

PHP Code:
        new id read_data(2)
        new 
iOrigin[3]
        
iOrigin[0] = read_data(3)
        
iOrigin[1] = read_data(4)
        
iOrigin[2] = read_data(5)
        new 
iPlayerOrigin[3]
        
get_user_origin(idiPlayerOrigin)
        
        new 
iDistance get_distance(iPlayerOriginiOrigin)
        
        new 
name[35];
        
get_user_name(id,name,34);

        
        
ColorChat(0RED"^x03%s^x01 spray'd^x04 %d units^x01 high!",name,iDistance); 
I need to get the distance from ground, not the person. How can i do that?
outsiderlv is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-29-2010 , 13:49   Re: Get walking ground origin or smthn
Reply With Quote #2

iOrigin[ 2 ] is the z value. See if this holds distance from ground.
__________________
Bugsy is offline
outsiderlv
Senior Member
Join Date: Mar 2010
Old 07-29-2010 , 14:01   Re: Get walking ground origin or smthn
Reply With Quote #3

How? I tried to use this:
iOrigin[1] = 100
But that was wrong. So if i try this:
iOrigin[2] = 100
it can be ok, right?
Or mby I should try this:
iOrigin[2] = pev(client, pev_origin, origin);
Damn.. Im so newbie at this.. Please help.

Last edited by outsiderlv; 07-29-2010 at 14:05.
outsiderlv is offline
outsiderlv
Senior Member
Join Date: Mar 2010
Old 07-29-2010 , 14:27   Re: Get walking ground origin or smthn
Reply With Quote #4

Sorry for dp, but i dont need z origin. I need y. I need to get the distance from the ground to the spray (height):
^
|
|
Like that..
outsiderlv is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-29-2010 , 16:12   Re: Get walking ground origin or smthn
Reply With Quote #5

Right, do a print of iOrigin[ 2 ] after the read_data(5), this may hold what youre looking for.
__________________
Bugsy is offline
outsiderlv
Senior Member
Join Date: Mar 2010
Old 08-07-2010 , 14:33   Re: Get walking ground origin or smthn
Reply With Quote #6

What do you mean with print? I have to type print after read_data(5)?
outsiderlv is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-07-2010 , 14:42   Re: Get walking ground origin or smthn
Reply With Quote #7

iOrigin[ 2 ] holds z value. Whatever you plan on doing with the value you need, use that.
__________________
Bugsy is offline
outsiderlv
Senior Member
Join Date: Mar 2010
Old 08-07-2010 , 14:58   Re: Get walking ground origin or smthn
Reply With Quote #8

Can you say it in code?
outsiderlv is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-07-2010 , 15:53   Re: Get walking ground origin or smthn
Reply With Quote #9

new the_value_you_want = iOrigin[ 2 ];
__________________
Bugsy is offline
outsiderlv
Senior Member
Join Date: Mar 2010
Old 08-08-2010 , 02:48   Re: Get walking ground origin or smthn
Reply With Quote #10

PHP Code:
        new id read_data(2)
        new 
iOrigin[3]
        
iOrigin[0] = read_data(3)
        
iOrigin[1] = read_data(4)
        
iOrigin[2] = read_data(5)
        
        new 
iPlayerOrigin[3]
        
get_user_origin(idiPlayerOrigin)
        new 
iDistance get_distance(iPlayerOriginiOrigin[2]) 
It isnt working.. <_< Errors compiling..
outsiderlv is offline
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 00:12.


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