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 [4] 5 6 ... 18
46  Scripting / Script Help / Re: Need help checking time on: December 04, 2016, 06:45:32 pm
Could you possibly provide what you're working with so far? And or private message me the code? I'll take a look at it after work  :)
47  Scripting / Script Help / Re: Need help checking time on: December 03, 2016, 03:02:39 am
Do you think that it's because I am not using any-type of time-lock? I went in-game and did some checking out and my minutes are moving in seconds, and hours by minutes
48  Scripting / Script Help / Re: Need help checking time on: December 03, 2016, 02:41:36 am
I could never return hours and minutes by default, This function ran this print by default as well , Do you mind running this code and watching the console  :), I would love to be proven wrong.
49  Scripting / Script Help / Re: Need help checking time on: December 03, 2016, 02:15:10 am
This is my very first time using that function. I have other methods.


But Theremin, Did someone do the wiki wrong for that page?? I did a shit load of testing on that function until I grew lazy and bored.

Hear is the real output of that function.
unless I some how fucked up

Code: [Select]
Minute <- 0;
Hour <- 0;
Second <- 0;

function onTimeChange( Min, Sec )
{

    Minute = Min;
    Second = Sec;

    // Now lets create the Hour check
    if ( Minute == 60 )
    {
        // Increase the hour
        Hour++;
    }

     print("Hour: " + Hour + " Minute: " + Minute + " Second: " + Second);

     return true;
}
50  Liberty Unleashed / Liberty Unleashed Chat / Re: bad update on: December 02, 2016, 12:48:34 am
In the past around 2006 I believe and a little before then it really seemed to be Vrockers dream to be capable of updating GTA III MTA. 

He was still learning coding at that time. My memory is not that great as that was [Over a Decade Ago],

But As you see Vrocker gained his own GTA III MP, I did hear word that Vrocker took a look at MTA's source code in attempts to help with a update “Finnaly after many request", From what I also recall the source code to MTA is junked,,..

I also read that Vrockers source code for LU is very clean, I wish Vrocker could re gain the desire to come back and update this multiplayer. That's what I have been waiting for, One day there is going to be an individual that will probably want to update this multiplayer like Vrocker wanted to do to MTA GTA III.

I would love to see that, But at the same time, This multiplayer has died, There is no player base, While LU has many capabilities, As you go one in building your server you will come along many broken scripting issues.

So it's really hard to attract a crowd on you-tube. Or any other social media..


I really hope that Vrocker can find the desire again like he had over a decade, All this multiplayer needs is two very nice updates..

 
51  Scripting / Script Help / Re: player.Angle returns wrong angle sometimes on: November 30, 2016, 03:10:40 am
EDITED AT The bottom

Maybe this is true,.,,

My current saved position is

[954.9, -833.8, 14.79, 152.0],

When I type save again on that spawned location I return this

[954.8, -833.8, 14.79, 2.50448e-006]

Weird...

My cmd

Code: [Select]
  if ( cmd == "save" )
  {
    MessagePlayer("[" + player.Pos.x + ", " + player.Pos.y + ", " + player.Pos.z + ", " + player.Angle + "],", player, PURPLE );
    print( "[" + player.Pos.x + ", " + player.Pos.y + ", " + player.Pos.z + ", " + player.Angle + "],")
  }

I tried that patch and it does not work.... I also can not manually change a players angle unless I do a over-top view of the player, Odd..

It's official when setting player.Angle it never calls for a update unless you use a over top view. Even The LoacationSaver script by force did this...

Also adding:

When setting a camera matrix in attempts to bypass this with a possibility of a really cool spawn

Code: [Select]
SetCameraMatrix( player, Vector( player.Pos.x, player.Pos.y + 3.42, player.Pos.z ), Vector( player.Pos.x, player.Pos.y, player.Pos.z ) );
player.Frozen = true;
SetCinematicBorder( true );

You can now manually set the angle.

Now th bad part.

Code: [Select]
  if ( cmd == "restore" )
  {
     RestoreCamera( player );
     SetCinematicBorder( false );
     player.Frozen = false;
  }

player.Angle is set to 270 regardless, WTF! why 270??

