to come and go back to old life vest and
#1

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?
Reply
#2

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

Learn to use INI writers. Like Y_INI.
Reply
#4

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)