[AJUDA] samp-server.exe
#6

pawn Код:
public OnPlayerConnect( playerid )
{
    Carregar(playerid);
    return true;
}

public OnPlayerDisconnect( playerid, reason )
{
    Salvar(playerid);
    return 1;
}
stock Carregar(playerid)
{
    new save[37],na[MAX_PLAYER_NAME];
    GetPlayerName(playerid,na,sizeof(na));
    format(save,sizeof(save),"Contas/%s.txt",na);
    if(fexist(save))
    {
        Info[playerid][Admin] = dini_Int(save,"Administrador");
        Info[playerid][Level] = dini_Int(save,"Level");
        Info[playerid][Lider] = dini_Int(save,"Lider");
        Info[playerid][Membro] = dini_Int(save,"Membro");
        Info[playerid][Preso] = dini_Int(save,"Preso");
        Info[playerid][TempoP] = dini_Int(save,"TempoPreso");
    }
    else
    {
        dini_Create(save);
    }
    return 1;
}
   
stock Salvar(playerid)
{
    new save[37],na[MAX_PLAYER_NAME];
    GetPlayerName(playerid,na,sizeof(na));
    format(save,sizeof(save),"Contas/%s.txt",na);
    if(fexist(save))
    {

        dini_IntSet(save,"Administrador",Info[playerid][Admin]);
        dini_IntSet(save,"Level",Info[playerid][Level]);
        dini_IntSet(save,"Lider",Info[playerid][Lider]);
        dini_IntSet(save,"Membro",Info[playerid][Membro]);
        dini_IntSet(save,"Preso",Info[playerid][Preso]);
        dini_IntSet(save,"TempoPreso",Info[playerid][TempoP]);
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
[AJUDA] samp-server.exe - by Shadoww5 - 23.05.2011, 16:08
Re: [AJUDA] samp-server.exe - by Josma_cmd - 23.05.2011, 16:20
Re: [AJUDA] samp-server.exe - by Shadoww5 - 23.05.2011, 16:24
Re: [AJUDA] samp-server.exe - by Macintosh - 23.05.2011, 16:26
Re: [AJUDA] samp-server.exe - by Shadoww5 - 23.05.2011, 16:36
Re: [AJUDA] samp-server.exe - by Macintosh - 23.05.2011, 16:40
Re: [AJUDA] samp-server.exe - by Shadoww5 - 23.05.2011, 16:43
Re: [AJUDA] samp-server.exe - by SlashPT - 23.05.2011, 17:44
Re: [AJUDA] samp-server.exe - by Shadoww5 - 23.05.2011, 17:54
Re: [AJUDA] samp-server.exe - by steki. - 23.05.2011, 17:55

Forum Jump:


Users browsing this thread: 3 Guest(s)