[Release] LiveMap

Would it be possible to make it to where it only displays police officers who are set as police with the esx_policejob? Also, how would I go about showing the actual names through ESX rather than the SteamID (if possible)?

1 Like

how do you get a webserver

@Havoc Would it be possible to add the ingame clock to the map?

Hi Jake. You can get one from Blizz Hosting for cheap. I won’t leave a link, because I don’t wanna get in trouble, but they have the best web hosting that I have ever had. If you want to message me, I can head you over there.

Hello, i seem to have a bit of a issue. The live map only connects on the server its hosted on it does not work anywhere else Please HELP

I’ve tried everything I can to try and get the web interface to work on my own. I don’t see any errors in the game console on startup and believe everything is good on that end. I am curious if my web server might be blocking the connections to the FiveM server. If that is the case, does anyone know what kind of steps I can take to try and troubleshoot that? Thanks!

Edit: So I ran the live map web interface on my local machine and I was able to get it to work just fine. Do you know if there is anything, maybe a firewall, that could be blocking my web page from seeing the game server? I tried contacting my support and they pretty much said not my problem.

did you add the ports your using for the live map the socket ports to your servers firewall?

Hey, thanks for the reply. After talking with my buddy who knows a little more about that stuff, I found the issue. My website had an SSL installed for the domain. Apparently the game server isn’t a secure connection and the website didn’t like that. After a little .htaccess magic I was able to get it resolved.

I’m still having trouble getting LiveMap to generate blips from my server

Might be a stupid question, but how to you add custom cars to be displayed on the map (instead of “Unknown Vehicle”")? I see reverse_location_hashes.lua, but would I just add them in there? If so, where would I find out the hashkey for the custom vehicle.

There’s a reverse_car_hashes.lua file for the cars.

To get the current cars hash you can use the command (when in the vehicle):

RegisterCommand("carhash", function(s,a,r)
    local vehicle = GetVehiclePedIsIn(PlayerPedId(), 0)

    local vehName = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
    local vehNameHash = GetHashKey(vehName)
    
    print("name='" .. vehName .. "', hash=".. vehNameHash)
end, false)

Then you can then add the vehicle by adding one of the lines to the reverse_car_hashes.lua file:

[tostring(GetHashKey("vehName")] = "Nice Name"
Or
["vehNameHash"] = "Nice Name"

Obviously replacing “vehName” with the name printed from the command and the “vehNameHash” from the command also.

Run the command in-game as an admin (set with aces in the config).

Thanks for the reply, I’ll give it a shot when I am back at my PC.

1 Like

I’m sorry, very new to figuring this stuff out (I can figure out a file once it’s finished). Do I need to create a resource that will actually make this command? If so, how would I go about doing that?


Sidenote: do you know why the F8 console just spits out the plate number like it’s going out of style?

You can just place it in the client.lua file (at the bottom).

Yea. There’s a print in the code that spits it out. If you download the latest version it should be gone.

unable to call a nil value, for the first line.

Looked at GitHub and it was wasy enough to remove that one line without downloading it again :smiley:

Ah. My bad. It should be PlayerPedId() not PlayerId() :blush:

1 Like

Still get the same error, however I learned that in the vehicles.meta file the map seems to pull whatever is in the section. So, that fixes that I guess (unless you want to keep trying for that command :wink: )

Turns out my fat finger press “m” instead of “n” for “command” :man_facepalming: Should work now…

This is why you shouldn’t write code on a phone guys :frowning:

Man, i give you credit for doing that on your phone! If I didn’t just finish an overnight shift i probably would’ve caught that. Thanks so much for the help, love the map. :smiley:

Anyone have an idea why I am getting this?