Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


  Show Posts
Pages: [1] 2 3 ... 18
1  Liberty Unleashed / Liberty Unleashed Chat / Re: i have problem with lu on: December 03, 2021, 09:31:02 pm
Can you join the official LU discord at https://discord.gg/6TF8kDteeQ
I can get you to post screenshots of your game directory and get you up and running :)
2  Scripting / Script Snippets / Re: Aiming with Sniper Rifle (Script) on: October 13, 2021, 10:10:10 pm
Nice work. I intended to do this with other weapons as even the m16 will appear from shooting out of the mouth if the close up aim is enabled. Something triggers it never tested
3  Scripting / Script Snippets / Re: Hud radar control on: October 13, 2021, 10:06:19 pm
Version two
You can now check the status of the on screen related stuff in this version. Added functions for readability. Version one I automatically set the radar related stuff to true so I would know. This version has the ability to check the status since GetHUDItemEnabled doesn't exist.
You should still set the on screen items as you would prefer on load process as player could of reconnected with items half off while you want then on during join.

Also changed from checking/setting the status of bool to direct calling
Code: [Select]
class Player_Progress {

/*
    Used as a method to unlock stuff for a player
    But can be used for on/off methods
*/
    // Hud Related
    Radar = true;
    Clock = true;

    Money = true;
    Armour = true;
    Health = true;
    Weapon = true;
    Wanted = true;
    // Hud Related

//----------------------------------------------------------
    function Set_Radar(bool) {
       
      Radar = bool;
      ::SetHUDItemEnabled( ::HUD_RADAR, Radar)
    }
   
    function Get_Radar() {
      return Radar;
    }
//----------------------------------------------------------

    function Set_Armour(bool) {
       
      Armour = bool;
      ::SetHUDItemEnabled( ::HUD_ARMOUR, Armour)
    }

    function Get_Armour() {
      return Armour;
    }
//----------------------------------------------------------
    function Set_Health(bool) {
      Health = bool;
      ::SetHUDItemEnabled( ::HUD_HEALTH, Health)
    }

    function Get_Health() {
      return Health;
    }
//----------------------------------------------------------
    function Set_Money(bool) {
     
      Money = bool;
      ::SetHUDItemEnabled( ::HUD_MONEY, Money)
    }
    function Get_Money() {
      return Money;
    }
//----------------------------------------------------------
    function Set_Wanted(bool) {
       
      Wanted = bool;
      ::SetHUDItemEnabled( ::HUD_WANTED, Wanted)
    }
function Get_Wanted() {
      return Wanted;
}     
//----------------------------------------------------------
    function Set_Weapon(bool) {
       
      Weapon = bool;
      ::SetHUDItemEnabled( ::HUD_WEAPON, Weapon)
    }
    function Get_Weapon() {
      return Weapon;
    }     
//----------------------------------------------------------
    function Set_Clock(bool) {
       
      Clock = bool;
      ::SetHUDItemEnabled( ::HUD_CLOCK, Clock)
    }
    function Get_Clock() {
      return Clock;
    }     
}
4  Scripting / Script Snippets / Point to Vector on: December 31, 2020, 07: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]
Player.Angle
Derp..



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]
GetAngle(Point)
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");
 
  MyCompass.sort()
  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
5  Scripting / Script Releases / Re: Motley's base script on: July 04, 2019, 06:10:40 am
I managed to pick up this old base script some yesterday, I started a practical layout and assumed I would return to update it, and left most things as templates.

I will be updating the link above ::) soon, maybe by tomorrow if lucky.

I will get around to releasing a version after that with in game changes to what you can do. Not sure when that might get released

Script is on Server IP 18.215.109.187:2301

6  Liberty Unleashed / Liberty Unleashed Chat / Re: lets bring it back on: June 28, 2019, 02:22:31 am
I'm down if some old timers are interested in popping in, even if it's for a few.. I can't guarantee if I can stick around long, hard enough getting the time. We'll see 8)
7  Scripting / Script Snippets / Re: Return Island/District, Set positions etc.. on: March 05, 2019, 06:08:01 pm
Wrote this yesterday, All of these vectors can be found in the gta3.zon file. One of the districts returned the wrong Island. So I changed it.

