Saving player inventory with DOF2 - 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: Saving player inventory with DOF2 (
/showthread.php?tid=653456)
Saving player inventory with DOF2 -
jvdg - 05.05.2018
I wanna save player inventory (FS link:
https://pastebin.com/mb0UeWS7) with DOF2 using this code:
Код:
new LoadInv[24];
new LoadInvQuant[24];
new LoadInvArmour[24];
for(new t=0; t < 15; t++)
{
format(LoadInv, sizeof(LoadInv), "Slot%d", t);
format(LoadInvQuant, sizeof(LoadInvQuant), "Slot%dQuant", t);
format(LoadInvArmour, sizeof(LoadInvArmour), "Slot%dArmour", t);
DOF2_SetInt(RENAME_WITH_ACCOUNT_SAVE_FILE, LoadInv, pInventory[playerid][invSlot][t]);
DOF2_SetInt(RENAME_WITH_ACCOUNT_SAVE_FILE, LoadInvQuant, pInventory[playerid][invSlotAmount][t]);
DOF2_SetFloat(RENAME_WITH_ACCOUNT_SAVE_FILE, LoadInvArmour, pInventory[playerid][invArmourStatus][t]);
DOF2_SaveFile();
}
But I don't know where can I put this. I tried to read some tutorials but I didn't understand. Does anybody know how to use DOF2 in this FS (
https://pastebin.com/mb0UeWS7)?
Thank you...
Re: Saving player inventory with DOF2 -
jvdg - 05.05.2018
Anyone?