03.03.2013, 13:41
#Edit
ve se funciona
ve se funciona
pawn Код:
//========= TOPO DO GM ============//
#include <DOF2>
#define iiPasta "Players/%s.ini"
//========= public OnPlayerConnect ==========//
iCarregar(playerid);
//========== public OnPlayerDisconnect =========//
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"));
}
}