SA-MP Forums Archive
Saving system doesn't work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Saving system doesn't work (/showthread.php?tid=345035)



Saving system doesn't work - wmt - 23.05.2012

Hello guys! I have a trouble. I need a nice saving system for my server (to save money). I want it to be simple. So I decided to use bAdmin (link). The problem is: when I enter the server I have $30.000 (by the way: how to change this sum), then I spend $10-15 and exit the server. When I enter it again I have $30.000. So the saving system doesn't work. What can I do with it? Can you help me, please?

Thanks


Re: Saving system doesn't work - jessejanssen - 23.05.2012

Do you have a save system at all? Like, saving playerstats etc, else it'd be logical for the money resetting to 30K over and over simply because it doesn't load the playerdata on login.

Best regards,
Jesse


Re: Saving system doesn't work - wmt - 23.05.2012

jessejanssen, would you be so kind to help me with my saving system?


Re: Saving system doesn't work - jessejanssen - 23.05.2012

Quote:
Originally Posted by wmt
Посмотреть сообщение
jessejanssen, would you be so kind to help me with my saving system?
I am willing to help you with your saving system but helping is not setting a saving system up for you. I have enough work on my own server/script so I really don't have time to also create a complete database for you, also, if you wouldn't create it yourself you also don't know how to script with it. Just ******/search on SAMP forums how MySQL works and how to set a host up, at least that is what I would recommend as it's pretty much the most efficient and fast way to save stuff.

Best regards,
Jesse


Re: Saving system doesn't work - wmt - 24.05.2012

jessejanssen, thank you very much for your advice. I'll try to cope with this problem myself.


Re: Saving system doesn't work - leonardo1434 - 24.05.2012

Probably Is not saving onplayerdisconnect, Just Add there the lines to save and vuala.


Re: Saving system doesn't work - Ballu Miaa - 24.05.2012

I recommend you to upload your whole game mode on Pastebin.com and we will see what do you need to do.


Re: Saving system doesn't work - wmt - 24.05.2012

Hey guys, sorry for not replying for a long time. Here's my gamemode (grandlarc) on pastebin.com. The problem is that player's score is saved, but not loaded on logging in. And could you tell me why the chat on my server doesn't work?


Re: Saving system doesn't work - Ballu Miaa - 24.05.2012

Quote:
Originally Posted by wmt
Посмотреть сообщение
Hey guys, sorry for not replying for a long time. Here's my gamemode (grandlarc) on pastebin.com. The problem is that player's score is saved, but not loaded on logging in. And could you tell me why the chat on my server doesn't work?
The link says 'Access to this site has been blocked as per Court Orders'

Damn India man. OPIndia fucked it all over! I hope you can upload it on pastebin.ca now.


Re: Saving system doesn't work - spedico - 24.05.2012

Remove these lines from your script:

ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);

Located under OnPlayerSpawn. Lines 73 and 74.