Vector3

I’m trying to change COORDS on my server but it dont seem to be working, I’ve currently got vector3(xxxx.xx, xxxx.xx, xxx.xx), but dont seem to work.
I asked around with no help but i did find one thing my other script has vector3(xxxx.xxxxxxxx) in each one a longer ending how do i get that and will that make a difference?

what

2 Likes

What do you mean, are trying to change the spawnpoint coords from the default resources?
And no, there is no difference between xxxx.xx and xxxx.xxxxxxxxxx, you can not see the difference between two decimal places or more.

Okay lemme try reword this better, In my server I’m attempting to change the location of moneywash and in the server currently the location has a bunch of ending decimals like this numb.bunchofnumbers
but when ive tried to change it. its just not working at all and im asking if it matter that its not numb.bunchofnumbers instead of just num.num

Can you show the line of code you are changing?

image

What do you mean with “dont seem to be working”? There is an error? What should happen when you change the coords?
What resource are you using?
Why there is a comma at the end?
Have you tried to just shrink the real coords and see if it works?

Were the coords always a vector3 type?

Also post the error.

The decimals shouldn’t matter at all. Post the error or the wanted behaviour so that someone can help you!

The numbers are more important than you think, ee_ee3. Here’s an idiot’s primer on coordinates. (I’m the idiot.)

vector3(x.xxx, y.yyy, z.zzz) shows the three-dimensional location on the map of an object, marker, etc. . The X, Y, and Z axes. vector4(x.xxx, y.yyy, z.zzz, h.hhh adds the heading as well, which is the direction that this object is facing. This could be a ped, a vehicle, or a scripted surface with which a player will interact.

They are certainly not “dumb numbers.” As for all the decimal points, think of each round number as a “meter” as far as the game is concerned. So if you were to round eight decimal places up or down to three decimal places, you are only moving that object a matter of centimeters.

So it depends what the object is and how fine a scale you are working.

I have discovered rounding to three decimal places works well enough. I use the coords command built into the txadmin beta panel in game. It returns a vector4 value and four decimal places… If I need a vector3 I can just leave off that last number. Most scripts I have seen have a distance from the marker that an interaction occurs anyway, like if the marker is 2m in size whatever fires of happens when a character is inside the 2m circle. So a couple of decimal points is no big deal.

Disclaimer: I am just learning this stuff, I am by no means an expert. :slight_smile:

1 Like

thank god someone who actually understood lol

So did that fix your issue? If so please use english to explain what the problem was because I still am confused.

i got it sorted as he has a brain

He literally explained you simple 7th grade maths?

Still helped didnt he?

1 Like

Ok then explain us what you did to fix the issue so others users with the same problem don’t need to make a new thread.

He literally explained you simple 7th grade maths?

Why you hatin’? Dude, it may be “simple” to you, but maybe we are all not as gifted. I’m tired of the attitude of “if you can’t ______, then you have no business running a server.”

Last time I checked, this is a hobby. That means we do this for our enjoyment. This is not a competition, no ribbon or trophy for first place, not an opportunity to show that you are better than everyone else.

3 Likes