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



OnScriptCash - yom - 11.12.2009

Does anyone know what is this callback, and when is it called?


Re: OnScriptCash - CracK - 11.12.2009

Quote:
Originally Posted by IRC
[0:07:33] <Kye> it doesn't do anything currently
[0:11:50] <Kye> it's meant to show money increases from the GTA SA scm
[0:11:54] <Kye> like ammunation, casino



Re: OnScriptCash - Joe Staff - 11.12.2009

Quote:
Originally Posted by CrαcK
Quote:
Originally Posted by IRC
[0:07:33] <Kye> it doesn't do anything currently
[0:11:50] <Kye> it's meant to show money increases from the GTA SA scm
[0:11:54] <Kye> like ammunation, casino
Can't wait for that to work properly, would make anti-hack just that much closer to perfection.


Re: OnScriptCash - MenaceX^ - 11.12.2009

Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by CrαcK
Quote:
Originally Posted by IRC
[0:07:33] <Kye> it doesn't do anything currently
[0:11:50] <Kye> it's meant to show money increases from the GTA SA scm
[0:11:54] <Kye> like ammunation, casino
Can't wait for that to work properly, would make anti-hack just that much closer to perfection.
****** made in YUP a callback called OnPlayerMoneyChange.


Re: OnScriptCash - Joe Staff - 11.12.2009

Quote:
Originally Posted by MenaceX^
Quote:
Originally Posted by Joe Staff
Quote:
Originally Posted by CrαcK
Quote:
Originally Posted by IRC
[0:07:33] <Kye> it doesn't do anything currently
[0:11:50] <Kye> it's meant to show money increases from the GTA SA scm
[0:11:54] <Kye> like ammunation, casino
Can't wait for that to work properly, would make anti-hack just that much closer to perfection.
****** made in YUP a callback called OnPlayerMoneyChange.
Built in the same method as my current money change detection does. Atleast, I'm assuming.


Re: OnScriptCash - Backwardsman97 - 11.12.2009

OnPlayerMoneyChange will show whenever a player gets money in SA:MP. I think this callback would tell you whenever GTA itself gives money from taxi cabs or casinos and what not.


Re: OnScriptCash - beckzy - 17.12.2009

Where is this callback documented/listed? I have only ever heard of it being rumoured. I've checked a_samp.inc and it's not in there?


Re: OnScriptCash - Jay_ - 17.12.2009

Actually it was in 0.2.5


Re: OnScriptCash - Kurence - 17.12.2009

pawn Код:
new Money[MAX_PLAYERS];
forward OnPlayerMoneyChange(playerid, old, new);

public OnPlayerUpdate(playerid)
{
if(Money[playerid] != GetPlayerMoney(playerid))
{
OnPlayerMoneyChange(playerid, Money[playerid], GetPlayerMoney(playerid));
Money[playerid] = GetPlayerMoney(playerid);
}
return 1;
}
Or something like that??


Re: OnScriptCash - Correlli - 17.12.2009

Quote:
Originally Posted by Kurence
pawn Код:
/* code */
Or something like that??
You've missed the point.

Quote:
Originally Posted by Backwardsman97
OnPlayerMoneyChange will show whenever a player gets money in SA:MP. I think this callback would tell you whenever GTA itself gives money from taxi cabs or casinos and what not.