SA-MP Forums Archive
Armor saving - 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: Armor saving (/showthread.php?tid=283221)



Armor saving - nmader - 14.09.2011

Alright, if you may have guessed I have been editing a leaked memory RP server that I'm improving in many ways! So could someone give me a link or just post it here, to a tutorial on how to save a player's armor on disconnect but give it back on connect? I figure it is similar to the weapon save which I have, I'm just not really familiar with PAWNO yet.


Re: Armor saving - rangerxxll - 14.09.2011

On top
pawn Код:
new LastArmour
On player disconnect
pawn Код:
GetPlayerArmour(playerid, LastArmour[playerid]);
On player spawn
pawn Код:
SetPlayerArmour(playerid, LastArmour[playerid]);
That should work.


Re: Armor saving - dr.pepper - 14.09.2011

Quote:
Originally Posted by rangerxxll
Посмотреть сообщение
On top
pawn Код:
new LastArmour
On player disconnect
pawn Код:
GetPlayerArmour(playerid, LastArmour[playerid]);
On player spawn
pawn Код:
SetPlayerArmour(playerid, LastArmour[playerid]);
That should work.
pawn Код:
new LastArmour;
pawn Код:
new LastArmour[MAX_PLAYERS];



Re: Armor saving - rangerxxll - 14.09.2011

Quote:
Originally Posted by dr.pepper
Посмотреть сообщение
pawn Код:
new LastArmour;
pawn Код:
new LastArmour[MAX_PLAYERS];
Hey, I almost answered a scripting question correctly, considering I'm a new scripter


Re: Armor saving - cessil - 14.09.2011

you'd need to use a float not an integer