SA-MP Forums Archive
Age wont save in dialog - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Age wont save in dialog (/showthread.php?tid=471847)



Archive - Alex_T - 25.10.2013

Archive


Re: Age wont save in dialog - rickisme - 25.10.2013

pawn Код:
else if (dialogid == 2)//Age
{
    /* no need in here
    new name[MAX_PLAYER_NAME], file[256];
    GetPlayerName(playerid, name, sizeof(name));
    format(file, sizeof(file), SERVER_USER_FILE, name);
    */

    if(!response) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Rigester", "Type your age below.", "Register", "Leave");
    if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Rigester", "ERROR: Please type your age\nType your age below.", "Register", "Leave");
    PlayerInfo[playerid][pAge] = strval(inputtext);
    //dini_Set(file, "Age", inputtext);
    ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Rigester", "Male \nFemale", "Ok", "Leave");
}



AW: Age wont save in dialog - ikbenremco - 25.10.2013

Try this

PHP код:
else if (dialogid == 2)//Age
    
{
        new 
name[MAX_PLAYER_NAME], file[256];
        new 
Age strval(inputtext);
        
GetPlayerName(playeridnamesizeof(name));
        
format(filesizeof(file), SERVER_USER_FILEname);
        if(!
response) return ShowPlayerDialog(playerid2DIALOG_STYLE_INPUT"Rigester""Type your age below.""Register""Leave");
        if (!
strlen(inputtext)) return
        
dini_Set(file"Age"Age);
        
ShowPlayerDialog(playerid3DIALOG_STYLE_LIST"Rigester""Male \nFemale""Ok""Leave");
    } 



Archive please - Alex_T - 25.10.2013

Archive