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  Scripting / Script Releases / Code generating [Developer base] on: January 27, 2022, 03:46:40 pm
Some time ago I returned to LU in attempts to resurrect some LU related stuff and found a really old source in my email called Stories of liberty [S.O.L]. Back before the intended rewrite I was writing mission scripts manually. I knew this was hell and would take ages, testing in and out of game was no good and I knew what it needed and was really out of my ability at the time.

This base isn't finished. There is still a lot of work to get done. Inside consist of a 'Windows" folder. This folder has server and client of each. Server is where the mathmatics of creating the gui is stored, the client version is the functions to handle that gui. Mathmatics was stored serverside as in testing I can display client scripts in memory and minusing the mathmatics someone isn't really getting much other than static methods mostly. The base also has some mission related stuff. One is a code generator. It's hell and weird to work with and relies on being in game and knowing how the system generates squirrel scripts. The indenting for generating scripts is also bad and I never returned to fix it as there's more testing to do and proper programming to add until the good stuff like that can be focused on.

The source was never fine combed yet as it was a absolute demo test that wasn't ready yet for port. But could be if it was really desired.

In the developers log describes some todos that would fix the source. This source is for an experienced user, I don't really seeing someone bellow experienced or pro progressing the source sadly. Maybe I will get proved wrong... I even had a hard time with it at times.

This server had so many rewrites and revisions of code that I lost count. If you clean it up. Configure it right, Make it work good let me know. Would be cool to revisit it.

It's only being released as well abandoned as it took a turn for needing npc's and that wasn't intended or expected at all. There's no hacky method past creating bots like VCMP either as LU encrypts packets. I tried working around this and failed. Another user tried finding a hacky method and just about broke the server in the process. I also contacted VRocker on Irc and that was a failed attempt each time as I was left ghosted. Was hoping for the beta test regardless of what state it was in. Or if he could try adding a hacky method to add peds since LU already has a create actor method. As well introduce calling virtual keys for players to use on these bots. VKs would of worked well on normal players as well from mathing out making the player go to a specific angle, going through each weapon slot instantly to bypass the known ammo bug. Also mentioned Adtec on discord and was also ghosted.
Seems to be related to saying LU

https://www.youtube.com/watch?v=2rehIVYHK9U

Attempted to rush through each of the two missions for bandicam time.


So here it is..
Build: Demo Not for port

https://github.com/Motley90/S.O.L-Final-
2  Liberty Unleashed / Liberty Unleashed Chat / Re: i have problem with lu on: December 03, 2021, 08: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 :)
3  Scripting / Script Snippets / Re: Aiming with Sniper Rifle (Script) on: October 13, 2021, 09: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
4  Scripting / Script Snippets / Re: Hud radar control on: October 13, 2021, 09: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;
    }     
}
5  Scripting / Script Snippets / Point to Vector 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]
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
6  Scripting / Script Releases / Re: Motley's base script on: July 04, 2019, 05: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

7  Liberty Unleashed / Liberty Unleashed Chat / Re: lets bring it back on: June 28, 2019, 01: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)
8  Scripting / Script Snippets / Re: Return Island/District, Set positions etc.. on: March 05, 2019, 05: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.
9  Liberty Unleashed / Liberty Unleashed Chat / Re: How many people still play LU on: January 24, 2019, 07: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 :)
10  Liberty Unleashed / Liberty Unleashed Chat / How many people still play LU on: January 22, 2019, 08:06:34 pm
Just out of curiosity, How many people play LU?
11  Liberty Unleashed / Support / Re: Piracy! Download contains gta3.exe on: January 22, 2019, 08:04:04 pm
Confirmed in a vm that this post is about Piracy

Pokes finger at SugarD
12  Scripting / Script Snippets / Re: Inpoly [Command] on: September 09, 2018, 07: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_+"); " );
}
13  Liberty Unleashed / LU Clans / Re: [TW] The Warriors on: August 16, 2018, 04:19:47 am
What VCMP servers do you play  ;D ??? :-X
14  Liberty Unleashed / Liberty Unleashed Chat / Re: Guess whos back on: March 24, 2018, 09: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)
15  Liberty Unleashed / Liberty Unleashed Chat / Re: Guess whos back on: March 24, 2018, 01:30:10 am
You never finished your sentence and posted a random link. Who are we talking about, and why did they leave?
Pages: [1] 2 3 ... 18
© Liberty Unleashed Team.