IP read and check - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: IP read and check (
/showthread.php?tid=95579)
IP read and check -
Master_FM - 04.09.2009
Hi,
i tried to check the ips of the players on login with their nicknames.
Thats all okay, but now i want to search the ip if another player comes online and if they have the same or is like that, i will get a adminwarning
IP Search and save is okay
new ip[16];
new angabe[64];
GetPlayerIp(playerid,ip,sizeof(ip));
format(angabe,sizeof(angabe),"Name: %s IP: %s\n",playername,ip);
new File:ftw=fopen("IPlog.txt",io_append);
fwrite(ftw,angabe);
fclose(ftw);
But now i must search it and also get out the name of it... Thats really hard. I dont know how to do it another way.
Re: IP read and check -
MenaceX^ - 04.09.2009
pawn Код:
new
pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
?
Re: IP read and check -
Master_FM - 04.09.2009
Quote:
Originally Posted by MenaceX^
pawn Код:
new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid,pName,sizeof(pName));
?
|
No you dont understand it.
I save the IPs of the players. And if the get online, i will check the ips and if it is double and i think that the player made a second account, than i want a admin message
But how i can check the new coming ip with the ips in the IPLog.txt ??