Update PlaceLauncher.php
This commit is contained in:
parent
de91d56d4b
commit
139625f6ee
|
|
@ -105,11 +105,12 @@ function generateRandomString($length = 25) {
|
|||
} else if ($okbrahh == 0) {
|
||||
$accesstoken = generateRandomString(500);
|
||||
echo $accesstoken;
|
||||
$okaccesstoken = $con->prepare('INSERT INTO accesstokens (ip, accesstoken, placeid) VALUES (:ip, :accesstoken, :placeid)');
|
||||
$okaccesstoken = $con->prepare('INSERT INTO accesstokens (ip, accesstoken, placeid, jobid) VALUES (:ip, :accesstoken, :placeid, :jobid)');
|
||||
$okaccesstoken->bindParam(':ip', $AvailableGameservers[1]);
|
||||
$okaccesstoken->bindParam(':accesstoken', $accesstoken);
|
||||
$okaccesstoken->bindParam(':placeid', $placeid);
|
||||
$okaccesstoken->execute();
|
||||
$okaccesstoken->bindParam(':jobid', $jobid);
|
||||
$okaccesstoken->execute();
|
||||
$RCCServiceSoap = new Roblox\Grid\Rcc\RCCServiceSoap("192.168.1.129", 64989);
|
||||
$https = "https://";
|
||||
$script = 'print("Starting a new gameserver with JobID: " .. "' . $jobid . '" .. " and PlaceID: " .. "' . $placeid . '")
|
||||
|
|
@ -177,7 +178,7 @@ function generateRandomString($length = 25) {
|
|||
--settings().Network.PhysicsSend = 0 -- 1==RoundRobin
|
||||
game:GetService("Players").PlayerAdded:connect(function(player)
|
||||
if game.Players.NumPlayers ~= 0 then
|
||||
print(game:HttpGet(url .. "/api/UpdatePlayerCount?accesstoken=" .. accesstoken .. "&playercount=" .. game.Players.NumPlayers))
|
||||
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))
|
||||
|
|
@ -215,7 +216,7 @@ function generateRandomString($length = 25) {
|
|||
$result = $RCCServiceSoap->OpenJob($job, $funny);
|
||||
$sendthatjob = $con->prepare('INSERT INTO jobs (jobid, placeid, port, ip) VALUES (:jobid, :placeid, :port, :ip)');
|
||||
$sendthatjob->bindParam(':jobid', $jobid);
|
||||
$sendthatjob->bindParam(':placeid', $placeid); // another temporary thing since we don't have random token generator thing and token table
|
||||
$sendthatjob->bindParam(':placeid', $placeid);
|
||||
$sendthatjob->bindParam(':port', $port);
|
||||
$sendthatjob->bindParam(':ip', $AvailableGameservers[1]);
|
||||
$sendthatjob->execute();
|
||||
|
|
|
|||
Loading…
Reference in New Issue