01.06.2012, 00:05
For check is this
pawn Код:
CheckConnection()
{
if(!mysql_ping(connection))
{
return 1;
}
else
{
mysql_connect(SQL_HOST, SQL_USER, SQL_PASS,SQL_DB,connection,1);
if(!mysql_ping(connection))
{
return 1;
}
else
{
print( "MySQL Connection is dead, exiting..." );
SendRconCommand("exit");
return 0;
}
}
}