Help with Saving
#1

SOLVED. Thanks

Peace...
Reply
#2

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)
Reply
#3

Use [pawn] tags next time, please.
Reply
#4

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...
Reply
#5

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
}
Reply
#6

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...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)