Auto changing mapname

Hi,

I know you can change the mapname in the RCON by typing mapname . But is there a way to do it automaticaly at every restart ? I tried different things with no result :

  • Adding mapname test in the server.cfg
  • Adding mapname "test" in the server.cfg
  • Adding set mapname test in the server.cfg
  • Adding set mapname "test" in the server.cfg
  • Adding mapname test in the launch option

You have to wait for the resource fivem-map-hipster to load

server.lua :

Citizen.CreateThread(function()
	Citizen.Wait(5*1000)
	SetMapName("mapname")
end)
1 Like

Where do you enter that? Do you create a resource and reference it in the cfg?

if u are using esx just go [esx]/instance/server/main.lua

and put on the end of the code

Citizen.CreateThread(function()
	Citizen.Wait(5*1000)
	SetMapName("mapname")
end)

Citizen.CreateThread(function()
	Citizen.Wait(5*1000)
	SetGameType("gametype")
end)
2 Likes