27.03.2014, 03:33
Tentei fazer com que qnd reloga-se salva-se vida/colete q tava antes, mas n ta funcionando, alguem pode me ajudar?
pawn Код:
#include <a_samp>
#include <dini>
#define FILTERSCRIPT
public OnFilterScriptInit()
{
if(!fexist("Health.ini")) dini_Create("Health.ini");
if(!fexist("Armour.ini")) dini_Create("Armour.ini");
}
public OnFilterScriptExit()
{
}
public OnPlayerSpawn(playerid)
{
if(dini_Isset("Health.ini",PlayerName(playerid))) SetPlayerHealth(playerid,dini_Int("Health.ini",PlayerName(playerid)));
if(dini_Isset("Armour.ini",PlayerName(playerid))) SetPlayerArmour(playerid,dini_Int("Armour.ini",PlayerName(playerid)));
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
dini_IntSet("Health.ini",PlayerName(playerid),GetPlayerHealth(playerid));
dini_IntSet("Armour.ini",PlayerName(playerid),GetPlayerArmour(playerid));
return 1;
}