SA-MP Forums Archive
to come and go back to old life vest and - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: to come and go back to old life vest and (/showthread.php?tid=503871)



to come and go back to old life vest and - maikons - 31.03.2014

I do not know how I could save the logout position, weapons, everything but life and vest, can someone make me a script to save life and vest when entering and exiting the game?


Re: to come and go back to old life vest and - Lajko1 - 31.03.2014

Umm you will need to use GetPlayerHealth / Armour for that try to download a admin system and just fastly check OnPlayerConnect / Disconnect


Re: to come and go back to old life vest and - Stinged - 31.03.2014

Learn to use INI writers. Like Y_INI.


Re: to come and go back to old life vest and - maikons - 01.04.2014

I was trying to save lives here and vest, had problems, do not know why does not work right, weapons and position do I save good, but life vest and never will ..

Done to save the Health and Armour qnd logs out and spawns qnd up arrow to life ca guy, but ta saving an absurd number qnd logs out yourself

Out with 45 + / - vest and life exactly 30, saved looks like:
Health = 1106247680
Armour = 1108869120

pawn Код:
public OnPlayerDisconnect(playerid, reason)

    new Float:a;
    GetPlayerArmour(playerid, a);

    new Float:h;
    GetPlayerHealth(playerid, h);
   
    PlayerInfo[playerid][pHealthS] = h;
    PlayerInfo[playerid][pArmourS] = a;

pawn Код:
public OnPlayerSpawn(playerid)
    if(PlayerInfo[playerid][pLevel] >= 1){
        SetPlayerHealth(playerid, PlayerInfo[playerid][pHealthS]);
        SetPlayerArmour(playerid, PlayerInfo[playerid][pArmourS]);
    }

What's wrong?