Trying something new, but running into a few unanswered questions.
#1

OK, I know the title sounded vague, but my issue is that I'm trying to create a system that lets you choose your skin based on categories in dialogs, as seen here (not completed):
Код:
if(dialogid==1 && response)
    {
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Choose a Race","White Males\nBlack Males\nOriental Males\nHispanic Males\nNative Males", "Select", "Back");
        return 1;
    }
    else if(dialogid==1 && !response)
    {
        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Choose a Race","White Females\nBlack Females\nOriental Females\nHispanic Females\nNative Females", "Select", "Back");
		return 1;
	}
    if(dialogid==2 && response)
    {
        switch(listitem)
        {
            case 0:
            {
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Males","White Male 1\nWhite Male 2\nWhite Male 3","Select","Back");
                return 1;
            }
            case 1:
            {
                ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Black Males","Black Male 1\nBlack Male 2\nBlack Male 3","Select","Back");
                return 1;
            }
            case 2:
            {
                ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Oriental Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
                return 1;
            }
            case 3:
            {
                ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Hispanic Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
                return 1;
            }
            case 4:
            {
                ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Native Males","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
                return 1;
            }
		}
	}
	if(dialogid==3 && response)
    {
        switch(listitem)
        {
            case 0:
            {
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Females","White Male 1\nWhite Male 2\nWhite Male 3","Select","Back");
                return 1;
            }
            case 1:
            {
                ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Black Femles","Black Male 1\nBlack Male 2\nBlack Male 3","Select","Back");
                return 1;
            }
            case 2:
            {
                ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Oriental Femles","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
                return 1;
            }
            case 3:
            {
                ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "Hispanic Femles","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
                return 1;
            }
            case 4:
            {
                ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "Native Femles","Oriental Male 1\nOriental Male 2\nOriental Male 3","Select","Back");
                return 1;
            }
		}
	}
	if(dialogid==4 && response)
    {
        switch(listitem)
        {
            case 0:
            {
            	SetPlayerSkin(playerid,29);
                ShowPlayerDialog(playerid, 14, DIALOG_STYLE_MSGBOX, "Skin Selection", "Choose this skin for this session?", "Yes", "No");
                return 1;
            }
            case 1:
            {
                
                return 1;
            }
            case 2:
            {
                
                return 1;
            }
            case 3:
            {
                
                return 1;
            }
            case 4:
            {
                
                return 1;
            }
		}
	}
	if(dialogid==14 && response)
 	{
  		SpawnPlayer(playerid);
  		SetPlayerSkin(playerid,29);
    }
    else if (!response)
	{
 		SetPlayerSkin(playerid,0);
   		ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "White Males","White Male 1\nWhite Male 2\nWhite Male 3","Select","Back");
	}
So, my question is (if you understand that area of code) after the player chooses their skin, how would I save that skin using Dini, for example?

Then Question 2: Whenever ever I have another dialog in the script, and try to hit button 2 (usually "cancel"), it opens the last dialog above in that code, and forces me to respawn again causing glitches and such, how do I fix that?

And THEN Question 3: On the same subject as saving, how would I save the player's coords to the same file as their skin? Or could I?

AAAND THEEEN Question 4: If a player wants to reset their character (including skin and position) how would I delete that file?

MORE INFO: I'm also using the J.L.Administration FS because that was a big weight off my chest. That's half of the server already made (sorta), but it doesn't save skin and position, but it does save other stats, so maybe I could just use that file to save pos and skin...

IF you can answer any or all of these questions that'd be great!
Reply


Messages In This Thread
Trying something new, but running into a few unanswered questions. - by Aerotactics - 11.02.2014, 09:19
Re: Trying something new, but running into a few unanswered questions. - by ]Rafaellos[ - 11.02.2014, 09:32
Re: Trying something new, but running into a few unanswered questions. - by Aerotactics - 11.02.2014, 15:26

Forum Jump:


Users browsing this thread: 2 Guest(s)