forked from Simnation/Main
42 lines
901 B
Lua
42 lines
901 B
Lua
![]() |
local maps = {
|
||
|
"prompt_sandy_gasstation_carwash",
|
||
|
"prompt_sandy_church",
|
||
|
"sandy_shores_houses_pt1",
|
||
|
"prompt_sandy_train_station",
|
||
|
"prompt_sandy_beaches",
|
||
|
"cfx_chuz_sandy_shores_boat_house",
|
||
|
"prompt_sandy_sheriff",
|
||
|
"prompt_sandy_hospital",
|
||
|
"prompt_sandy_airfield"
|
||
|
}
|
||
|
|
||
|
local events = {}
|
||
|
|
||
|
CreateThread(function()
|
||
|
local exists = false
|
||
|
TriggerEvent("lyn-mapdata:exists", function(exists)
|
||
|
if exists then
|
||
|
exists = true
|
||
|
end
|
||
|
end)
|
||
|
|
||
|
if exists == true then
|
||
|
print("^6[Prompt]^1 Map data already exists. There must be only one mapdata installed!^0")
|
||
|
end
|
||
|
end)
|
||
|
|
||
|
RegisterNetEvent("lyn-mapdata:exists", function(cb)
|
||
|
cb(true)
|
||
|
end)
|
||
|
|
||
|
for i = 1, #maps do
|
||
|
local eventName = maps[i] .. ":mapDataExists"
|
||
|
if Debug == true then
|
||
|
print("Creating event: ", eventName)
|
||
|
end
|
||
|
local event = RegisterNetEvent(eventName, function(cb)
|
||
|
cb(true)
|
||
|
end)
|
||
|
table.insert(events, event)
|
||
|
end
|