SA-MP Forums

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

Thread Tools Display Modes
Old 24/11/2017, 12:06 AM   #1
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.

public OnGameModeInit(){

forward ConectarMySQL();
public ConectarMySQL(){
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]);
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')",
mysql_query(MySQL, query);
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 ::::....


Renaciendo una vez más
PandorumRoleplay is offline   Reply With Quote
Old 05/01/2018, 01:48 AM   #2
Little Clucker
Join Date: Jun 2017
Posts: 2
Reputation: 0
Default Re: Help, SMF connect to SV

Creo que es por que tu variable "SQL_DB" imagino que es la base de datos de tu SV (por ejemplo "usuarios"), recuerda que la base de datos de SMF es "smf_" entonces, al ejecutarse esto seguramente busca la tabla "smf_members" dentro de la base de datos de tu servidor("usuarios"). Lo más rápido y sencillo sería crear otra conexión a la base de datos de SMF
Yasef99 is offline   Reply With Quote

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 07:38 AM.

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