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 online=1 where sid='%d',Player[pid][Sid]
and when player disconnects
update players set online=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(playerid, pIP, sizeof(pIP)); // Get the player's IP
foreach(new i : Player) // Loop through all players
{
if(playerid != i)
{
GetPlayerIp(i, tIP, 16); // Get another player's IP
if(!strcmp(tIP, pIP, true)) // Check if the IPs are the same
{
format(string, sizeof(string), "[WARNING] %s (ID %d) has connected with the same IP as %s (ID %d) (%s)", GetName(playerid), playerid, GetName(i), i, pIP);
SendAdminMessage(COLORDARKRED, string, 1); // 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.