18.09.2013, 21:45
Hello guys, so I'm trying to configure a code it, I'm asking you guys how do you detect for example like if you're decreasing the player's money, using
and if you like increase the player's money you're using
Since the +(plus) sign is already on the stock I made, does any one have an idea, like detecting the player's money if it is decrasing or increasing, this is a quick sketch or example of it
pawn Код:
GivePlayerMoneyEx(playerid, -5000);
pawn Код:
GivePlayerMoneyEx(playerid, 5000);
pawn Код:
stock GivePlayerMoneyEx(playerid, ammount)
{
new string[24];
OldMoney[playerid] = GetPlayerMoney(playerid);
NewMoney[playerid] += ammount;
GivePlayerMoney(playerid, ammount);
//if it is +(plus) sign
format(string, sizeof(string), "+%d", ammount);
// else
// if it is -(minus) sign
format(string, sizeof(string), "-%d", ammount);
GameTextForPlayer(playerid, string, 2000, 1);
return 1;
}