Maybe someone could help me bypass this and find a fix?
52  Scripting / Script Help / player.Angle returns wrong angle sometimes on: November 24, 2016, 09:30:28 pm
I modified a command of mine to save locations, But for some reason player.Angle was set for the wrong angle.

I do not see anything wrong with the anlge, But why it returned a different angle surprises me,

 ??? Maybe it is because I used turret left and right key as well the mouse for perfected angle rather than walking and moving normally to where I want the angle to be?

I am using ini instead of print as I prefer to do this differently.
Code: [Select]
Count <- 0;
function onPlayerCommand( player, cmd, text ) {


   if ( cmd == "savepos" )
   {

       WriteIniFloat( "Locations.ini", GetDistrictName(player.Pos.x, player.Pos.y) + Count, "X", player.Pos.x );
       WriteIniFloat( "Locations.ini", GetDistrictName(player.Pos.x, player.Pos.y) + Count, "Y", player.Pos.y );
       WriteIniFloat( "Locations.ini", GetDistrictName(player.Pos.x, player.Pos.y) + Count, "Z", player.Pos.z );
       WriteIniFloat( "Locations.ini", GetDistrictName(player.Pos.x, player.Pos.y) + Count, "Angle", player.Angle );
 
       MessagePlayer( "Saved location " + GetDistrictName(player.Pos.x, player.Pos.y) + Count, player, Colour( 225, 225, 225 ) );
       Count++;

     return true;
  }

If you see anything wrong in my message or command please let me know  :)
53  Scripting / Script Snippets / Re: Return Island/District, Set positions etc.. on: November 24, 2016, 04:53:42 pm
Your welcome  :)
54  Scripting / Script Snippets / Return Island/District, Set positions etc.. on: November 24, 2016, 04:18:42 pm
This is something I have been working on for a game system I have been building.

I plan to use this differently, But I figured I should upload it while it's still in a debug state.

You can really do a lot with this script, From setting random spawns in the players district to maybe setting hospital positions for that players Island, Good for roleplay servers, To much more.

I hope someone finds use of this script. I see many ideas from this and I hope your able to do something with it  ;).

Please notify me if there are any bugs, Only bugs I have seen is district names are named differently, GetDistrictName does not always return the same text as story mode example the airport..


#Code Updated
Code: [Select]
District_ID <- array(120, 0);
District_Name <- array(120, "");

function SetPlayersDistrict(Name, player)
{
    switch(Name)
    {
        /* Portland */
        case "Harwood":                                return District_ID[player.ID] = 1;
        case "Portland Beach":                         return District_ID[player.ID] = 2;
        case "Hepburn Heights":                        return District_ID[player.ID] = 3;
        case "Saint Marks":                            return District_ID[player.ID] = 4;
        case "Red Light District":                     return District_ID[player.ID] = 5;
        case "Chinatown":                              return District_ID[player.ID] = 6;
        case "Portland View":                          return District_ID[player.ID] = 7;
        case "Trenton":                                return District_ID[player.ID] = 8;
        case "Portland Harbor":                        return District_ID[player.ID] = 9;
        case "Atlantic Quays":                         return District_ID[player.ID] = 10;
        case "Callahan Point":                         return District_ID[player.ID] = 11;

        /* To Staunton Island */
        case "Callahan Bridge":                        return District_ID[player.ID] = 12;


        case "Torrington":                             return District_ID[player.ID] = 13;
        case "Bedford Point":                          return District_ID[player.ID] = 14;
        case "Belleville Park":                        return District_ID[player.ID] = 15;
        case "Liberty Campus":                         return District_ID[player.ID] = 16;
        case "Fort Staunton":                          return District_ID[player.ID] = 17;
        case "Rockford":                               return District_ID[player.ID] = 18;
        case "Aspatria":                               return District_ID[player.ID] = 19;

        /* To Shoreside Island */
        case "Francis International Airport":          return District_ID[player.ID] = 20;
        case "Pike Creek":                             return District_ID[player.ID] = 21;
        case "Wichita Gardens":                        return District_ID[player.ID] = 22;
        case "Cedar Grove":                            return District_ID[player.ID] = 23;
        case "Cochrane Dam":                           return District_ID[player.ID] = 24;

        /* Typically in the ocean */
        case "Liberty City":                           return District_ID[player.ID] = 25;
        case "Portland":                               return District_ID[player.ID] = 26;
        case "Staunton Island":                        return District_ID[player.ID] = 27;
        default:                                       return District_ID[player.ID] = 0;
}
}

