About This File
Basic Renegade GSA API made by C# Language. Originally by Iran (if I don't remember wrong), but modified. Have 4 functions;
GetAllRenServersIPByGSA() - Returns IPEndPoint[] : Gets all servers IP
GetGSData(IPEndPoint server) - Returns Dictionary<string, string> : Gets server data by server IP.
Here's a basic code for lazy.
//Shorter version Dictionary<string, string> mpf_server_data = new Dictionary<string, string>(); IPEndPoint mpf_ip = new IPEndPoint(); foreach(IPEndPoint ip in GetAllRenServersIPByGSA()) { if(GetGSData(ip)["hostname"].Contains("MPF")) { mpf_server_data = GetGSData(ip); mpf_ip = ip; } }
You can get all servers data with this code too.
If you want shorter way, here's a basic code.
Dictionary<string, string> mpf_server_data = GetServerDataByKeyValue("hostname", "MPF");
It returns the same mpf_server_data value as the top.
For the IP, you can write this code.
IPEndPoint mpf_ip = GetServerIPByKeyValue("hostname", "MPF");
It also returns the same mpf_ip value as the top.
Comment bugs, glitches and ideas about new functions.
What's New in Version 1.1 See changelog
Released
Fixed players issue. Now
GetGSData()
will also return players and more if available.
- With version 1.1:
- Download