how check is accounts in game
#1

Hi,

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

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'
Reply
#3

what is sid?
Reply
#4

I think that would be the player mysql id
Reply
#5

Iam talking about

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

Both players will have same IP Address. check for IP
Reply
#7

But same Ip can also have computers on in same modem.
Reply
#8

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;

Reply
#9

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

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


Forum Jump:


Users browsing this thread: 3 Guest(s)