Adding & Saving an amount - 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: Adding & Saving an amount (
/showthread.php?tid=663980)
Adding & Saving an amount -
Proxus - 16.02.2019
I want to create the number of jobs that the whole server has done collectively and add onto it when a player does a job. How would I go about doing this and saving this?
Re: Adding & Saving an amount -
TheToretto - 16.02.2019
Код:
static JobsDone;
JobsDone++; // when player does a job
And save the variable JobsDone using MySQL under OnGameModeInit or whatever saving method you're using.
Re: Adding & Saving an amount -
Proxus - 16.02.2019
Quote:
Originally Posted by TheToretto
Код:
static JobsDone;
JobsDone++; // when player does a job
And save the variable JobsDone using MySQL under OnGameModeInit or whatever saving method you're using.
|
Ah okay MySQL, that's mainly what I wanted to know (how to save it). Thanks!