13.05.2012, 21:51
Quote:
Why would you separate SafeGiveMoney into the two if/else statements if they both do the same thing? Are these the only added Money related callbacks?
|
Код:
stock GivePlayerCash(playerid, money) { Cash[playerid] += money; ResetMoneyBar(playerid);//Resets money in the original bar UpdateMoneyBar(playerid,Cash[playerid]);//Puts money in the original bar return Cash[playerid]; } stock SetPlayerCash(playerid, money) { Cash[playerid] = money; ResetMoneyBar(playerid);//Resets money in the original bar UpdateMoneyBar(playerid,Cash[playerid]);//Puts money in the original bar return Cash[playerid]; } stock ResetPlayerCash(playerid) { Cash[playerid] = 0; ResetMoneyBar(playerid);//Resets money in the original bar UpdateMoneyBar(playerid,Cash[playerid]);//Puts money in the original bar return Cash[playerid]; } stock GetPlayerCash(playerid) { return Cash[playerid]; }