Liberty Unleashed

Liberty Unleashed => Liberty Unleashed Chat => Topic started by: ian727 on November 01, 2013, 05:53:57 pm

Title: Some newbie questions..
Post by: ian727 on November 01, 2013, 05:53:57 pm
Hey guys,

I discovered Liberty Unleashed a few days ago and I must say.. Great Work! Really!

Today I was playing with some friends via the LAN network, and it was great fun! In addition, all of us were using the RealGTA3 mod.

There's only one thing that could be improved: There are some weapons that can't be found on the normal map and also some locations where you need to run for hours to find a car  :D

So, of course I want to place that stuff - cars and pickups (weapons) - by myself. I already know that this simple stuff is saved in the "content.xml". I also had a look on the ID codes in the wiki, so there is only one problem remaining: How can I get the x, y and z coordinates for the point where I want to place a car/pickup?

I had a look on some threads here, and there was a script called "LocationSaver" recommended. But it didn't get how to work with that.. I mean, it's just a new "Main.nut" that gets loaded - but I can't spot any difference except from having only one skin that can be chosen.

So my quetion is.. Is there another way to get the coordinates? Just the coordintes!  :D I don't think that I need more than them^^

Thanks for any help!

Ian
Title: Re: Some newbie questions..
Post by: sasha19323 on November 01, 2013, 07:05:02 pm
Yea, sure, here's this script: http://forum.liberty-unleashed.co.uk/index.php/topic,391.0.html (http://forum.liberty-unleashed.co.uk/index.php/topic,391.0.html)
Title: Re: Some newbie questions..
Post by: Stoku on November 01, 2013, 07:07:02 pm
Try /mypos, should work by default :)
Title: Re: Some newbie questions..
Post by: ian727 on November 01, 2013, 07:16:36 pm
Thanks for your answers!

Yea, sure, here's this script: [url]http://forum.liberty-unleashed.co.uk/index.php/topic,391.0.html[/url] ([url]http://forum.liberty-unleashed.co.uk/index.php/topic,391.0.html[/url])


Haha thanks, but I already downloaded it   ;) As I described in my very first thread, I didn't get how to use this tool..

...I had a look on some threads here, and there was a script called "LocationSaver" recommended. But I didn't get how to work with that.. I mean, it's just a new "Main.nut" that gets loaded - but I can't spot any difference except from having only one skin that can be chosen...


Try /mypos, should work by default :)


Okay, thanks - but would you tell me where and when I have to give that comment?

Thanks again  :)
Title: Re: Some newbie questions..
Post by: Stoku on November 01, 2013, 07:20:41 pm
Just type "/mypos" in the chatbox and press enter.

Oh and try "/spawncar 130", it'll spawn a vehicle near to you. You can try other ID's instead od 130.
Title: Re: Some newbie questions..
Post by: ian727 on November 01, 2013, 09:23:48 pm
Jawoll!  :D

Thank you! Everything works fine!
Title: Re: Some newbie questions..
Post by: ian727 on February 03, 2014, 02:13:00 pm
Hej,

I got some more questions  :) I hope it isnt difficult to answer them..

I think I mentioned above, I am playing Liberty Unleashed with the "RealGTAIII" mod. Everything works really fine and we are having a lot of fun  :D

I was just wondering about these 2 questions..

The author of the RealGTA3 mod has added some more vehicles to the game - He also replaced all the other ones, but added some extra as well. Obviously, they do not appear in Liberty Unleashed. I wonder if they have a certain SpawncarID? The numbers from 90 to 150 "only" spawn the replaced vehicles. Is there a way to tell Liberty Unleashed about the new vehicles?  ;)

And 2nd: The Realmod uses different, well, extra colors, too. That makes some cars only appear in white, no matte what color you give them. How can I tell Liberty Unleashed to use the new colors as well?

Thanks for any help,

Ian
Title: Re: Some newbie questions..
Post by: Shadow. on February 03, 2014, 03:05:31 pm
Hej,

I got some more questions  :) I hope it isnt difficult to answer them..

I think I mentioned above, I am playing Liberty Unleashed with the "RealGTAIII" mod. Everything works really fine and we are having a lot of fun  :D

I was just wondering about these 2 questions..

The author of the RealGTA3 mod has added some more vehicles to the game - He also replaced all the other ones, but added some extra as well. Obviously, they do not appear in Liberty Unleashed. I wonder if they have a certain SpawncarID? The numbers from 90 to 150 "only" spawn the replaced vehicles. Is there a way to tell Liberty Unleashed about the new vehicles?  ;)

And 2nd: The Realmod uses different, well, extra colors, too. That makes some cars only appear in white, no matte what color you give them. How can I tell Liberty Unleashed to use the new colors as well?

Thanks for any help,

Ian

About the first one, I don't think you can, because the cars are in your game, not in the server. Not sure.

About the second one: You could experience with Vehicle.Colour1 or Vehicle.Colour2, there are more examples on the wiki. Sure you'd need the vehicle instance before you start with these commands in the first place. If you know the ID, just do FindVehicle(id).Colour1 = 3; (example)
Title: Re: Some newbie questions..
Post by: ian727 on February 03, 2014, 03:56:13 pm
Thanks for your answer!

I am hosting the Server - And it uses actually everything I see in singleplayer, since I copied the whole "Data" folder into the "LUServer\LU" folder  :)

You said the cars were in my game, not in the Server.. Maybe they aren't saved in that data folder I copied?

And.. I'm sorry to tell you that I absolutely have no knowledge about scripting, squirrel or whatever is used there, I dont know where to put these textfiles, not how to install them, not how to use them in the game  ;D (I'm looking forward to find a getting started tutorial on this though)

To the second one: I found out that GTA loads these colors out of the "carcols.dat" file - You can clearly see the added colors there. I may quote:

190,0,0            # 95 shinyred         red
250,120,0         # 96 shinyorange      orange
250,180,0            # 97 prettyyellow      yellow
10,40,92         # 98 prettyblue         blue
15,55,44              # 99 elegantgreen      green
255,235,70         # 100 shinyyellow      yellow


The server knows about that file, it is in the "data" folder I mentioned before. But it doesnt seem to correctly read the file, something else might be missing. But I have no idea what^^
Title: Re: Some newbie questions..
Post by: Shadow. on February 04, 2014, 12:34:53 pm
Each car needs a .dff file, one .txd file and one .col file (first 2 being stored in gta3.img).

Therefore, your data folder is useless without these two.


