This commit is contained in:
Anonymous275 2020-04-10 21:53:08 +03:00
parent 7410625fce
commit e60790e185

View File

@ -18,10 +18,11 @@ void Heartbeat()
{ {
string UUID = HTTP_REQUEST("https://beamng-mp.com/new-server-startup",443); string UUID = HTTP_REQUEST("https://beamng-mp.com/new-server-startup",443);
std::cout << "UUID GEN : " << UUID << std::endl; std::cout << "UUID GEN : " << UUID << std::endl;
std::string State = Private ? "true" : "false";
while(true) while(true)
{ {
PostHTTP("https://beamng-mp.com/heartbeat","uuid="+UUID+"&players="+to_string(PlayerCount)+"&maxplayers="+to_string(MaxPlayers)+"&port=" PostHTTP("https://beamng-mp.com/heartbeat","uuid="+UUID+"&players="+to_string(PlayerCount)+"&maxplayers="+to_string(MaxPlayers)+"&port="
+ to_string(UDPPort) + "&map=" + MapName + "&private="+to_string(Private)+"&serverversion="+ServerVersion+"&clientversion="+ClientVersion+"&name="+ServerName); + to_string(UDPPort) + "&map=" + MapName + "&private="+State+"&serverversion="+ServerVersion+"&clientversion="+ClientVersion+"&name="+ServerName);
std::this_thread::sleep_for (std::chrono::seconds(5)); std::this_thread::sleep_for (std::chrono::seconds(5));
} }