Version 2:
Code: ("Client-side script") [Select]
// Island
/* X1, Y1, Z1, X2, Y2, Z2, Island */ //format
local Zones = [
[617.442, -958.347, 6.26083, 1065.44, -908.347, 206.261, 1],
[751.68, -1178.22, -13.8723, 1065.68, -958.725, 136.128, 1],
[944.208, -1149.81, -9.72576, 1016.14, -1076.01, 40.2742, 1],
[1065.88, -1251.55, -13.5049, 1501.88, -1069.93, 136.495, 1],
[1363.68, -1069.65, -18.8643, 1815.68, -613.646, 131.136, 1],
[1065.88, -1069.85, 1.49868, 1363.38, -742.054, 151.499, 1],
[745.421, -908.289, -21.203, 1065.42, -463.69, 129.593, 1],
[745.378, -463.616, -22.6676, 1065.38, -282.616, 147.332, 1],
[745.421, -282.4, -13.4117, 1065.42, -78.7699, 136.588, 1],
[1065.9, -512.324, -14.296, 1388.9, -78.324, 135.704, 1],
[745.979, -78.1778, -48.5832, 1388.98, 322.676, 101.417, 1],
[1389.37, -613.467, -29.883, 1797.6, 199.628, 120.117, 1],
[1066.1, -741.806, -34.2068, 1363.6, -512.806, 115.793, 1],
[1135.8, -695.021, 6.9661, 1182.36, -631.021, 56.9661, 1],
[1136.09, -609.976, 6.287, 1182.09, -521.167, 56.287, 1],
[617.151, -1329.72, -117.535, 1902.66, 434.115, 482.465, 1],
[1037.53, -907.274, 0.0, 1065.16, -637.689, 30.0069, 1],
[966.079, -637.366, 0.0, 1064.83, -609.557, 30.0789, 1],
[965.795, -608.99, 0.0, 995.306, -470.23, 30.9302, 1],
[995.59, -511.092, 0.0, 1065.11, -470.23, 30.0789, 1],
[1035.88, -463.56, 0.0, 1064.83, -282.86, 30.3627, 1],
[1036.15, -281.96, 0.0, 1064.85, -179.224, 30.6465, 1],
[-265.444, 161.113, -41.7094, -121.287, 367.043, 358.291, 1],
[1363.77, -613.339, -4.43849, 1389.17, -512.539, 70.4322, 1],

[444.768, -958.298, 30.7441, 614.878, -908.298, 180.744, 2],
[239.878, -411.617, 7.62939e-005, 614.322, -61.6167, 163.819, 2],
[-225.764, -412.604, -9.53674e-005, 116.236, 160.496, 120.271, 2],
[199.766, -1672.42, -61.7588, 577.766, -1059.93, 432.688, 2],
[-224.438, -1672.05, -61.3183, 199.562, -1004.45, 432.352, 2],
[200.107, -1059.19, -0.000144958, 615.107, -412.193, 198.864, 2],
[-121.567, -1003.07, -46.7463, 199.271, -413.068, 224.163, 2],
[117.268, -411.622, 0.000190735, 239.268, -61.6218, 166.36, 2],
[117.236, -61.1105, -17.071, 615.236, 268.889, 83.754, 2],
[-265.479, -1719.97, -114.769, 615.52, 367.265, 485.231, 2],
[-265.434, 79.0922, -45.8201, -226.334, 161.064, 354.18, 2],

[-1632.97, -1344.71, -45.9404, -468.629, -268.443, 254.696, 3],
[-811.835, -268.074, -45.8745, -371.041, 92.7263, 254.241, 3],
[-867.229, 93.3882, -50.1134, -266.914, 650.058, 250.426, 3],
[-1407.57, -267.966, -49.6792, -812.306, 92.7559, 250.437, 3],
[-1394.5, 93.4441, -46.7412, -867.52, 704.544, 253.344, 3],
[-1644.64, -1351.38, -117.0, -266.895, 1206.35, 483.0, 3],
[-1238.59, 306.841, -0.48605, -910.445, 504.646, 39.514, 3]
];

local Current_Island = 0;
local Current_District = "Liberty City"

NewTimer("AreaChecker", 1000, 0);
function AreaChecker() {
  local Player_Vector = FindLocalPlayer().Pos; 
  for (local idx=0;idx<42;idx++) {
    if ( ( Player_Vector.x >= Zones[idx][0] ) && ( Player_Vector.x <= Zones[idx][3] ) && ( Player_Vector.y >= Zones[idx][1] ) && ( Player_Vector.y <= Zones[idx][4] ) ) {
        if (Current_Island != Zones[idx][6]) {
            Current_Island = Zones[idx][6];
            BigMessage("" + Island(Zones[idx][6]), 8000, 1); 
        }
        if (Current_District != GetDistrictName(Player_Vector.x, Player_Vector.y)) {
            Current_District = GetDistrictName(Player_Vector.x, Player_Vector.y);
            BigMessage("" + GetDistrictName(Player_Vector.x, Player_Vector.y), 1000, 6); 
        }
    }
  }
}

