Fix bug where games wouldnt be named by their placeid
This commit is contained in:
parent
115a44d76f
commit
46b05a211f
|
|
@ -100,6 +100,8 @@ spawn(function()
|
||||||
while wait(60) do
|
while wait(60) do
|
||||||
if #game.Players:GetPlayers() == 0 then
|
if #game.Players:GetPlayers() == 0 then
|
||||||
pcall(function() game:HttpGet("https://kapish.fun/dielol/" .. placeId.."?key=" .. key) end)
|
pcall(function() game:HttpGet("https://kapish.fun/dielol/" .. placeId.."?key=" .. key) end)
|
||||||
|
else
|
||||||
|
pcall(function() game:HttpGet("https://kapish.fun/renewlol/" .. placeId.."?key=" .. key) end)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ app.get("/:id", async (request, response) => {
|
||||||
const job = new GameJob()
|
const job = new GameJob()
|
||||||
const result = await job.StartGame(request.params.id, request.query.port).catch((_) => _)
|
const result = await job.StartGame(request.params.id, request.query.port).catch((_) => _)
|
||||||
|
|
||||||
global.games.set(job.id, job)
|
global.games.set(request.params.id, job)
|
||||||
job.proc.once("exit", () => {
|
job.proc.once("exit", () => {
|
||||||
global.games.delete(job.id)
|
global.games.delete(request.params.id)
|
||||||
})
|
})
|
||||||
|
|
||||||
return response.json({ success: true })
|
return response.json({ success: true })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue