07.12.2015, 00:29
Hi, I'm trying to implement a server side money system on my GM.
In a very old comment in the forum I found this code, but when I try to compile the GM whit it inside, the compilation never ends, no error windows or message shows... Any help?
The code:
Sorry if i misspelled something or if a can't explain myself well, i'm not very good in this lenguage. Regards
In a very old comment in the forum I found this code, but when I try to compile the GM whit it inside, the compilation never ends, no error windows or message shows... Any help?
The code:
PHP Code:
new money[MAX_PLAYERS];
#define UpdatePlayerMoney(%0); if(money[%0] != GetPlayerMoney(%0)) ResetPlayerMoney(playerid); GivePlayerMoney(money[%0]);
#define GivePlayerMoney(%0,%1); money[%0]+=%1; GivePlayerMoney(%0, money[%0]);
#define GetPlayerMoney(%0) money[%0]
public OnPlayerUpdate(%0) UpdatePlayerMoney(%0);