[POMOC]Oko skina

Započeo Alex1993, Novembar 03, 2013, 20:46:31 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:moj mod od 0
Opis problema:napravio sam biranje skina poslije registracije ali kako da napravim kada jednom izabere skin da poslije logina ne moze opet birati skin vec da mu automatski postavi skin koji je odabrao prije registracije.
Mislim da treba cuvanje skina naravit.
Dio skipte: ev vam OnDialogResponse
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch( dialogid )
    {
        case DIALOG_REGISTER:
        {
            if (!response) return Kick(playerid);
            if(response)
            {
     			new INI:File = INI_Open(UserPath(playerid));
                INI_SetTag(File,"data");
                INI_WriteInt(File,"Password",udb_hash(inputtext));
                INI_WriteInt(File,"Cash",0);
                INI_WriteInt(File,"Admin",0);
                INI_WriteInt(File,"Kills",0);
                INI_WriteInt(File,"Deaths",0);
                INI_Close(File);
                if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
                {
				AddPlayerClass(1,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 1
				AddPlayerClass(2,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 2
				AddPlayerClass(3,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 3
				AddPlayerClass(4,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 4
				AddPlayerClass(5,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 5
				AddPlayerClass(6,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 6
				AddPlayerClass(7,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 7
				AddPlayerClass(9,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 9
				AddPlayerClass(10,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 10
				AddPlayerClass(11,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 11
				AddPlayerClass(12,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 12
				AddPlayerClass(13,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 13
				AddPlayerClass(14,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 14
				AddPlayerClass(15,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 15
				AddPlayerClass(17,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 17
				AddPlayerClass(18,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 18
				AddPlayerClass(19,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 19
				AddPlayerClass(20,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 20
				AddPlayerClass(21,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 21
				AddPlayerClass(22,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 22
				AddPlayerClass(23,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 23
				AddPlayerClass(31,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 31
				AddPlayerClass(32,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 32
				AddPlayerClass(33,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 33
				AddPlayerClass(34,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 34
				AddPlayerClass(35,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 35
				AddPlayerClass(36,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 36
				AddPlayerClass(37,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 37
				AddPlayerClass(38,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 38
				AddPlayerClass(39,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 39
				AddPlayerClass(40,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 40
				AddPlayerClass(41,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 41
				AddPlayerClass(43,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 43
				AddPlayerClass(44,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 44
				AddPlayerClass(45,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 45
				AddPlayerClass(46,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 46
				AddPlayerClass(47,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 47
				AddPlayerClass(48,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 48
				AddPlayerClass(49,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 49
				AddPlayerClass(51,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 51
				AddPlayerClass(52,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 52
				AddPlayerClass(53,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 53
				AddPlayerClass(54,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 54
				AddPlayerClass(55,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 55
				AddPlayerClass(56,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 56
				AddPlayerClass(57,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 57
				AddPlayerClass(58,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 58
				AddPlayerClass(59,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 59
				AddPlayerClass(60,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 60
				}
            }
        }
        case DIALOG_LOGIN:
        {
            if ( !response ) return Kick ( playerid );
            if( response )
            {
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    string(sizeof
                    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
                    GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
                    SetPlayerSkin(playerid, skin);
                	SpawnPlayer(playerid);
                }
				return 1;
            }
        }
    }
    return 1;
}

Slika/Video://
Tnx unaprijed

Citat: [LG:RP]| Kris poslato Novembar 03, 2013, 21:29:00 POSLE PODNE
KOJU FUNKCIJU IMA OVO
AddPlayerClass(1,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 1
				AddPlayerClass(2,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 2
				AddPlayerClass(3,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 3
				AddPlayerClass(4,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 4
				AddPlayerClass(5,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 5
				AddPlayerClass(6,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 6
				AddPlayerClass(7,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 7
				AddPlayerClass(9,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 9
				AddPlayerClass(10,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 10
				AddPlayerClass(11,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 11
				AddPlayerClass(12,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 12
				AddPlayerClass(13,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 13
				AddPlayerClass(14,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 14
				AddPlayerClass(15,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 15
				AddPlayerClass(17,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 17
				AddPlayerClass(18,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 18
				AddPlayerClass(19,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 19
				AddPlayerClass(20,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 20
				AddPlayerClass(21,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 21
				AddPlayerClass(22,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 22
				AddPlayerClass(23,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 23
				AddPlayerClass(31,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 31
				AddPlayerClass(32,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 32
				AddPlayerClass(33,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 33
				AddPlayerClass(34,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 34
				AddPlayerClass(35,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 35
				AddPlayerClass(36,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 36
				AddPlayerClass(37,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 37
				AddPlayerClass(38,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 38
				AddPlayerClass(39,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 39
				AddPlayerClass(40,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 40
				AddPlayerClass(41,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 41
				AddPlayerClass(43,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 43
				AddPlayerClass(44,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 44
				AddPlayerClass(45,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 45
				AddPlayerClass(46,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 46
				AddPlayerClass(47,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 47
				AddPlayerClass(48,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 48
				AddPlayerClass(49,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 49
				AddPlayerClass(51,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 51
				AddPlayerClass(52,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 52
				AddPlayerClass(53,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 53
				AddPlayerClass(54,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 54
				AddPlayerClass(55,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 55
				AddPlayerClass(56,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 56
				AddPlayerClass(57,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 57
				AddPlayerClass(58,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 58
				AddPlayerClass(59,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 59
				AddPlayerClass(60,1685.6200,-2332.9944,13.5469,2.8020,0,0,0,0,0,0); // skin 60
				}
   

brate to sam vratio pod OnGameInit
htjeo sam da napravim da samo na registraciji moze da bira skin i poslije kada se loginuje da mu automatski postavi skin koji je izabro ali nisam uspjeo kako to da uradim