Recent Posts

Pages: 1 2 [3] 4 5 ... 10
General Chat / Re: why this gta LU is dead
« Last post by DeDustEagle on March 01, 2021, 11:30:21 am »
rip lu, u will be missed
General Chat / Re: why this gta LU is dead
« Last post by Vortrex on January 18, 2021, 05:34:00 am »

For an actively updated multiplayer mod that's always receiving new features and fixes, check out GTA Connected!

It works on GTA 3, Vice City, San Andreas, and IV.
Features synced peds and traffic, peer2peer sync, universal scripting API with multiple languages, and more!

Visit the website and discord today!

Script Snippets / Point to Vector
« Last post by Motley on December 31, 2020, 06:09:24 pm »
I tried writing this the right way with what I would have to assume is with

Code: [Select]
atan2(x1, y1) - atan2(x2, y2)
Regardless to what formula I tried it was just a really low end return. I wrote a bypass for now to get the job done. Whenever I find the time to create this the right way as mentioned I will upload that version! I even tried rotating around x and y to create a circle around the player with a math formula. Like a rotating camera to player position. Hopefully eventually I'll figure out the right way to do stuff.

I'll make sure you can swap this concept out for the right version later.

I learned that LU prefers to receive angles for player in degrees. It automatically gets converted to radians angle in:

Code: [Select]

Also I'm not sure if I did something wrong but the compass rose rotation is backwards in this script. Maybe it's just LU or something. Or maybe documented positions wrong as it was weird when I tried learning everything
Code: [Select]
is backwards derp.. I obviously acknowledged that was weird and kept thinking derp during testing.

No Idea. Here Is GetAngle function:

Code: [Select]
function GetAngle(Point) {
  if (Point == "North") return 0;
  else if (Point == "West" ) return 90;
  else if (Point == "South") return 180;
  else if (Point == "East" )return 270;
  else if (Point == "NorthWest" ) return 50;
  else if (Point == "SouthEast" ) return 220;
  else if (Point == "SouthWest" ) return 140;
  else if (Point == "NorthEast" )return 310;

The next function is my main function. Point to Vector:

Code: [Select]
function PointToDirection(entity, Goto) {
  // Some array that gets each cord and sets the closest direction first, then second etc
  local MyCompass = [ 0, 1, 2, 3, 4, 5, 6, 7 ];
  local MyPoint = {};
  MyPoint.rawset(MyCompass[0] = GetDistance(Goto, Vector(entity.Pos.x, entity.Pos.y+4, entity.Pos.z)), "North" );
  MyPoint.rawset(MyCompass[1] = GetDistance(Goto, Vector(entity.Pos.x, entity.Pos.y-4, entity.Pos.z)), "South");
  MyPoint.rawset(MyCompass[2] = GetDistance(Goto, Vector(entity.Pos.x+4, entity.Pos.y, entity.Pos.z)), "East" );
  MyPoint.rawset(MyCompass[3] = GetDistance(Goto, Vector(entity.Pos.x-4, entity.Pos.y, entity.Pos.z)), "West");
  MyPoint.rawset(MyCompass[4] = GetDistance(Goto, Vector(entity.Pos.x+3, entity.Pos.y+3, entity.Pos.z)), "NorthEast");
  MyPoint.rawset(MyCompass[5] = GetDistance(Goto, Vector(entity.Pos.x+3, entity.Pos.y-3, entity.Pos.z)), "SouthEast");
  MyPoint.rawset(MyCompass[6] = GetDistance(Goto, Vector(entity.Pos.x-3, entity.Pos.y+3, entity.Pos.z)), "NorthWest");
  MyPoint.rawset(MyCompass[7] = GetDistance(Goto, Vector(entity.Pos.x-3, entity.Pos.y-3, entity.Pos.z)), "SouthWest");
  entity.Angle = GetAngle(MyPoint.rawget(MyCompass[0]))

I did my best to keep it short and lightweight on data.
I'm probably going to do some client scripting and add the compass rose at some point and attempt to rotate it based of angle change. I think it will teach me a few things derp
Scripting Discussion / Spawn a primitive NPC on the map. help me
« Last post by Bogdan_Timchenko on December 08, 2020, 07:02:54 pm »
Hi, I want to contact the experts in writing scripts for the unleashed liberty.
It is necessary to spawn the NPC on the map on certain cardinats with animations. Thanks
Spam / Re: Which gta character?
« Last post by Pranski on November 24, 2020, 04:12:47 pm »
i'll go with tommy, he's cool
General Chat / Re: Wazzup guys
« Last post by Esteemer , LLOLL , Andrics on November 12, 2020, 01:47:05 pm »
Oh god the cringe......
Liberty Unleashed Chat / Re: How many people still play LU
« Last post by Esteemer , LLOLL , Andrics on November 12, 2020, 01:32:22 pm »
Ahh motley it's been years , LU gave me so many friends and so many memories to cherish , I would love to come back someday. The only server I remember is lolmortuary and a troll server which had a cemetery with a skull icon which kills you if you go through it lol , I think that was "The Worst Server"  by Theremin. Just logged in for some nostalgia and this is the question I was looking for
Script Releases / Re: Ramp spawning
« Last post by synapse on November 04, 2020, 10:22:43 am »

How to use only vehBoost on keypress?
Script Releases / Re: Helicopters and Nukes!
« Last post by synapse on November 03, 2020, 11:26:47 pm »
reup possible?
General Chat / Re: WebNet-Official Hosting
« Last post by MEGA MIND on October 18, 2020, 01:48:03 pm »

Latest Updated Video
How to get a Host from Webnet Officail detailed version

Webnet Official Hosting is Back

Sorry for the long wait, Click here to get Game / Web hosting. Webnet Official host is now back with blazing fast speed and awsome pings, What are you waiting for hop in now

Get Now Webnet Official Host
Pages: 1 2 [3] 4 5 ... 10
© Liberty Unleashed Team.