[Problem]How to autosave Money ( DINI )
#1

I made a /register and /login commands after the instructions of a Tutorial with Dini and dudb but the money don't save when i exit.Please help me!
Reply
#2

someone?
Reply
#3

can paste the commands?
Reply
#4

ahmm.. dini wont save on gmx/disconnect..
my experience..
Reply
#5

Top of you FS or GM
pawn Код:
enum PlayerData
{
    Money,
};
/register
pawn Код:
dUserSetINT(PlayerName2(playerid)).("money",0);
When login:
pawn Код:
PlayerInfo[playerid][Money] = SetPlayerMoney(playerid, dUserINT(PlayerName2(playerid)).("money"));
When Disconnect:
pawn Код:
dUserSetINT(PlayerName2(playerid)).("money",GetPlayerMoney(playerid));
Hope that helps!
Reply
#6

Quote:
Originally Posted by cofy1
Посмотреть сообщение
Top of you FS or GM
pawn Код:
enum PlayerData
{
    Money,
};
/register
pawn Код:
dUserSetINT(PlayerName2(playerid)).("money",0);
When login:
pawn Код:
PlayerInfo[playerid][Money] = SetPlayerMoney(playerid, dUserINT(PlayerName2(playerid)).("money"));
When Disconnect:
pawn Код:
dUserSetINT(PlayerName2(playerid)).("money",GetPlayerMoney(playerid));
Hope that helps!
This helped me lol ty
Reply
#7

error 017: undefined symbol "PlayerName2"

Please help
Reply
#8

pawn Код:
new PlayerName2;
    PlayerName2 = GetPlayerName(playerid);
Reply
#9

Now i get this error
Код:
C:\Documents and Settings\user\Desktop\samp03asvr_R8_win32\gamemodes\begwar.pwn(737) : error 012: invalid function call, not a valid address
C:\Documents and Settings\user\Desktop\samp03asvr_R8_win32\gamemodes\begwar.pwn(737) : warning 215: expression has no effect
C:\Documents and Settings\user\Desktop\samp03asvr_R8_win32\gamemodes\begwar.pwn(737) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\user\Desktop\samp03asvr_R8_win32\gamemodes\begwar.pwn(737) : error 029: invalid expression, assumed zero
C:\Documents and Settings\user\Desktop\samp03asvr_R8_win32\gamemodes\begwar.pwn(737) : fatal error 107: too many error messages on one line
Line 737 :
Код:
dUserSetINT(PlayerName(playerid)).("Cash",GetPlayerMoney(playerid));
Reply
#10

OnPlayerUpdate ... try use that for update stuff
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)