GetPlayerIpEx
#1

Код:
stock GetPlayerIpEx(playerid)
{
	new playerip[32];
	GetPlayerIp(playerid, playerip, sizeof(playerip));
	return playerip;
}
Some of the player IP's return "None" / "Unknown".
Would it be a fix to add this at OnPlayerConnect?
Код:
if(GetPlayerIpEx(playerid) == "None" || GetPlayerIpEx(playerid) == "Unknown")
{
    SendClientMessage(playerid, COLOR_LIGHTRED, "[SERVER] You have been kicked from the server for having an invalid Ip Adress.");
    Kick(playerid);
}
Reply
#2

I don't understand you...
Reply
#3

No. Almost 100% of people would have a "valid" IP address.
Reply
#4

Where you get the player's IP?
Reply
#5

Some players hide their IP adress and it returns, when using GetPlayerIp as "Unknown" or "None". So I am just wondering if the fix above would help. Because I have experienced it before and today, today some DDoSer DDoSed my server, heavily and I wanted to know if the above script would possibly fix it.
Reply
#6

No, it dont fix the ddos, it's a attack of services, you can't fix it with a simple kick. (Its not SAMP/GTA side)
Reply
#7

I meant if it would get rid of the player from login in with an invalid Ip Adress.
Reply
#8

There is no such thing as invalid IP Adress. Every IP is valid
Reply
#9

You're basically comparing strings, use strcmp for that. That's the technical side, but practically that check is useless.
Reply
#10

Why is it useless, people use an ip hider to manage some sort of way to not to display their ip adress. In that case when we check their ip it results in "None" or "Unknown", just believe it, it happends. I made a mistake in the script but still you got the idea of it, and why shouldn't it be succesful?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)