Showing Proxy in format..
#1

Hello, I need help.

I use include the Whitetigerswt (https://github.com/Whitetigerswt/SAMP-geoip) there is one function "GetPlayerProxy" but I do not know how to use it, I do not know how it works I want to format showed if a player uses a proxy (false / true )



Код:
CMD:checks(playerid, params[])
{
	new string[144];
	new string1[144];
	new count=0;
	format(string1,sizeof(string1),"Players ( online %i )", GetOnLinePlayers());
	for(new i=0; i<MAX_PLAYERS; i++)
	{
	    if(IsPlayerConnected(i))
		{
		    new Country1[30], City1[30], IP1[30];
		    GetPlayerCountry(playerid, Country1);
		    GetPlayerCity(playerid, City1);
		    GetPlayerIp(playerid,IP1,sizeof(IP1));
	        format(string,sizeof(string),"* %s ( ID %i ) [ Proxy: %i | IP: %s | Country: %s | City: %s ]\n\n", GetPlayerName(playerid), playerid, GetPlayerProxy(playerid), IP1, Country1, City1);
			count++;
	    }
	}
	ShowPlayerDialog(playerid, DIALOG_LOKACE, DIALOG_STYLE_MSGBOX , string1, string, "Cancel", "");
	return 1;
}
Reply
#2

Looking at code here it seems that the function is disable for some reasons as the code in it is commented and always return false, i.e., 0. So you might wanna remove proxy part from your script.
Reply
#3

pawn Код:
format(string,sizeof(string),"* %s ( ID %i ) [ Proxy: %s | IP: %s | Country: %s | City: %s ]\n\n",
GetPlayerName(playerid), playerid, (GetPlayerProxy(playerid)) ? ("True") : ("False"), IP1, Country1, City1);
I'm on my phone at the moment, so if the code is working as its meant to, GetPlayerProxy will return 1 when a player is using a proxy, and 0 if they aren't or it can't be detected. (Not all proxies are detectable)

The code above will give you either true or false depending on the outcome of GetPlayerProxy.
Reply
#4

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
Looking at code here it seems that the function is disable for some reasons as the code in it is commented and always return false, i.e., 0. So you might wanna remove proxy part from your script.
But I do not want to remove the proxy from the code, I need him there, I could detect the players if they use VPN, you understand me?


I asked if it was possible to do it somehow.
Reply
#5

I've just tried to install Hotspot Shield, unfortunately, I tested to take the local host, and return value it wrote "0", so that is a stupid test on localhost, to test the functioning of hosting.
Reply
#6

It will always return 0.. see the code here https://github.com/Whitetigerswt/SAM...ation.inc#L225
The GetProxy() function code is commented, maybe due to some bug. So find other include or other version of that include if you want to use GetProxy() function.
Reply
#7

Quote:
Originally Posted by BroZeus
Посмотреть сообщение
It will always return 0.. see the code here https://github.com/Whitetigerswt/SAM...ation.inc#L225
The GetProxy() function code is commented, maybe due to some bug. So find other include or other version of that include if you want to use GetProxy() function.
Thanks, but I looked and I looked here on the forum, but very similar function GetProxy, GetPlayerProxy, not much, I wanted to use to format the dialogue: /

EDIT:

I was looking for, and what about this?

http://samp scripts com/post/Lookup_FFS_GeoIP_Reverse_DNS_and_Anti-Proxy-Gouranga-other_include-14190/
Reply
#8

I wanted to do so in order to show all players online, but it shows only player with ID 1, does anyone know how I can do to show all players online?
Reply
#9

Knows someone advice?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)