Quote:
Originally Posted by Hayden_Bruin
This should work but i'm not 100% sure.
pawn Код:
#define GivePlayerMoney GivePlayerCash //So you can still use GivePlayerMoney(playerid, amount); and don't have to worry about changing all of them. stock GivePlayerCash(playerid,amount) { GivePlayerMoney(playerid, amount); //give the player the amount you put. SetPlayerScore(playerid, GetPlayerMoney(playerid)); //set there score to there current money. return 1; }
also note if you have something like serverside money which changes the way you give money you could just put this in
pawn Код:
SetPlayerScore(playerid, GetPlayerMoney(playerid));
If you don't have anything like Server side money (anti cheat) just ignore what i said just above and use the first code i posted. Hopefully that should work.
|
correction:
pawn Код:
stock GivePlayerCash(playerid,amount)
{
#undef GivePlayerCash
GivePlayerMoney(playerid, amount); //give the player the amount you put.
#define GivePlayerCasg GivePlayerMoney
SetPlayerScore(playerid, GetPlayerMoney(playerid)); //set there score to there current money.
return 1;
}