SA-MP Forums Archive
Help with 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with Saving (/showthread.php?tid=224482)



Help with Saving: Solved. - Stigg - 11.02.2011

SOLVED. Thanks

Peace...


AW: Help with Saving - Nero_3D - 11.02.2011

just save it with the a key "save" (as example) and the value of 0 and 1's, 1 for picked up, 0 for not
Or you write for each pickup a line like BonusPickup_%d=1| "" = 0 (%d is the id)


Re: Help with Saving - SWEMike - 11.02.2011

Use [pawn] tags next time, please.


Re: AW: Help with Saving - Stigg - 11.02.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
just save it with the a key "save" (as example) and the value of 0 and 1's, 1 for picked up, 0 for not
Or you write for each pickup a line like BonusPickup_%d=1| "" = 0 (%d is the id)
Thanks Nero, could you give me a example plz. I dont understand what you said.

Peace...


AW: Help with Saving - Nero_3D - 11.02.2011

just before you destroy the pickup

pawn Код:
format(winstring, sizeof winstring, "BonusPickup_%d", i);
dini_Set("filename.txt", string, "1");
And how you find out if it got picked up
pawn Код:
if(dini_Get("filename.txt", "BonusPickup_0")) //0 for the first BonusPickup[0]
{
    //Got picked up
} else {
    //Not
}



Re: AW: Help with Saving - Stigg - 11.02.2011

Quote:
Originally Posted by Nero_3D
Посмотреть сообщение
just before you destroy the pickup

pawn Код:
format(winstring, sizeof winstring, "BonusPickup_%d", i);
dini_Set("filename.txt", string, "1");
And how you find out if it got picked up
pawn Код:
if(dini_Get("filename.txt", "BonusPickup_0")) //0 for the first BonusPickup[0]
{
    //Got picked up
} else {
    //Not
}
Thanks for that Nero, just what i needed.

Peace...