Better, flexible, re-written and fast SA:MP/OMP query server client
SA:MP Query it is developed to interact with GTA SA:MP/OpenMP servers, allowing to obtain
important data through mechanisms based on a UDP packet system provided by SA:MP.
Note
Learn more about SA:MP Query Mechanisms
NOTE: Currently unavailable, we are working for a stable version.
pip install py-sampquery
import trio
import sampquery as sampq
async def main() -> None:
server = sampq.SAMPQuery_Client(
ip='144.217.174.214',
port=6969
)
# Getting server information
server_info = await server.info()
print(f"Retrieving server data of {server_info.name)
# Players inside
player_list = await server.players()
for player in player_list.players:
print(f"Nickname: {player.name} (Score: {player.score})")
if __name__ == "__main__":
trio.run(main)
Wanna see some examples? you can check this examples folders.
We're open to receiving contributions and improvements for the following enhancements. Feel free to open an issue or create a pull request.