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 .
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.
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) . 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
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.
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
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
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.