[Release] LiveMap

The resource would handle the socket data from the interface (where you would implement the bulk of the dispatcher logic). So, you would have to go into the C# code and handle the server-side of the logic there. Specifically, the SocketHandler file line 55 downwards.

You’d then have to recompile the DLL and upload to the server.

As for sending data from the interface, you would have to call the websockets function send to send data to the server. More information can be found here

What could be the problem here?

You’re not using the latest server version. Update it and it will work.

Can you please state the updated versions please.
2.2.9?

No that (2.2.9) is the latest version of this resource.

What havoc is talking about is the FXServer version.

1 Like

Thanks! Its working now!! Is there a way for me to use this [Release] Modified Street Names w/ Postal Numbers?

Since the latest update i have been unable to run two live maps off the same IP just different ports. i have two servers on the same ip address and i was always able to run them off the same ip just different sockports but its not been working i been getting this error.

Exception during executing Post callback: System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted.

  at System.Net.Sockets.Socket.Bind (System.Net.EndPoint localEP) [0x00043] in <7d13762c3f3046279fc4d30c52f6f595>:0
  at vtortola.WebSockets.Transports.Sockets.SocketListener..ctor (vtortola.WebSockets.Transports.Sockets.SocketTransport transport, System.Net.EndPoint[] endPointsToListen, System.Net.Sockets.ProtocolType protocolType, vtortola.WebSockets.WebSocketListenerOptions options) [0x000ba] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
  at vtortola.WebSockets.Transports.Tcp.TcpListener..ctor (vtortola.WebSockets.Transports.Tcp.TcpTransport transport, System.Net.EndPoint[] endPointsToListen, vtortola.WebSockets.WebSocketListenerOptions options) [0x00000] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
  at vtortola.WebSockets.Transports.Tcp.TcpTransport+<ListenAsync>d__39.MoveNext () [0x00157] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at vtortola.WebSockets.WebSocketListener+<StartAsync>d__22.MoveNext () [0x00363] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at Havoc.Live_Map.WebSocketServer+<Start>d__14.MoveNext () [0x0006e] in <f24e395ee07f432ebbebe727ba6c4c0f>:0
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
  at CitizenFX.Core.CitizenSynchronizationContext+<>c__DisplayClass1_0.<Post>b__0 () [0x00000] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\CitizenTaskScheduler.cs:20
  at CitizenFX.Core.CitizenSynchronizationContext.Tick () [0x0003e] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\CitizenTaskScheduler.cs:38

Are you changing the socket port? It doesn’t look like you are :confused:

1 Like

i have been changing it see here’s my cfgs

OK, so it could be that you already have something listening on those ports which, is why the error is occurring…

The only thing I can suggest is you keep changing the socket port until you find one that isn’t already bound. Maybe start at 31120 and increment them?

yeah, i had it as 30122 and 30123 so I changed it to make sure cause it was the 30122 that was doing it before now its the 30124 doing it to me. what kinda numbers can I use like for instance does it have to be above 3000 or can i use something such as 13 as a port

Pretty sure you can use any number. They may need to be between 1024-65535 (quick range I’ve found here).

alright thanks ill give it a try

so i did as you said to. i changed the port on the live map that was having a conflict. then it started working but not the one that was fine it was working just fine i didnt change it but now its not. so i stopped the one that was good and restarted the one that was bad and it began working.

I got the following error when i entered the command, “blips generate”, into the rcon.

You have to be in-game to use the command. This is because the only way to get the blips from the game is to use the game’s natives. Thus, you need to be in game (the server can’t run this code).

At some point I will do some more checks on the server to make sure that you can’t run this command in RCon.

1 Like

so I would do /blips generate???

Yes. Also, make sure that you have added yourself to the admin group in the CFG file so you have access to the command.

Which config? Sorry for all of the questions…

1 Like

The server.cfg file that you use when running the server (generally with the +exec server.cfg) that contains your start <resource> commands.

Near the bottom you will see a line that starts with “add_principal”, this is where you would put your identifier. It would look something like:

add_principal identifier.YOUR_ID_HERE group.admin # add the admin to the group

E.g.

add_principal identifier.ip:127.0.0.1 group.admin