Trouble with money sometimes - 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: Trouble with money sometimes (
/showthread.php?tid=261167)
Trouble with money sometimes -
Homer Jay Simpson - 12.06.2011
Hey guys,
I have a bug on my server. SOMETIMES (very rare) it happens that if you connect to the server your money is on MINUS although you had some money before disconnecting. I cant find absolutely nothing suspicious on the script. I have an own antimoneycheat system by a serversided money variable pMoney[MAX_PLAYERS].
For this I dont use GivePlayerMoney but my own function ac_GivePlayerMoney which is this:
stock ac_GivePlayerMoney(playerid, money)
{
pMoney[playerid] += money;
GivePlayerMoney(playerid, money);
}
same with SetPlayerMoney:
stock ac_SetPlayerMoney(playerid, money)
{
pMoney[playerid] = money;
ResetPlayerMoney(playerid);
GivePlayerMoney(playerid, money);
}
do you have any ideas ? Maybe a known problem ?
thx for reading