SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 24/11/2017, 12:06 AM   #1
PandorumRoleplay
Big Clucker
 
PandorumRoleplay's Avatar
 
Join Date: Dec 2014
Location: Islas Canarias
Posts: 95
Reputation: 4
Default Help, SMF connect to SV

I have a question, it turns out that I want to connect my server to the SMF forum but it does not register the accounts, the forum has a satisfactory connection but it does not work ... Does anyone help me? Thank you.



Quote:
public OnGameModeInit(){
ConectarMySQL();
}

forward ConectarMySQL();
public ConectarMySQL(){
CMySQL = mysql_connect(SQL_HOST, SQL_USUARIO, SQL_DB, SQL_CONTRA);
print("[MYSQL] El servidor está intentando conectarse con la base de datos del foro...");
if(mysql_errno(CMySQL) == -1) print("[MYSQL] No se pudo conectar a la base de datos.");
if(mysql_errno(CMySQL) != -1) print("[MYSQL] Conexión con éxito a la base de datos.");
}

public CrearCuenta(playerid){
new query[520],aviso[125];
format(aviso,sizeof(aviso),"Cuenta creada: %s - Edad: %d - Genero: %d", NombreJugador(playerid), Jugador[playerid][Edad], Jugador[playerid][Genero]);
print(aviso);
mysql_format(MySQL, query, sizeof(query), "INSERT INTO `cuentas`(`Nombre`, `Contra`, `Ropa`, `X`, `Y`, `Z`, `Genero`, `Vida`, `Dinero`) VALUES ('%s','%s','%i','1484.1082', '-1668.4976', '14.9159','%i','100','100000')",
NombreJugador(playerid),Jugador[playerid][Contra],Jugador[playerid][Ropa],Jugador[playerid][Genero]);
mysql_query(MySQL, query);
//foro
new stringg[1000];
format(stringg, sizeof(stringg),"INSERT INTO `smf_members` (Nombre, Contra, Nombre) VALUES('%s', md5('%s'), '%s')",NombreJugador(playerid),Jugador[playerid][Contra],NombreJugador(playerid));
mysql_query(MySQL, query);
return 1;
}
__________________
....:::: Pandorum Roleplay ::::....


Información
Web: www.pandorumRP.com
Foro: www.Foro.PandorumRP.com
IP: 158.69.120.8:7777



Renaciendo una vez más
PandorumRoleplay is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I Can't connect to GTA SAMP . I always connect to Single player but not in "MULTIPLAYER" Mode. Please help! bamaboys1234 Client Support 8 13/11/2017 05:16 PM
MySQL Failed to connect. Can't connect to MySQL server on 'localhost' (10061). Gogorakis Server Support 4 14/08/2014 04:14 PM
CMySQLHandler::Connect() - Can't connect to MySQL server on (10061) (Error ID: 2003) Cesar203 Scripting Help 0 02/08/2014 07:20 PM
I cannot Connect to my own samp server.But others can connect. I want Detailed help.If you help I will give you my rcon. jeevan General 12 29/04/2014 09:24 AM


All times are GMT. The time now is 11:24 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.