[Include] OnPlayerReceiveMoney
#1

Hi,I'm gonna to show you my new callback!

It's called everytime when player increase his money value...

PHP код:
public OnPlayerReceiveMoney(playeridamount
Credits:

******: For creating hook method
Kalcor: For creating SA:MP
Me: For creating this


Download:

Mediafire

Pastebin
Reply
#2

Pretty cool! +6
Reply
#3

Usefull, good work.
Reply
#4

Looks good and usefull , good work
Reply
#5

so simple

EDIT: update this and make OnPlayerLostMoney.. then it would be great!
Reply
#6

Nice Include .
Reply
#7

@dr.lozer, the code which you wrote is long. This include is to help make codes shorter.

Good job, Plovix!
Reply
#8

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.
Reply
#9

Can you add a example code of how to use this include?
Reply
#10

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(playeridamount)  
{
if(
amount MAX_RECEIVEMONEY)
{
SendClientMessage(playerid, -1"SERVER: You received too much money!");
Kick(playerid)
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)