[Include] OnPlayerReceiveMoney - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (
https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] OnPlayerReceiveMoney (
/showthread.php?tid=404824)
OnPlayerReceiveMoney -
Plovix - 04.01.2013
Hi,I'm gonna to show you my new callback!
It's called everytime when player increase his money value...
PHP код:
public OnPlayerReceiveMoney(playerid, amount)
Credits:
******: For creating hook method
Kalcor: For creating SA:MP
Me: For creating this
Download:
Mediafire
Pastebin
Re: OnPlayerReceiveMoney -
XtremeR - 04.01.2013
Pretty cool! +6
Re: OnPlayerReceiveMoney -
DiGiTaL_AnGeL - 04.01.2013
Usefull, good work.
Re: OnPlayerReceiveMoney -
RedCrossER - 04.01.2013
Looks good and usefull , good work
Re: OnPlayerReceiveMoney -
dr.lozer - 07.01.2013
so simple
EDIT: update this and make OnPlayerLostMoney.. then it would be great!
Re: OnPlayerReceiveMoney -
DiReCt hIt - 07.01.2013
Nice Include
.
Re: OnPlayerReceiveMoney -
vMapper - 07.01.2013
@dr.lozer, the code which you wrote is long. This include is to help make codes shorter.
Good job, Plovix!
Re: OnPlayerReceiveMoney -
SupremeCommander - 07.01.2013
Quote:
Originally Posted by dr.lozer
so simple
EDIT: update this and make OnPlayerLostMoney.. then it would be great!
|
Yes but what if I hack money? What if I get money from stunts(if enabled)? You cannot detect these with that snippet.
Re: OnPlayerReceiveMoney -
vMapper - 07.01.2013
Can you add a example code of how to use this include?
Re: OnPlayerReceiveMoney -
Plovix - 08.01.2013
Quote:
Originally Posted by SupremeCommander
Yes but what if I hack money? What if I get money from stunts(if enabled)? You cannot detect these with that snippet.
|
Yes,you can.It's ALWAYS called when player receives money.Was it by server or not!This is great for anticheats and for money recive limit...
@vMapper Here is the example code:
PHP код:
#define MAX_RECEIVEMONEY 10000
//...
public OnPlayerReceiveMoney(playerid, amount)
{
if(amount > MAX_RECEIVEMONEY)
{
SendClientMessage(playerid, -1, "SERVER: You received too much money!");
Kick(playerid)
}
}