SA-MP Forums Archive
how check is accounts in game - 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 check is accounts in game (/showthread.php?tid=656683)



how check is accounts in game - NightMrOver - 21.07.2018

Hi,

How to check for ex: sandbox'ers, when in one pc players connecting with many accounts?


Re: how check is accounts in game - CodeStyle175 - 21.07.2018

when player logs in game just update db
update players set on‌line=1 where sid='%d',Player[pid][Sid]
and when player disconnects
update players set on‌line=0 where sid='%d',Player[pid][Sid]
and check if player is online
select online from players where sid='%d'


Re: how check is accounts in game - NightMrOver - 21.07.2018

what is sid?


Re: how check is accounts in game - Akeem - 21.07.2018

I think that would be the player mysql id


Re: how check is accounts in game - NightMrOver - 21.07.2018

Iam talking about

https://sampforum.blast.hk/showthread.php?tid=586819


Re: how check is accounts in game - coool - 22.07.2018

Both players will have same IP Address. check for IP


Re: how check is accounts in game - NightMrOver - 22.07.2018

But same Ip can also have computers on in same modem.


Re: how check is accounts in game - iamjems - 22.07.2018

PHP код:
public OnPlayerConnect(playerid)
{    
    new 
pIP[16], 
        
tIP[16]; // Create strings so we can store the IPs in them
    
GetPlayerIp(playeridpIPsizeof(pIP)); // Get the player's IP
    
foreach(new Player// Loop through all players
    
{
        if(
playerid != i)
        {
            
GetPlayerIp(itIP16); // Get another player's IP
            
if(!strcmp(tIPpIPtrue)) // Check if the IPs are the same
            
{
                
format(stringsizeof(string), "[WARNING] %s (ID %d) has connected with the same IP as %s (ID %d) (%s)"GetName(playerid), playeridGetName(i), ipIP);
                
SendAdminMessage(COLORDARKREDstring1); // Use your function to send the message to admins, I just used my one here.
            
}
        }
    }
    return 
1;




Re: how check is accounts in game - NightMrOver - 22.07.2018

But this not check.. There can be 2 PC in home, and they ip will be same.


Re: how check is accounts in game - iLearner - 22.07.2018

Use gpci+ip, it can be considered accurate enough.