[Plugin] [REL] ServerQuery 1.1
#1

ServerQuery 1.1
With this plugin you can easily get server-information and rules from foreign servers.

Functions:
Code:
native GetInfoPacket(ip[],port);
native iIsPassworded();	
native iGetPlayers();
native iGetMaxPlayers();
native iGetHostname(hostname[]);
native iGetGamemode(gamemode[]);
native iGetMapname(mapname[]);

native GetRulesPacket(ip[],port);
native rGetRulesAmount();
native rGetRuleName(ruleid,rulename[]);
native rGetRuleValue(ruleid,rulevalue[]);

native GetPlayerPacket(ip[],port);
native cGetPlayers();
native cGetPlayerName(playerid,plname[]);
native cGetPlayerScore(playerid);
Usage:
First you need to retrieve a package. If you want to get the ServerInfo pagage you have to type:

Code:
GetInfoPacket("127.0.0.1",7777);
You can choose any IP you want.

If it returns 1, you got a package from the server. Then you can use each function with the letter 'i' at the beginning. If you use the function GetRulesPacket() you can use every function with the letter 'r' at the beginning.

For a full example you can download this filterscript.


To get the right ruleid you can use the order as the sa:mp client:
0...gravity
1...mapname
2...version
3...weather
4...weburl
6...worldtime


You don't need a plugin on another server. Only on your server.

Changelog
v.1.0:
- Release

v.1.1:
- Added rGetRulesAmount() (and rule amount max. is 20 now) to get modified rule keys
- Added Package 'c' functions:
you can now get the playerlist from a remote server.
- Added timout protection to prevent server crashes



Download:
ServerQuery v.1.0
ServerQuery v.1.1

ServerQuery v.1.1 - Mirror 2

Source
Reply


Messages In This Thread
[REL] ServerQuery 1.1 - by Flag - 20.02.2010, 17:06
Re: [REL] ServerQuery - by MaXSpeeD - 20.02.2010, 22:30
Re: [REL] ServerQuery - by Faraday - 20.02.2010, 22:35
Re: [REL] ServerQuery - by pyrodave - 20.02.2010, 23:05
Re: [REL] ServerQuery - by CJ101 - 20.02.2010, 23:32
Re: [REL] ServerQuery - by [nl]daplayer - 20.02.2010, 23:43
Re: [REL] ServerQuery - by pyrodave - 21.02.2010, 01:05
Re: [REL] ServerQuery - by Flag - 21.02.2010, 11:04
Re: [REL] ServerQuery - by Westie - 21.02.2010, 19:52
Re: [REL] ServerQuery - by Norn - 21.02.2010, 20:10
Re: [REL] ServerQuery - by Blantas - 21.02.2010, 20:22
Re: [REL] ServerQuery - by [nl]daplayer - 26.02.2010, 01:45
Re: [REL] ServerQuery - by RoBo - 26.02.2010, 15:50
Re: [REL] ServerQuery - by [nl]daplayer - 26.02.2010, 15:54
Re: [REL] ServerQuery - by Westie - 26.02.2010, 16:20
Re: [REL] ServerQuery - by Flag - 27.02.2010, 12:45
Re: [REL] ServerQuery - by @TheShadow@ - 12.03.2010, 13:42
Re: [REL] ServerQuery 1.1 - by Calgon - 12.03.2010, 15:21
Re: [REL] ServerQuery 1.1 - by Remis - 19.07.2010, 14:46
Re: [REL] ServerQuery 1.1 - by Flag - 19.07.2010, 16:12
Re: [REL] ServerQuery 1.1 - by Remis - 20.07.2010, 17:00
Re: [REL] ServerQuery 1.1 - by SloProKiller - 29.08.2010, 07:22
Re: [REL] ServerQuery 1.1 - by always_noob - 16.04.2011, 14:03
Re: [REL] ServerQuery 1.1 - by Medal Of Honor team - 16.04.2011, 18:53
Re: [REL] ServerQuery 1.1 - by Pooh7 - 16.04.2011, 20:44
Re: [REL] ServerQuery 1.1 - by iJumbo - 17.04.2011, 10:53
REL ServerQuery 1 1 - by Veillavable - 18.04.2011, 16:35
Re: [REL] ServerQuery 1.1 - by Kwarde - 18.04.2011, 18:20
Re: [REL] ServerQuery 1.1 - by Niko_boy - 21.02.2012, 10:18
Re: [REL] ServerQuery 1.1 - by Jajetin - 25.06.2012, 23:16
Re: [REL] ServerQuery 1.1 - by archimendus - 12.07.2012, 01:01
Respuesta: [REL] ServerQuery 1.1 - by Shiny_David - 05.08.2012, 14:58
Re: [REL] ServerQuery 1.1 - by KuHS - 15.08.2012, 15:58
Respuesta: [REL] ServerQuery 1.1 - by Glimma - 20.08.2014, 00:44

Forum Jump:


Users browsing this thread: 4 Guest(s)