Raised This Month: $32 Target: $400
 8% 

Origin points


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 01-10-2016 , 21:08   Origin points
Reply With Quote #1

Lets say i've a random origin.
I need to change Origin[2] value in order to it goes verticaly to the original value. How can i do that?

Let's say
....HERE....
......|........
......|........
......|........
......|........
......o/......
Jhob94 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-10-2016 , 21:16   Re: Origin points
Reply With Quote #2

What "original value"?
__________________
fysiks is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 01-10-2016 , 21:17   Re: Origin points
Reply With Quote #3

Some random value getting pev_origin from some entity/player.
Then i need to change the last slot of that origin to get a new origin point vertical to that one.
Jhob94 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-10-2016 , 21:31   Re: Origin points
Reply With Quote #4

You answered your own question before you asked it. Read your original post.
__________________

Last edited by fysiks; 01-10-2016 at 21:34.
fysiks is offline
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Location: Siiiiiiiiuu
Old 01-10-2016 , 21:41   Re: Origin points
Reply With Quote #5

I know what i've to do. The problem is i don't know how. Maybe the solution is easy but i'm lost right now.
Spent a lot of hours finding out what the problem was, it's 2:40am and my brain is dead xD
Jhob94 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-10-2016 , 21:49   Re: Origin points
Reply With Quote #6

Explain what you are actually trying to do because the question you asked is "how do I add a number to a number?".
__________________
fysiks is offline
UchihaMadara
Junior Member
Join Date: Jun 2014
Location: The South
Old 01-10-2016 , 22:02   Re: Origin points
Reply With Quote #7

go vertically, you mean go up/down ?

PHP Code:
new Float:Origin[3// First Origin
new Float:Origin2[3// Second Origin

Origin2 Origin
Origin2
[2] -= 36.0 // go down 36 units?
Origin2[2] += 36.0 // go up 36 units? 

Last edited by UchihaMadara; 01-10-2016 at 22:03.
UchihaMadara is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 01-11-2016 , 03:24   Re: Origin points
Reply With Quote #8

You can randomize only origin[0] and origin [1], holding origin[2] untouchable, show code where you randomize origin.
siriusmd99 is offline
abdobiskra
Veteran Member
Join Date: Jul 2014
Location: Algeria
Old 01-11-2016 , 03:36   Re: Origin points
Reply With Quote #9

PHP Code:
public plugin_init() {
   
register_plugin("xx""xx""xxx")
   
register_clcmd("say /get","Get")
}
public 
Get(id){
   new 
origin[3]
   
get_user_origin(idorigin)
   
client_print(idprint_chat"origin ------> %d %d %d",origin[0],origin[1],origin[2])

__________________
abdobiskra is offline
Send a message via Skype™ to abdobiskra
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-11-2016 , 19:36   Re: Origin points
Reply With Quote #10

Quote:
Originally Posted by abdobiskra View Post
PHP Code:
public plugin_init() {
   
register_plugin("xx""xx""xxx")
   
register_clcmd("say /get","Get")
}
public 
Get(id){
   new 
origin[3]
   
get_user_origin(idorigin)
   
client_print(idprint_chat"origin ------> %d %d %d",origin[0],origin[1],origin[2])

You should probably actually read the thread before posting irrelevant code.
__________________
fysiks is offline
Reply


Thread Tools
Display Modes

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 16:24.


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