25.10.2014, 08:37
Well, try this :
pawn Код:
stock Connect_To_Database(){
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
if(mysql_errno() != 0){
print("[DayZ - MySQL] Connect to MySQL Database successfully !");
}
else
{
print("[DayZ - MySQL] Can't connect to MySQL Database | Trying Again !");
mysql_connect(SQL_HOST, SQL_USER, SQL_DATA, SQL_PASS);
if(mysql_errno() != 1){
print("[DayZ - MySQL] Connect to MySQL Database successfully !");
}
else{
print("[DayZ - MySQL] Can't connect to MySQL Database | Server Closed !");
SendRconCommand("exit");
}
}
return true;
}