Saving varables.
#1

I have my own registration and login system, and I want to save some variables like,

HaveBomb[MAX_PLAYERS];

HaveBomb checks if someone have a a bomb, and when the player exit save it, like:

I buyed a bomb, than I exit and when I turn my self online again, the bomb still there.

Take a look at my Registration and Login system:

http://pawn.pastebin.com/m6d62618
Reply
#2

So what's the problem? You don't know how? You do it the same as you save all your other variables.

dUserSetINT(PlayerName(playerid)).("bomb",HaveBomb[playerid]);

That will save the HaveBomb value for the playerid to his file when he disconnected.

EDIT: to get the variable back:

HaveBomb[playerid] = dUserINT(PlayerName(playerid)).("bomb");
Reply
#3

just that? '_'
Reply
#4

Yes, dudb does a lot of the work for you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)