[Ajuda] Adaptaзгo 'Simples'
#6

pawn Код:
public OnPlayerConnect(playerid)
{
    new file[40], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file,sizeof(file),savefile,name);
    if(!DOF2_FileExists(file))
    {
        DOF2_CreateFile(file);
        DOF2_SetInt(file,"Exp",0);
        DOF2_SetInt(file,"Level",1);
        DOF2_SaveFile();
    }
    else
    {
        SendClientMessage(playerid,0xF0F8FFAA,"CHECK: Files Loaded!");
        Exp[playerid] = DOF2_GetInt(file,"pExp");
        Level[playerid] = DOF2_GetInt(file,"pLevel");
    }
    return 1;
}

public OnPlayerDisconnect(playerid)
{
    new file[40], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(file,sizeof(file),savefile,name);
    DOF2_SetInt(file,"pExp",Exp[playerid]);
    DOF2_SetInt(file,"pLevel",Level[playerid]);
    DOF2_SaveFile();
    return 1;
}
Reply


Messages In This Thread
[Ajuda] Adaptaзгo 'Simples' - by sanalex - 02.05.2012, 13:47
Re: [Ajuda] Adaptaзгo 'Simples' - by ViniBorn - 02.05.2012, 13:58
Re: [Ajuda] Adaptaзгo 'Simples' - by sanalex - 02.05.2012, 14:08
Re: [Ajuda] Adaptaзгo 'Simples' - by humildadeforever - 02.05.2012, 15:09
Re: [Ajuda] Adaptaзгo 'Simples' - by sanalex - 02.05.2012, 15:49
Re: [Ajuda] Adaptaзгo 'Simples' - by ViniBorn - 02.05.2012, 16:45
Re: [Ajuda] Adaptaзгo 'Simples' - by sanalex - 02.05.2012, 16:46
Re: [Ajuda] Adaptaзгo 'Simples' - by ViniBorn - 02.05.2012, 16:50
Re: [Ajuda] Adaptaзгo 'Simples' - by CidadeNovaRP - 02.05.2012, 16:55
Re: [Ajuda] Adaptaзгo 'Simples' - by sanalex - 02.05.2012, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)