Saving
#1

I' ve now finished with levels, but when i left the server and next time i joining the server my level is 0...

How to make them saving?
Reply
#2

Do you have a register sytem? if you have that your stats will be saved
Reply
#3

What are you using? Dini/dudb? Or maybe saving system like Godfather has with .ini files, or maybe something else?
Reply
#4

I have ladmin what is for administrators register/login and property system with register/login for players
Reply
#5

Then ask in LAdmin topic.
Reply
#6

I think Ladmin is using dudb, so heres what you need to do.

Код:
OnPlayerDisconnect(playerid) {

  if(PlayerInfo[playerid][LoggedIn] == 1) dUserSetINT(PlayerName(playerid)).("AdminLevel", PlayerInfo[playerid][Level]);
  return 1;
}
Put the code below where player logins

Код:
PlayerInfo[playerid][Level] = (dUserINT(PlayerName(playerid)).("AdminLevel"));
Reply
#7

but levels are located in my gamemode... if i buy example level 1, i left server, next time i join server i have to buy level 1 again.
(i am not talking about admin levels, but i have player levels - if player have, example, buys level 1, he can use command like /healme ,but other players with player level 0 can't use the command!
Reply
#8

can someone help?

edit: sorry for double post
Reply
#9

I suggest you to move all your levels to ladmin. And then do like I said before but instead of "PlayerInfo[playerid][Level]" you put your levels.

I suppose you made it like this
Код:
new level[MAX_PLAYERS];
so you replace this
Код:
dUserSetINT(PlayerName(playerid)).("Levels", PlayerInfo[playerid][Level]);
PlayerInfo[playerid][Level] = (dUserINT(PlayerName(playerid)).("Levels"));
with this
Код:
dUserSetINT(PlayerName(playerid)).("Levels", level[playerid]);
level[playerid] = (dUserINT(PlayerName(playerid)).("Levels"));
OnPlayerConnect
Код:
level[playerid] = 0;
Reply
#10

you didn't understand - ladmin's register and login is for admins only - i've got property system with register and login for players!
so i can't copy my levels to ladmin, also i use strcmp, butin ladmin there is dcmd commands!

edit: i can put levels in my property system, what code then i have to use to save levels?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)