Print (v.x) - prints `1` print (v.y) - prints `2` print (v.z) - prints `3` print (v.w) - prints `4` - Vectors support arbitrary swizzling: local v = vector4( 1, 2, 3, 4 ) To get the individual values from a vector: local v = vector4( 1, 2, 3, 4 ) Renaming will probably cause a few issues with NUI callbacks. ![]() copycoordsandheading Copies your current coordinates and heading. Simple FiveM script to copy coords to clipboard :) Use /coords to copy to clipboard. copycoords Copies your current coordinates. It will copy your vehicle's coordinates if you are in a vehicle. Print (norm(v)) - prints `vector4(0.1825742, 0.3651484, 0.5477225, 0.7302967)` - Unpacking works: local v = vector4( 1, 2, 3, 4 ) A very simple yet useful tool to copy your current coordinates to the clipboard. Print (#v) - prints `5.477` - Vectors can be normalized: local v = vector4( 1, 2, 3, 4 ) Print (-v) - prints `vector4(-1, -2, -3, -4)` - The length of the vector can be retrieved (pythagoras): local v = vector4( 1, 2, 3, 4 ) Print (v1 + v2) - prints `vector4(6, 8, 9, 12)` print (v1 - v2) - prints `vector4(-4, -4, -4)` print (v1 * v2) - prints `vector4(5, 12, 21, 32)` print (v1 / v2) - prints `vector4(0.2, 0.33, 0.43, 0.5)` - Vectors can be inverted: local v = vector4( 1, 2, 3, 4 ) Gaming Browse all gaming FiveM Resource Install Tutorial today We are going over how to get lots of Coordinates very quicklyResource. Print (v1 = v2) - prints `true` print (v1 = v3) - prints `false` print (v1 ~= v3) - prints `true` - Arithmetic operations between vectors are supported: local v = vector4( 1, 2, 3, 4 ) beep: If this is true, the beeping sound will play. loop: If this is true, the message will stay forever unless you call CLEARALLHELPMESSAGES. Print ( type (v)) - prints `vector4` - Vectors support equality operators: local v1 = vector4( 1, 2, 3, 4 ) Use 1 for FLOATINGHELPTEXT1 and 2 for FLOATINGHELPTEXT2, otherwise the help text will be reset to a normal help text on the top left corner on your screen. Vectors are a real data type: local v = vector4( 1, 2, 3, 4 )
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |