[Release] LiveMap

NOTE: Make sure you’re using the latest FXServer. If not, you’re going to get errors.

So, a while back I said that I was working on a live map for FiveM (back when Ctizen.MP was still a thing). Well, I’ve been working on it and I think it’s ready for release :smiley:.

At the minute, the web interface is very basic.

Some servers running the map:
https://californiadojrp.com/livemap/
https://map.sosarp.net/
http://www.gtav.es/livemap/

This resource comes in two parts. There’s the “resource” (live_map) and the “interface” (live_map-interface).

Installing live_map

  • Download the latest version from here
  • Extract into it’s own folder (i.e. resources/live_map, can be wherever you like)
  • Configure the server.cfg file
  • Start the server

If you have successfully installed it, you should see the following in the console:

Installing live_map-interface

  • Download the latest version from here
  • Extract into your webserver (however you want to configure this, I suggest extracting into it’s own directory)
  • Rename config.example.json to config.json
  • Change the values inside config.json
  • Check it works :slight_smile:

Documentation

I’ve moved the documentation onto a website.
Interface - LiveMap interface - Havoc's Docs
Resource - LiveMap Resource (for FiveM) - Havoc's Docs

Edit: This is still WIP as it hasn’t been tested on a server will a high load (e.g. a lot of players and a lot of spectators).

Main Interface Control Modal
Main Interface (Desktop) Control Modal (Desktop)
Blip control modal Select Language
Blip control modal (Desktop) Language Select (Desktop)
Main Interface - Mobile Control Modal - Mobile
Main Interface (Mobile) Control Modal (Mobile)
Blip control modal - Mobile Select language - Mobile
Blip control modal (Mobile) Language Select (Mobile)
Player Information
Player information (example)
GIF of interface
GIF of the interface
77 Likes

I tested this before release, and I can safely say it works as intended and is a must-have resource for those that want to have a live map for their server. :smiley:

4 Likes

I too can agree with this, it updates very often. It also displays the vehicle the player is in and can be a very neat thing to have :smiley:

1 Like

Ah I remember you working on this a while ago.
Thanks for the release, looking real good!

2 Likes

Impressive, even Bootium rates it.

(but seriously, one of the best releases I’ve seen in a heck of a long time)

2 Likes

Looks amazing!!

One request if I may, Could you at some point add the map with street names and postal codes?

Or is this simply us going and popping in the images found a the below ling in place of the images in this threat?

( [Release] Modified Street Names w/ Postal Numbers )

1 Like

Sooo coool! Btw, can you make a login form for that?

1 Like

I’ve already thought about adding street names to the map, I’ve even created an issue for it (just don’t know how I want to add it, to the tiles themselves or just as another property attached to a player) :stuck_out_tongue:. As for the postal codes, to me it seems a bit cluttered and unnecessary.

That’s not something I’m going to do. If you want to add a login page yourself, feel free. If you don’t know anything about PHP, you could even password protect that page with .htaccess

4 Likes

Great work @Havoc I wanted to start on something like this but I’m in between like 50 projects and IRL. Plus i really didn’t know where to start. Awesome work m8.

i am receiving this error during start up

Error running system event handling function for resource live_map: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/json.lua:397: bad argument #1 to 'strfind' (string expected, got nil)
stack traceback:
        [C]: in function 'string.find'
        citizen:/scripting/lua/json.lua:397: in upvalue 'scanwhite'
        citizen:/scripting/lua/json.lua:553: in function <citizen:/scripting/lua/json.lua:551>
        (...tail calls...)
        server/update_check.lua:13: in local 'userCallback'
        citizen:/scripting/lua/scheduler.lua:260: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:163: in function <citizen:/scripting/lua/scheduler.lua:162>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:162: in function <citizen:/scripting/lua/scheduler.lua:131>

I can understand your thoughts behind that however, it is useful in role play scenarios as I’m sure you are aware. A possible solution could be a hover option. Hover over a section of the map and it tell you the closest postal code for that location.

And I would assume your reply to that is, “is it worth the effort” to which I reply… /shrug

Using it on our servers, Awesome, Works perfectly, 10/10,

1 Like

how do you get the blips.json

if @Havoc does respond good luck, otherwise I’ll ask my server dev tomorrow, i’ll let you know!

getting this error on start (on a linux server):

 Loaded live_map.net, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1314571693
Failed to instantiate instance of script Havoc.Live_Map.LiveMap: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeLoadException: Could not resolve type with token 01000037 (from typeref, class/assembly CitizenFX.Core.Native.API, CitizenFX.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null)
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
   --- End of inner exception stack trace ---
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
  at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
  at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
  at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
  at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
  at System.Activator.CreateInstance (System.Type type) [0x00000] in <d7e663f2f7cd4ab6929018ec5233f09d>:0 
  at CitizenFX.Core.InternalManager.CreateAssemblyInternal (System.Byte[] assemblyData, System.Byte[] symbolData) [0x0004f] in /src/code/client/clrcore/InternalManager.cs:80 
Started resource live_map
hitch warning: frame time of 325 milliseconds

Your seeing shit mate!

After running the command, you can stop the resource to save the file. Then you can edit it (if you know what you’re doing) and the changes will be present when it starts again.

Make sure you’re running the latest server artifact. I’ve got the resource running on a Debian server without any issues.

1 Like

Could you make sure you have the “versions.json” file and that it is readable.

1 Like

@Havoc could you explain this for me? What file can it not find? My web server is a separate server if that makes any difference.

Looks like "“mysql.net” is causing this error, not live_map. Please ask the developer of that plugin :slight_smile:

2 Likes