Today i found out that someone was getting on my account on my server, and it autologged in for him.
Код:
new plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof plname);
format(plname, sizeof plname, "%s.ini", plname);
if(fexist(plname))
{
new ip[16];
GetPlayerIp(playerid,ip,sizeof(ip));
if(!strcmp(ip,Stats[playerid][IP],true))
{
SendClientMessage(playerid,CONNECT1,"You have been automatically logged in.");
LoginPlayer(playerid,Stats[playerid][aPassword]);
}
else
{
SendClientMessage(playerid,CONNECT1,"You are registered, please /login.");
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"You are not registered, you should /register to recieve all benefits.");
}
i blame firefox for the indentation.
Did you get the original IP of the account from the file, and saved it to Stats[playerid][IP]