diff --git a/game/PlaceLauncher.php b/game/PlaceLauncher.php index 1f100e8..e7870cf 100644 --- a/game/PlaceLauncher.php +++ b/game/PlaceLauncher.php @@ -176,23 +176,23 @@ function generateRandomString($length = 25) { --settings().Network.SendRate = 35 --settings().Network.PhysicsSend = 0 -- 1==RoundRobin game:GetService("Players").PlayerAdded:connect(function(player) - // if game.Players.NumPlayers ~= 0 then - // print(game:HttpGet("'. $https . $soapcfg['url'] . '/api/UpdatePlayerCount?accesstoken=" .. accesstoken .. "&playercount=" .. game.Players.NumPlayers)) - // print("Successfully Updated Player count for JobID: " . "' . $jobid . '") - // else - // print(game:HttpGet("'. $https . $soapcfg['url'] . '/api/CloseJob?accesstoken=" .. accesstoken)) - // print("Job ID: " .. "' . $jobid . '" .. " is closing due to no active players.") - // end + if game.Players.NumPlayers ~= 0 then + print(game:HttpGet(url .. "/api/UpdatePlayerCount?accesstoken=" .. accesstoken .. "&playercount=" .. game.Players.NumPlayers)) + print("Successfully Updated Player count for JobID: " . "' . $jobid . '") + else + print(loadfile(url .. "/api/CloseJob?accesstoken=" .. accesstoken)) + print("Job ID: " .. "' . $jobid . '" .. " is closing due to no active players.") + end print("Player " .. player.userId .. " added") end) game:GetService("Players").PlayerRemoving:connect(function(player) - // if game.Players.NumPlayers ~= 0 then - // print(game:HttpGet("'. $https . $soapcfg['url'] . '/api/UpdatePlayerCount?accesstoken=" .. accesstoken .. "&playercount=" .. game.Players.NumPlayers)) - // print("Successfully Updated Player count for JobID: " . "' . $jobid . '") - // else - // print(game:HttpGet("'. $https . $soapcfg['url'] . '/api/CloseJob?accesstoken=" .. accesstoken)) - // print("Job ID: " .. "' . $jobid . '" .. " is closing due to no active players.") - // end + if game.Players.NumPlayers ~= 0 then + print(loadfile(url .. "/api/UpdatePlayerCount?accesstoken=" .. accesstoken .. "&playercount=" .. game.Players.NumPlayers)) + print("Successfully Updated Player count for JobID: " . "' . $jobid . '") + else + print(loadfile(url .. "/api/CloseJob?accesstoken=" .. accesstoken)) + print("Job ID: " .. "' . $jobid . '" .. " is closing due to no active players.") + end print("Player " .. player.userId .. " leaving") end) if placeId~=nil and url~=nil then