SA-MP Forums Archive
startmoney 30000... - 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: startmoney 30000... (/showthread.php?tid=359568)



startmoney 30000... - prefex - 14.07.2012

I installed a register system to save money from players when they logout..
but everytime i login my money resets to 30000 please help me


Re: startmoney 30000... - kbalor - 14.07.2012

Your register system don't use save script? What register system you using?


Re: startmoney 30000... - prefex - 14.07.2012

ZAdmin ,,
But i think it has something to do with this
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;

new randSpawn = 0;

SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);


(thats in my gamemode)


Re: startmoney 30000... - kbalor - 14.07.2012

Quote:
Originally Posted by prefex
Посмотреть сообщение
ZAdmin ,,
But i think it has something to do with this
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;

new randSpawn = 0;

SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, 30000);


(thats in my gamemode)
Because of this:

Код:
ResetPlayerMoney(playerid);
Try to remove that and recompile again.


Re: startmoney 30000... - prefex - 14.07.2012

nope doesnt work


Re: startmoney 30000... - prefex - 14.07.2012

nope and i tried to remove ResetPlayerMoney(playerid); and GivePlayerMoney(playerid, 30000);
but that doesnt work either :S i can compile it ,, but it is resetting to 30000 again when i spend some..


Re: startmoney 30000... - kbalor - 14.07.2012

Can you show your onplayerdeath?


Re: startmoney 30000... - prefex - 14.07.2012

aha i fixed it i deleted the ResetPlayerMoney(playerid); and changed GivePlayerMoney(playerid, 30000); to GivePlayerMoney(playerid, 15); and now everytime i log in i get 15 on top of my old money ^^ Thnx fot he help mate ^^