[Ajuda] Sistema de level
#2

#Edit

ve se funciona

pawn Код:
//========= TOPO DO GM ============//
#include <DOF2>


#define iiPasta     "Players/%s.ini"

//========= public On‌PlayerConnect ==========//
iCarregar(playerid);

//========== public On‌PlayerDisconnect =========//
iSalvar(playerid);

//========= FINAL DO GAME MODE ==========//
stock Smirnoff(playerid)
{
    new File[156],Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Name,sizeof(Name));
    format(File,sizeof(File),iiPasta,Name);
    return File;
}

stock iSalvar(playerid)
{
        if(DOF2_FileExists(Smirnoff(playerid)))
        {
            DOF2_SetInt(Smirnoff(playerid),"Level",GetPlayerScore(playerid));
            DOF2_SaveFile();
        }
}              
 
stock iCarregar(playerid)
{
        if(DOF2_FileExists(Smirnoff(playerid)))
        {
             SetPlayerScore(playerid, DOF2_GetInt(Smirnoff(playerid), "Level"));
        }
}
Reply


Messages In This Thread
Sistema de level - by ungroup - 03.03.2013, 13:31
Re: Sistema de level - by smiiir - 03.03.2013, 13:41
Re: Sistema de level - by ungroup - 03.03.2013, 13:53
Re: Sistema de level - by smiiir - 03.03.2013, 14:17
Re: Sistema de level - by VenoN - 03.03.2013, 14:21
Re: Sistema de level - by smiiir - 03.03.2013, 14:24
Re: Sistema de level - by Schocc - 03.03.2013, 14:29

Forum Jump:


Users browsing this thread: 3 Guest(s)