SA-MP Forums Archive
Money Saving Problem, for the smart. - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Money Saving Problem, for the smart. (/showthread.php?tid=118633)



Money Saving Problem, for the smart. - bluray - 04.01.2010

Hey i have a save money system on my server because in my server players are ranked by how much money they have. And to help players get started i give them 10,000 on connect. My problems is people might quit then go on to get another 10 000. also btw i dont have a login system.
please help.


Re: Money Saving Problem, for the smart. - ettans - 04.01.2010

You'd need a registration and login system in order to make it work correctly. Simply use something like "startMoney" and save it to the players profile. At OnPlayerConnect check the startMoney, if it's 0, give them $10,000, otherwise don't.

Код:
if(startMoney[playerid] == 0)
{
  GivePlayerMoney(playerid,10000);
  startMoney[playerid] = 1;
}