23.06.2012, 12:55
the bits in bold..
can anyone give me an idea as to why its doing that? i cant figure it out for the life of me..
+ REP to anyone who can help.
Код:
forward Payday(playerid); public Payday(playerid) { for(new i=0; i <= MAX_PLAYERS; i++) { if ( IsPlayerConnected(i) ) { new oldmoney = GetPlayerMoney(i); new string[48]; SendClientMessage(i,0xFF9900AA,"--------PAYDAY---------"); SendClientMessage(i,0xFF9900AA,"You have earned $3500"); SendClientMessage(i,0xFF9900AA,"PREVIOUS BALANCE"); format(string, sizeof(string), "$%i",oldmoney); SendClientMessage(playerid, 0xFFFFFFAA, string); GivePlayerMoney(i,3500); new pay = GetPlayerMoney(i); if (oldmoney > 10000) { new string2[48]; new interestcal; new interestpay; interestcal = oldmoney * 5.9 / 100; interestpay = interestcal + oldmoney; SendClientMessage(i,0xFF9900AA,"You have received 5.9 percent in interest"); format(string2, sizeof(string2), "Interest:$%i",interestpay); SendClientMessage(playerid, 0xFFFFFFAA, string2); GivePlayerMoney(i,interestpay); } new cash3 = GetPlayerMoney(i); new string3[48]; SendClientMessage(i,0xFF9900AA,"NEW BALANCE"); format(string3, sizeof(string3), "$%i",cash3); SendClientMessage(playerid, 0xFFFFFFAA, string3); SendClientMessage(i,0xFF9900AA,"--------PAYDAY---------"); new string4[48]; new gstcal; new gstpay; gstcal = pay / 100 * 12.5; gstpay = gstcal - oldmoney; SendClientMessage(i,0xFF9900AA,"You have been taxed 12.5 percent"); format(string4, sizeof(string4), "GST: $%i",gstpay); SendClientMessage(playerid, 0xFFFFFFAA, string4); GivePlayerMoney(i,-gstpay); } } return 1; }
+ REP to anyone who can help.