function onPlayerDeath(player, reason)
{
    District_Name[player.ID] = GetDistrictName(player.Pos.x, player.Pos.y);
   
    SetPlayersDistrict(District_Name[player.ID], player); //Do not remove player, LOL..
}

function onPlayerSpawn(player, spawn)
{
    if ( ( District_ID[player.ID] >= 1 ) && ( District_ID[player.ID] <= 12 ) && (player.Island == 1) )
    {
        Message("Portland Island")
    }

    if ( ( District_ID[player.ID] >= 12 ) && ( District_ID[player.ID] <= 19 ) && (player.Island == 2) )
    {
        Message("Staunton Island")
    }

    if ( ( District_ID[player.ID] >= 20 ) && ( District_ID[player.ID] <= 24 ) && (player.Island == 3) )
    {
        Message("Shoreside Island")
    }

    if ( ( District_ID[player.ID] >= 25 ) && ( District_ID[player.ID] <= 27 ))
    {
         if (player.Island == 1 ) Message("Portland Island/ Lost island")
         if (player.Island == 2 ) Message("Staunton Island/ Lost island")
         if (player.Island == 3 ) Message("Shoreside Island/ Lost island")

    }
}

function onPlayerPart(player, reason)
{
    District_ID[player.ID] = 0;
    District_Name[player.ID] = "";
}
55  Liberty Unleashed / Suggestions / CreateClientObject( player, Vector(X, Y, Z), Angle ); on: November 21, 2016, 03:06:38 pm
I feel That objects should be moved to client scripting, There is so many reasons, I will only list the best reasons,

Objects could be installed onScriptLoad() Client side.
*Regardless of the /reconnect bug, This would be the ultimate patch.

Better missions could be scripted like the export missions. You could manually add the red line when a player does a export.

This would become very helpful when custom objects are added, You could easily have a lot more objects in the players world for housing in apartments or whatever your desire is.

Recreating custom race tracks, While having many custom objects in a players world It would be most efficient to be able to add and remove these objects client side.

Want more reasons just ask and I will tell you why  ;)
56  Scripting / Script Help / Re: CreateVehicle on: November 16, 2016, 03:44:58 am
Hey Kevin, Welcome back to LU  :).

I just want to add in the server package there is a vehicle command already there  ;)

I hope this is helpful. If you only want that one vehicle I can script it for you  :), Just reply back with what you want.
Code: [Select]
function onPlayerCommand( pPlayer, szCmd, szParams )
{
if ( szCmd == "mypos" )
{
local v = pPlayer.Pos;
Message( pPlayer.Name + " is currently at " + v.x + ", " + v.y + ", " + v.z );
}

else if ( szCmd == "spawncar" )
{
if ( szParams )
{
local pTemp = split( szParams, " " ), ID = 90;
if ( IsNum( pTemp[ 0 ] ) ) ID = pTemp[ 0 ].tointeger();

if ( ( ID >= 90 ) && ( ID <= 150 ) )
{
local v = pPlayer.Pos;
MessagePlayer( "Spawning a vehicle with model ID " + ID + "...", pPlayer );
CreateVehicle( ID, Vector( v.x + 5, v.y, v.z ), pPlayer.Angle );
}
}
}

else if ( szCmd == "health" )
{
if ( !szParams ) MessagePlayer( "Your Health: " + pPlayer.Health, pPlayer );
else
{
local pTemp = split( szParams, " " ), p = GetPlayer( pTemp[ 0 ] );
if ( p )
{
if ( p.Spawned ) MessagePlayer( pPlayer.Name + "'s Health: " + p.Health, pPlayer );
else MessagePlayer( "This person isn't spawned nub!", pPlayer );
}
else MessagePlayer( "Can't find anyone with that id/nick", pPlayer );
}
}

else if ( szCmd == "armour" )
{
if ( !szParams ) MessagePlayer( "Your Armour: " + pPlayer.Armour, pPlayer );
else
{
local pTemp = split( szParams, " " ), p = GetPlayer( pTemp[ 0 ] );
if ( p )
{
if ( p.Spawned ) MessagePlayer( pPlayer.Name + "'s Armour: " + p.Armour, pPlayer );
else MessagePlayer( "This person isn't spawned nub!", pPlayer );
}
else MessagePlayer( "Can't find anyone with that id/nick", pPlayer );
}
}

else if ( szCmd == "goto" )
{
if ( !szParams ) MessagePlayer( "Error - Need to specify a target player.", pPlayer );
else
{
local pTemp = split( szParams, " " ), p = GetPlayer( pTemp[ 0 ] );
if ( p )
{
if ( p.Spawned )
{
Message( "Taking " + pPlayer.Name + " to " + p.Name, Colour( 0, 255, 0 ) );
pPlayer.Pos = p.Pos;
pPlayer.Pos.y += 5;
pPlayer.Pos.z += 2;
}
else MessagePlayer( "This person isn't spawned nub!", pPlayer );
}
else MessagePlayer( "Can't find anyone with that id/nick", pPlayer );
}
}

else if ( szCmd == "bring" )
{
if ( !szParams ) MessagePlayer( "Error - Need to specify a target player.", pPlayer );
else
{
local pTemp = split( szParams, " " ), p = GetPlayer( pTemp[ 0 ] );
if ( p )
{
if ( p.Spawned )
{
Message( "Taking " + p.Name + " to " + pPlayer.Name, Colour( 0, 255, 0 ) );
p.Pos = pPlayer.Pos;
p.Pos.y += 5;
p.Pos.z += 2;
}
else MessagePlayer( "This person isn't spawned nub!", pPlayer );
}
else MessagePlayer( "Can't find anyone with that id/nick", pPlayer );
}
}

return 1;
}

