[Ajuda] Arrumar minha tentativa de codigo save life
#1

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;
}
Reply
#2

uupp
Reply
#3

estes:

https://sampforum.blast.hk/showthread.php?tid=256983
https://sampforum.blast.hk/showthread.php?tid=109561

tiveram o mesmo problema que voce, tente ver o codigo da solucao deles e tente corrigir o seu.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)