Why the skin is not saved?
#8

Quote:
Originally Posted by dakata994
Посмотреть сообщение
Here:

Код:
PlayerInfo[playerid][pSkin] = GetPlayerSkin(playerid);
Put this on your Save Function.
Quote:
Originally Posted by Troydere
Посмотреть сообщение
You're doing few things wrong:

PHP код:
        case DIALOG_REGISTER:
        {
            if (!
response) return Kick(playerid);
            if(
response)
            {
                if(!
strlen(inputtext)) return ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT"Registrando al jugador.","Has introducido una clave invбlida.\nEscribe tu clave para registrar una nueva cuenta.","Registrar","Cancelar");
                new 
INI:File INI_Open(UserPath(playerid));
                
INI_SetTag(File,"data");
                
INI_WriteInt(File,"Pass",udb_hash(inputtext));
                
INI_WriteInt(File,"Skin",1); // You don't have to set this value as it'll set itself later when the player disconnects
                
INI_Close(File);
        
AddPlayerClass(PlayerInfo[playerid][pSkin], 1958.331343.1215.36269.1526362815000); // there's no PlayerInfo[playerid][pSkin] value yet as you have not written anything to it in this part of the script
            
}
        } 
Also, AddPlayerClass does not work as you think it does

PHP код:
                if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
                {
                    
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra true, .extra playerid); // This is useless here as you've loaded the player's data under OnPlayerConnect
                
AddPlayerClass(PlayerInfo[playerid][pSkin], 1958.331343.1215.36269.1526362815000); // Should be changed for SetSpawnInfo
                

https://sampwiki.blast.hk/wiki/SetSpawnInfo
Thanks to all for the help.
I already managed to solve it, I love you

Closed topic.
Reply


Messages In This Thread
[Solved]Why the skin is not saved? - by kuleke - 15.03.2017, 12:16
Re: Why the skin is not saved? - by dakata994 - 15.03.2017, 12:24
Re: Why the skin is not saved? - by Flamehaze7 - 15.03.2017, 12:25
Re: Why the skin is not saved? - by kuleke - 15.03.2017, 12:35
Re: Why the skin is not saved? - by kuleke - 15.03.2017, 12:39
Re: Why the skin is not saved? - by dakata994 - 15.03.2017, 12:48
Re: Why the skin is not saved? - by Toroi - 15.03.2017, 13:44
Re: Why the skin is not saved? - by kuleke - 15.03.2017, 15:37

Forum Jump:


Users browsing this thread: 3 Guest(s)