function GetPlayer( target )
{
target = target.tostring();

if ( IsNum( target ) )
{
target = target.tointeger();

if ( FindPlayer( target ) ) return FindPlayer( target );
else return null;
}
else if ( FindPlayer( target ) ) return FindPlayer( target );
else return null;
}

57  Liberty Unleashed / Suggestions / Re: [Request] onWheelShot( player, oldWheelHealth, newWheelHealth, damage) on: November 16, 2016, 01:59:20 am
NICE!!

So I am beginning to think that onClientVehicleShot

If a new parameter was added for BodyPart/VehiclePart to detect where bullets hit then we could possibly make something happen for onClientVehicleShot to blow out a players tire.

*Then maybe in the future when we can add custom weapons we could even add the police spike strip from vice city

So do you and or s19 think that adding a detection on the vehicles body parts would help?

Example:

Code: [Select]
onClientVehicleShot( vehicle, player, weapon, carpart )
even if each part returns 1 2 3 4 5 6 7 8 9 etc it is whatever it can be played with.

I think it's awesome that Molotovs ,Flamethrower, Grenades and RPGs are detected
58  Liberty Unleashed / Suggestions / Re: [Request] onWheelShot( player, oldWheelHealth, newWheelHealth, damage) on: November 14, 2016, 07:26:12 pm
Nice find. I didn't know onClientVehicleShot existed.

I might try shooting through windshields soon.

Nice find and addition in general  :)
59  Liberty Unleashed / Suggestions / [Request] onWheelShot( player, oldWheelHealth, newWheelHealth, damage) on: November 14, 2016, 05:22:13 pm
Since reading more of the wiki, I noticed

http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Functions/Vehicles/SetWheelStatus

because of WHEELSTATUS_FUCKED, And I laughed indeed, Also spit up some of my energy drink...

I think it would be freaking cool if its possible to add a onshoot for tires, This way the game engine would come to life more, as well this is a multiplayer.

I would love to hear a response from developers
60  Scripting / Script Snippets / Re: Inpoly [Command] on: November 14, 2016, 04:56:56 pm
Thats really interesting too, Something really told me to use inpoly.

I'm happy I did, Also happy due to that command,

Any other method for creating a poly like printing Pos.x, Pos.y multiple times is a nightmare

This way if used correctly you have something going on, I thought about adding a command to alter the players distance to forward, This way you could have stronger polys by having the exact distance and angle but,  ::) laziness  :D..
Pages: 1 2 3 [4] 5 6 ... 18
© Liberty Unleashed Team.