Advertisement
Guest User

Untitled

a guest
Jan 18th, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public OnGameModeInit()
  2. {
  3. printf("Iniciando conexión MySQL: (Servidor: '%s', Usuario: '%s', Clave: '%s', Base de Datos: '%s')", MySQL_Servidor, MySQL_Usuario, MySQL_Clave, MySQL_BD);
  4. Conecction = mysql_connect(MySQL_Servidor, MySQL_Usuario, MySQL_BD, MySQL_Clave);
  5. if(mysql_ping() == 1) //Comprobamos si se conectó
  6. {
  7. printf("Conexión a la base de datos realizada correctamente.");
  8. }
  9. else //Caso contrario:
  10. {
  11. print("Conexión a la base de datos no realizada.");
  12. mysql_close(); //Cerramos la conexión
  13. SendRconCommand("exit"); //Cerramos la consola para evitar bug's
  14. }
  15. return 1;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement