Money saving problem
#1

Hello im using SFCRRPG GM and after relog money will change to $7500

how can i make it stay same? like when you have $12000 and relog, you still have same cash

and in Gm i have:

Код:
  dUserSetINT(PlayerName(playerid)).("money",7500);
  dUserSetINT(PlayerName(playerid)).("bankcash",5000);
  dUserSetINT(PlayerName(playerid)).("loancash",0);
  dUserSetINT(PlayerName(playerid)).("cashinsured",0);
Edit: when i change 7500 to 0 its still 7500! -.-
Reply
#2

AnyOne HelP!?
Reply
#3

I would help, but I don't know that File writter.
Reply
#4

Make sure you are giving cash when connecting
Reply
#5

Quote:
Originally Posted by phillip875
Посмотреть сообщение
I would help, but I don't know that File writter.
its SFCRRPG GameMode By Stevo127

Link: https://sampforum.blast.hk/showthread.php?tid=223963




Quote:
Originally Posted by [MM]RoXoR[FS]
Посмотреть сообщение
Make sure you are giving cash when connecting
What you mean exactly? could you please explain me some more ?
Reply
#6

If you can wait 20minutes or so, I can give you your answer
Reply
#7

Anyway I could change the file writter to dini or DOF2?

Can't find the file writter from the GM
Reply
#8

im waiting , and Thanks
Reply
#9

Mind posting the OnPlayerConnect and OnPlayerDisconnect code? Then I can help.

EDIT: Never mind. Add this to the top of your script below the defines etc.

pawn Код:
enum pInfo
{
    pCash,
}
pawn Код:
new PlayerInfo[MAX_PLAYERS][pInfo];

forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{

    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    return 1;
}
Now under OnPlayerDisconnect put this.

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_Close(File);
    return 1;
}
Reply
#10

Quote:
Originally Posted by phillip875
Посмотреть сообщение
Anyway I could change the file writter to dini or DOF2?

Can't find the file writter from the GM
i dont think so because there are :
Army Group - Cia Group - Regular players - Admin system ... In it !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)