// Island

// Added for testing
function onClientCommand ( Command, Input ) {
    if (Command == "island") Message(Current_Island.tostring())
    if (Command == "district") Message(Current_District.tostring())

    return 1;
}

I can add District ID's, as well my own District name return versus using GetDistrictName, but I feel like it's wasted time. You should find good uses of this script as well using it to manipulate player positions.
8  Liberty Unleashed / Liberty Unleashed Chat / Re: How many people still play LU on: January 24, 2019, 08:12:00 pm
The question is only out of curiosity, interested to see if anything happens to it as the topic grows in age.

The Gta era was a fun era overall. I've started using Squirrel as a place to practice Practical Programming in the past few days, but I'm not sure if I will do much more than that with it. Only been writing a ini parser directly inside of squirrel so far.

Maybe :|, I need a place to constantly test what I know as well don't know.


I'll consider checking it out sometime Stoku, I have to reinstall LU before I join your server :)
9  Liberty Unleashed / Liberty Unleashed Chat / How many people still play LU on: January 22, 2019, 09:06:34 pm
Just out of curiosity, How many people play LU?
10  Liberty Unleashed / Support / Re: Piracy! Download contains gta3.exe on: January 22, 2019, 09:04:04 pm
Confirmed in a vm that this post is about Piracy

Pokes finger at SugarD
11  Scripting / Script Snippets / Re: Inpoly [Command] on: September 09, 2018, 08:05:33 pm
Version two:

Code: [Select]
function onPlayerCommand( player, cmd, text )
{
    if (cmd == "cp" ) {
      if (text) {
        Create_Poly(player, text)
      }
    }
   
}
local x1_ = 0, y1_ = 0, x2_ = 0, y2_ = 0, x3_ = 0, y3_ = 0, x4_ = 0, y4_ = 0;

function Create_Poly(player, size) {

    x1_ = player.Pos.x, y1_ =  player.Pos.y, x2_ = player.Pos.x, y2_ = player.Pos.y, x3_ =  player.Pos.x, y3_ = player.Pos.y, x4_ =  player.Pos.x, y4_ =  player.Pos.y;
    size = size.tointeger()
    //North East
    x1_ += size;
    y1_ += size;

    // Display the positions on the radar
    CreateClientBlip(player, BLIP_NONE, Vector(x1_, y1_, -1));
   
    //South East
    x2_ += size;
    y2_ -= size;

    // Display the positions on the radar
    CreateClientBlip(player, BLIP_NONE, Vector(x2_, y2_, -1));

    // South West
    x3_ -= size;
    y3_ -= size;

    // Display the positions on the radar
    CreateClientBlip(player, BLIP_NONE, Vector(x3_, y3_, -1));

    // North West
    x4_ -= size;
    y4_ += size;

    // Display the positions on the radar
    CreateClientBlip(player, BLIP_NONE, Vector(x4_, y4_, -1));

    // Output the poly so it can be copied and pasted
    print("InPoly(player.Pos.x, player.Pos.y, "+x1_+", "+y1_+", "+x2_+", "+y2_+", "+x3_+", "+y3_+", "+x4_+", "+y4_+"); " );
}
12  Liberty Unleashed / LU Clans / Re: [TW] The Warriors on: August 16, 2018, 05:19:47 am
What VCMP servers do you play  ;D ??? :-X
13  Liberty Unleashed / Liberty Unleashed Chat / Re: Guess whos back on: March 24, 2018, 10:58:43 pm
You replying shows that you care ^_^.

As a member of the community, I want to thank you from all of us for staying active!!
Thank you  8)
14  Liberty Unleashed / Liberty Unleashed Chat / Re: Guess whos back on: March 24, 2018, 02:30:10 am
You never finished your sentence and posted a random link. Who are we talking about, and why did they leave?
15  Scripting / Script Help / Re: Does anyone have any money script? on: February 12, 2018, 04:01:25 am
Mr Damage is banned I think...
Pages: [1] 2 3 ... 18
© Liberty Unleashed Team.