How to save and load health and armour using y_ini - 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: How to save and load health and armour using y_ini (
/showthread.php?tid=633650)
How to save and load health and armour using y_ini -
akib - 05.05.2017
How to save and load health and armour using y_ini?
Re: How to save and load health and armour using y_ini -
BiosMarcel - 05.05.2017
This is not a tutorial / request section. Just lookup an y_ini tutorial / check the documentation and use the wiki
Respuesta: How to save and load health and armour using y_ini -
Miguelch1312 - 05.08.2017
You could use for loading:
- INI_Float("Health", playerInfo[playerid][Health]);
- INI_Float("Armour", playerInfo[playerid][Armour]);
- SetPlayerHealth(playerid, playerInfo[playerid][Health]);
- SetPlayerArmour(playerid, playerInfo[playerid][Armour]);
And for save the info:
- GetPlayerHealth(playerid, playerInfo[playerid][Health]);
- GetPlayerArmour(playerid, playerInfo[playerid][Armour]);
- INI_WriteFloat(File, "Health", playerInfo[playerid][Health]);
- INI_WriteFloat(File, "Armour", playerInfo[playerid][Armour]);
The "playerInfo" must be replaced with your own enums