Dialog
#1

Hey i am making my login and register system i am using dini i have no errors but my dialog is not showing up:
pawn Код:
public OnPlayerConnect(playerid)
{
    format(serverlokacija, sizeof(serverlokacija), ".../Igraci/%s.ini", name);
    if(!fexist(serverlokacija))
    {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", "Dobrodosao na Red Wood RolePlay\n\nNalog: Nepostoji\n\nUpisite vas password za registrovanje.", "Ok","Odustani");
    }
    else
    {
         ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Dobrodosao na Red Wood RolePlay\n\nNalog: Postoji\n\nUpisite vas password za logovanje.", "Ok","Odustani");
    }
    return 1;
}
My on dialog response (if needed)
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_REGISTER)
    {
        format(serverlokacija, sizeof(serverlokacija), "\\Igraci\\%s.ini", ime(playerid));
        dini_Create(serverlokacija);
        dini_Set(serverlokacija, "Lozinka", inputtext);
        dini_IntSet(serverlokacija, "Level", GetPlayerScore(playerid));
        dini_IntSet(serverlokacija, "Novac", GetPlayerMoney(playerid));
        new poruka[128];
        format(poruka, sizeof(poruka), "[Info] Uspesno ste se registrovali sa nalogom %s i lozinkom %s.", ime(playerid), inputtext);
        SCM(playerid, -1, poruka);
        InfoIgraca[playerid][Logovan]++;
    }
    return 1;
}
And my Enum (if needed)
pawn Код:
enum StatsIgraca {
    Lozinka,
    Level,
    Novac,
    Logovan
}
new InfoIgraca[MAX_PLAYERS][StatsIgraca];
Reply
#2

You need do this :

Quote:

// add after all your includes
#if define DIALOG_REGISTER 7398
#if define DIALOG_LOGIN 7399

Reply
#3

No, not working
Reply
#4

BUMP
Reply
#5

Get the name and format it with the correct name this time.

pawn Код:
public OnPlayerConnect(playerid)
{
    new
        file_path[35];
   
    GetPlayerName(playerid, file_path, MAX_PLAYER_NAME);
    format(file_path, sizeof (file_path), "\\Igraci\\%s.ini", file_path);
    if( !fexist(file_path)) ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register", "Dobrodosao na Red Wood RolePlay\n\nNalog: Nepostoji\n\nUpisite vas password za registrovanje.", "Ok","Odustani");
    else ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Dobrodosao na Red Wood RolePlay\n\nNalog: Postoji\n\nUpisite vas password za logovanje.", "Ok","Odustani");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)