I can already access the resources, for this I use a GET request with a Login and Password.
I cannot find out how many players are on the server and the server name. As far as I know, LOGIN and PASSWORD are not needed for this.
How will monitoring services learn this information?
Sorry if my question is not clear. I use a translator to communicate with you!
def givePlayerDonatePoints(server_ip, server_http_port, player_login, bot_password, amount):
req = requests.get(f'http://{server_ip}:{server_http_port}/payment/call/MTAPaymentData?user={player_login}::{amount}', auth=('MTAPaymentROBOT', bot_password))
answer = json.loads(req.text)[0]
if answer == 'OK':
return True
else:
return False
To call a function using a URL, I do it like this