26.01.2013, 02:26
pawn Код:
#include <a_samp>
#include <mysql>
#include <zcmd>
#define MySQL_hostname "localhost"
#define MySQL_username "root"
#define MySQL_password ""
#define MySQL_database "sanfierro"
main() {}
public OnGameModeInit()
{
mysql_init();
mysql_connect("127.0.0.1","root","sanfierro","");
if(mysql_ping()) printf("MySQL connection to %s successful",MySQL_database);
else printf("MySQL connection to %s failed",MySQL_database);
return 1;
}
public OnGameModeExit()
{
mysql_close();
return 1;
}