SA-MP Forums Archive
How can i check if other people had the same ip ? - 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)
+--- Thread: How can i check if other people had the same ip ? (/showthread.php?tid=533219)



How can i check if other people had the same ip ? - Metharon - 23.08.2014

Ok ,look.

In the tabel "Accounts" i have a field who get the ip of the player when he log in.



- How can i check to detect if exist an ip in the database? i want to do something like:


(127.0.0.1) Name_Player is registered.
Other accounts who have the same ip : Name_PLayer2


Re: How can i check if other people had the same ip ? - shourya12 - 23.08.2014

like aka/whosid ?


Re: How can i check if other people had the same ip ? - HazardouS - 23.08.2014

Get Name_Player's IP with GetPlayerIp, then send a query like SELECT * FROM Accounts WHERE IP = '<Name_Player's IP>'
Then check for the query's results. If they exist, get the names from the database and use them to build a string to be displayed later.


Re: How can i check if other people had the same ip ? - Metharon - 23.08.2014

.. can somebody build an example please? i'm beginner in mysql.

.... i think i can get , but i don't know how to list them i mean


- Name_Player (only one) yes i know
but how i do more ?

Name , Name2 , Name3