I found the problem, in fact when you register, you're automatically logged in. So when you logged in, my server shutting down. Here is the code:
pawn Код:
LoginPlayer(playerid, password[])
{
if(!AccountExists[playerid])
return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] You're not registered!");
if(PlayerLogged[playerid])
return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] You're already logged in!");
if(strlen(password) < 3 || strlen(password) >= 32)
return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] Your password is too short or too long!");
CheckMySQL();
new string[128];
format(string, sizeof(string), "SELECT * FROM Users WHERE Name = '%s' AND Password = '%s'", UserStats[playerid][Name], password);
mysql_query(string);
mysql_store_result();
if(!mysql_num_rows())
return SendClientMessage(playerid, COLOR_RED, "[ACCOUNT] Incorrect password!");
new row[128]; // The length of 1 'row' total.
new field[5][32]; // [4] = Amount of fields, [24] = Max length of the bigest field.
mysql_fetch_row_format(row, "|");
explode(row, field, "|");
mysql_free_result();
// The field starts here with 1, because the field 'Name' = 0, and we already have the name in a variable.
format(UserStats[playerid][Password], 32, "%s", field[1]);
UserStats[playerid][Admin] = strval(field[2]);
UserStats[playerid][Money] = strval(field[3]);
UserStats[playerid][Adresas] = strval(field[4]);
GivePlayerMoney(playerid, UserStats[playerid][Money]);
GetPlayerIp(playerid, UserStats[playerid][Adresas]);
PlayerLogged[playerid] = 1;
return 1;
}