How to save and load health and armour using y_ini
#1

How to save and load health and armour using y_ini?
Reply
#2

This is not a tutorial / request section. Just lookup an y_ini tutorial / check the documentation and use the wiki
Reply
#3

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)