About your colour issue, you can set the colours manually with this function (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Functions/Vehicles/RGBColour1) and this one (http://liberty-unleashed.co.uk/LUWiki/Squirrel/Server/Functions/Vehicles/RGBColour2)

So for the "prettyblue", you'd set Vehicle.RGBColour1 = Colour( 10, 40, 92 );
Title: Re: Some newbie questions..
Post by: SugarD on February 06, 2014, 03:01:12 pm
Also keep in mind that more than just items in your data folder get modded with that game mod, much of which LU doesn't currently support. There have also been plans of *possibly* supporting custom vehicles being spawned in the future, so this may change in another version. Right now it cannot be done, though.
Title: Re: Some newbie questions..
Post by: ian727 on February 06, 2014, 04:58:34 pm
Huh.. okay. I tried to built in that script.

I copied the text from the WIKI article, Example 2 of course. Then I replaced the given color numbers with the one you posted and that can be found in the carcols.dat file as well.

So, I created a new text-file and pasted the whole text in it. Then I added a few "tabs" like it is done is the other scripts  ;D I have no idea if thats necessary.

The whole thing got saved as "test2.nut" then, in the "LUServer\Scripts\Main" folder. I also placed an entry in the "Script.xml" file..

But - what now? As far as I understood, something should happen if I type "rgb2" into the chat. I tried this while sitting in a car.. But nothing happened   :D

Is my way correct? Should it be working? What do I need to do to see results? It can't be that difficult ;)
Title: Re: Some newbie questions..
Post by: SugarD on February 06, 2014, 05:29:16 pm
Huh.. okay. I tried to built in that script.

I copied the text from the WIKI article, Example 2 of course. Then I replaced the given color numbers with the one you posted and that can be found in the carcols.dat file as well.

So, I created a new text-file and pasted the whole text in it. Then I added a few "tabs" like it is done is the other scripts  ;D I have no idea if thats necessary.

The whole thing got saved as "test2.nut" then, in the "LUServer\Scripts\Main" folder. I also placed an entry in the "Script.xml" file..

But - what now? As far as I understood, something should happen if I type "rgb2" into the chat. I tried this while sitting in a car.. But nothing happened   :D

Is my way correct? Should it be working? What do I need to do to see results? It can't be that difficult ;)
Did you type "rgb2" or "/rgb2"? ;)
Title: Re: Some newbie questions..
Post by: ian727 on February 06, 2014, 05:40:15 pm
Hehe, no, I did that correctly. With the slash. Not as a message  ;)
Title: Re: Some newbie questions..
Post by: Shadow. on February 06, 2014, 08:54:29 pm
Can you paste the entire file here ? So we can get a clear idea of what you're doing ?
Title: Re: Some newbie questions..
Post by: ian727 on February 08, 2014, 11:44:25 am
function onPlayerCommand( pPlayer, szCommand, szText )
{
   if ( szCommand == "rgb2" )
   {
      if ( pPlayer.Vehicle ) pPlayer.Vehicle.RGBColour1 = Colour( 10, 40, 92 );
   }
return 1;
}


Thats the file's content^^
Title: Re: Some newbie questions..
Post by: SugarD on February 10, 2014, 04:03:17 pm
function onPlayerCommand( pPlayer, szCommand, szText )
{
   if ( szCommand == "rgb2" )
   {
      if ( pPlayer.Vehicle ) pPlayer.Vehicle.RGBColour1 = Colour( 10, 40, 92 );
   }
return 1;
}


Thats the file's content^^
My Squirrel is very rusty, but it looks like you're telling the command to expect text after the command itself is sent, which you don't need because you are already specifying the color input automatically.

Try removing ", szText" and see what happens.
Title: Re: Some newbie questions..
Post by: Mido_Pop on February 10, 2014, 05:28:47 pm
<>
Code: [Select]
function onPlayerCommand( plr, cmd, text )
{
   if ( cmd == "c1" )
   {
      if ( plr.Vehicle )
       {
            local r = GetTok( text, " ", 1 ).tointeger(), g = GetTok( text, " ", 2 ).tointeger(), b = GetTok( text, " ", 3 ).tointeger();
    plr.Vehicle.RGBColour1 = Colour( r, g, b );
       }
       
       else
       {
          MessagePlayer( "[#00ff00]*Server* [#ff0000]You are not in a vehicle", plr );
       }
   }

   if ( cmd == "c2" )
   {
      if ( plr.Vehicle )
       {
            local r = GetTok( text, " ", 1 ).tointeger(), g = GetTok( text, " ", 2 ).tointeger(), b = GetTok( text, " ", 3 ).tointeger();
    plr.Vehicle.RGBColour2 = Colour( r, g, b );
       }
       
       else
       {
          MessagePlayer( "[#00ff00]*Server* [#ff0000]You are not in a vehicle", plr );
       }
   }
     
   return 1;
}



Title: Re: Some newbie questions..
Post by: ian727 on February 12, 2014, 07:20:03 pm
Thank you very much, but what exactly do I have to type now while running the game? I also think that I need to replace some spaces in your script, I already added the numbers instead of the letters r, g, b - Is that correct?
Title: Re: Some newbie questions..
Post by: Mido_Pop on February 12, 2014, 09:15:26 pm
You Shouldn't Do any thing on this script.
You should Type on the game >> EX: /c2 255 255 255