if(dialogid == DIALOGO_INGRESO)
{
if(response == 0)
{
Kick(playerid);
return 1;
}
else
{
if(strlen(inputtext))
{
if(strcmp(inputtext, PlayerInfo[playerid][Contra]))
{
new loginstring[256];
format(loginstring,sizeof(loginstring),"{FFFFFF}Fin del Mundo ({00FF00}F.D.M{FFFFFF}) - FreeRaom\n\nBienvenido, %s\nTu nombre fue cargado en nuestra base de datos.\nIngresa la contraseсa para ingresar al servidor:\n\n {FF0000}CONTRASEСA INCORRECTA", Nombre(playerid));
ShowPlayerDialog(playerid, DIALOGO_INGRESO, DIALOG_STYLE_INPUT, "Loguear En {00FF00}F.D.M", loginstring, "Ingresar", "Salir");
}
else
{
Ingreso[playerid] = 1;
CargarCuenta(playerid);
}
}
else
{
new loginstring[256];
format(loginstring,sizeof(loginstring),"{FFFFFF}Fin del Mundo ({00FF00}F.D.M{FFFFFF}) - FreeRaom\n\nBienvenido, %s\nTu nombre fue cargado en nuestra base de datos.\nIngresa la contraseсa para ingresar al servidor:\n\n {FF0000}INGRESE UNA CONTRASEСA", Nombre(playerid));
ShowPlayerDialog(playerid, DIALOGO_INGRESO, DIALOG_STYLE_INPUT, "Loguear En {00FF00}F.D.M", loginstring, "Ingresar", "Salir");
}
}
}
public CargarCuenta(playerid)
{
if(Ingreso[playerid] == 1)
{
new query[128];
format(query, sizeof(query), "SELECT * FROM `usuarios` WHERE `ID` = %d", PlayerInfo[playerid][SQLid]);
mysql_function_query(g_Handle, query, true, "CargarDatosUsuario", "d", playerid);
}
return 1;
}
|
El Forward CargarDatosUsuarios Ya esta colocado.. Nose cual puede ser el problema por ahi es Por El Include Datagram aunque ya lo agregue pero nose cual es el problema.
![]() |
public CargarDatosUsuario(playerid)
{
TogglePlayerControllable(playerid, 1);
new temp[40];
cache_get_row(0, 3, temp), PlayerInfo[playerid][Admin] = strval(temp),
cache_get_row(0, 4, temp), PlayerInfo[playerid][Asesinatos] = strval(temp),
cache_get_row(0, 5, temp), PlayerInfo[playerid][Muertes] = strval(temp),
cache_get_row(0, 6, temp), PlayerInfo[playerid][Vip] = strval(temp),
cache_get_row(0, 7, temp), PlayerInfo[playerid][Dinero] = strval(temp),
cache_get_row(0, 8, temp), PlayerInfo[playerid][Advertencias] = strval(temp),
cache_get_row(0, 9, temp), PlayerInfo[playerid][Skin] = strval(temp),
cache_get_row(0, 10, temp), PlayerInfo[playerid][AutoID] = strval(temp),
cache_get_row(0, 11, temp), PlayerInfo[playerid][PosX] = floatstr(temp),
cache_get_row(0, 12, temp), PlayerInfo[playerid][PosY] = floatstr(temp),
cache_get_row(0, 13, temp), PlayerInfo[playerid][PosZ] = floatstr(temp),
cache_get_row(0, 14, temp), PlayerInfo[playerid][PosA] = floatstr(temp),
cache_get_row(0, 15, temp), PlayerInfo[playerid][Banco] = strval(temp),
cache_get_row(0, 16, temp), PlayerInfo[playerid][DuelosG] = strval(temp),
cache_get_row(0, 17, temp), PlayerInfo[playerid][DuelosP] = strval(temp),
cache_get_row(0, 18, temp), PlayerInfo[playerid][CarrerasG] = strval(temp),
cache_get_row(0, 19, temp), PlayerInfo[playerid][CarrerasP] = strval(temp),
cache_get_row(0, 20, temp), PlayerInfo[playerid][Baneado] = strval(temp);
SetPlayerScore(playerid, PlayerInfo[playerid][Asesinatos]);
DarDinero(playerid, PlayerInfo[playerid][Dinero]);
return 1;
}
public CargarDatosUsuario(playerid)
{
new rows,fields;
cache_get_data(rows, fields);
if(rows > 0) {
TogglePlayerControllable(playerid, 1);
new temp[40];
cache_get_row(0, 3, temp), PlayerInfo[playerid][Admin] = strval(temp),
cache_get_row(0, 4, temp), PlayerInfo[playerid][Asesinatos] = strval(temp),
cache_get_row(0, 5, temp), PlayerInfo[playerid][Muertes] = strval(temp),
cache_get_row(0, 6, temp), PlayerInfo[playerid][Vip] = strval(temp),
cache_get_row(0, 7, temp), PlayerInfo[playerid][Dinero] = strval(temp),
cache_get_row(0, 8, temp), PlayerInfo[playerid][Advertencias] = strval(temp),
cache_get_row(0, 9, temp), PlayerInfo[playerid][Skin] = strval(temp),
cache_get_row(0, 10, temp), PlayerInfo[playerid][AutoID] = strval(temp),
cache_get_row(0, 11, temp), PlayerInfo[playerid][PosX] = floatstr(temp),
cache_get_row(0, 12, temp), PlayerInfo[playerid][PosY] = floatstr(temp),
cache_get_row(0, 13, temp), PlayerInfo[playerid][PosZ] = floatstr(temp),
cache_get_row(0, 14, temp), PlayerInfo[playerid][PosA] = floatstr(temp),
cache_get_row(0, 15, temp), PlayerInfo[playerid][Banco] = strval(temp),
cache_get_row(0, 16, temp), PlayerInfo[playerid][DuelosG] = strval(temp),
cache_get_row(0, 17, temp), PlayerInfo[playerid][DuelosP] = strval(temp),
cache_get_row(0, 18, temp), PlayerInfo[playerid][CarrerasG] = strval(temp),
cache_get_row(0, 19, temp), PlayerInfo[playerid][CarrerasP] = strval(temp),
cache_get_row(0, 20, temp), PlayerInfo[playerid][Baneado] = strval(temp);
SetPlayerScore(playerid, PlayerInfo[playerid][Asesinatos]);
DarDinero(playerid, PlayerInfo[playerid][Dinero]);
}
else {
SendClientMessage(playerid,-1,"Ha ocurrido un error al cargar los datos");
}
return 1;
}