13.01.2014, 21:10
PhpMyAdmin "samp" I created the database. I import.
Код:
stock connectToMysql() {
if(server_enviroment == ENVIROMENT_DEV) {
mysql_connect("localhost","...","...",".FixSet.FixSet.cake");
if(mysql_ping() == -1) { print("Unable to connect to MySQL server... Quitting"); SendRconCommand("exit"); } else { print("Connected to MySQL server"); }
print("Server Enviroment: DEV");
} else if (server_enviroment == ENVIROMENT_LIVE) {
mysql_connect("localhost","samp_server","..","...");
if(mysql_ping() == -1) { print("Unable to connect to MySQL server... Quitting"); SendRconCommand("exit"); } else { print("Connected to MySQL server"); }
print("Server Enviroment: LIVE");
} else {
print("Unknown server enviroment, quitting.");
SendRconCommand("exit");
}
}

