Skin saving problem
#1

Always when a player spawns, his skin is ID 0. How can i fix this?
pawn Код:
enum PlayerInfo
{
    Pass[129],
    Adminlevel,
    VIPlevel,
    Money,
    Scores,
    Kills,
    Deaths,
    Skin,......

public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][Pass],129);
    INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);
    INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);
    INI_Int("Money",pInfo[playerid][Money]);
    INI_Int("Scores",pInfo[playerid][Scores]);
    INI_Int("Kills",pInfo[playerid][Kills]);
    INI_Int("Deaths",pInfo[playerid][Deaths]);
    INI_Int("Skin", pInfo[playerid][Skin]);...................

This is in the login command -->  
if ( pInfo[playerid][Skin]!= 0){
                    SetPlayerSkin(playerid, pInfo[playerid][Skin]);
                    }

dcmd_myskin(playerid, params[])
{
    new skinid, string[256];
    if( sscanf( params, "i", skinid ) ) return SendClientMessage( playerid, -1, "Използвай: /skin [ID]" );
    if(skinid > 299 || skinid< 0) return SendClientMessage(playerid,COLOR_RED,"ГРЕШКА: Налични скинове: 0 - 299 !");
    SetPlayerSkin(playerid,skinid);
    format(string, sizeof(string), "Ти промени твоя скин!");
    SendClientMessage(playerid, COLOR_YELLOW, string);
    new INI:file = INI_Open( Path( playerid ) );
    INI_WriteInt( file, "Skin",skinid);
    INI_Close( file );
    return 1;
}
Reply


Messages In This Thread
Skin saving problem - by martoivanov - 17.07.2013, 08:11
Re: Skin saving problem - by Bakr - 17.07.2013, 10:13
Re: Skin saving problem - by martoivanov - 17.07.2013, 11:13
Re: Skin saving problem - by Misiur - 17.07.2013, 11:18
Re: Skin saving problem - by Bakr - 17.07.2013, 11:20
Re: Skin saving problem - by martoivanov - 17.07.2013, 11:24
Re: Skin saving problem - by Bakr - 17.07.2013, 11:29
Re: Skin saving problem - by martoivanov - 17.07.2013, 11:33
Re: Skin saving problem - by Bakr - 17.07.2013, 11:38
Re: Skin saving problem - by martoivanov - 17.07.2013, 11:50

Forum Jump:


Users browsing this thread: 1 Guest(s)