23.07.2015, 13:54
What is printing in the console here?
- Mencent
PHP код:
printf("OnEXP[%i] = %i",i,OnExp[i]);
PlayerData[i][Exp] += 1;
OnExp[i] += 1;
printf("OnEXP[%i] = %i",i,OnExp[i]);
if(OnExp[i] >= 60)
{
printf("OnEXP[i] >= 60",i);
new checks = PlayerData[i][Level] * 300;
new account = PlayerData[i][Bank];
new interest = account / 300;
PlayerData[i][Bank] += interest;
if(PlayerData[i][FPunish] > 0) PlayerData[i][FPunish] -= 1;
SendClientMessage(i, COLOR_WHITE, "________ BANK STATEMENT ________");
format(string, sizeof(string), " Paycheck: $%s", Decimal(checks));
SendClientMessage(i, COLOR_GRAD1, string);
format(string, sizeof(string), " Old Balance: $%s | Interest rate: 0.1%%", Decimal(account));
SendClientMessage(i, COLOR_GRAD1, string);
format(string, sizeof(string), " New balance: $%s", Decimal(PlayerData[i][Bank]));
SendClientMessage(i, COLOR_GRAD5, string);
GivePlayerCash(i, checks);
mysql_format(SQL, str,128,"UPDATE `users` SET `Bank`='%d',`FPunish`='%d' WHERE `ID`='%d' LIMIT 1",PlayerData[i][Bank],PlayerData[i][FPunish],PlayerData[i][ID]);
mysql_tquery(SQL, str, "", "");
OnExp[i] = 0;
printf("OnExp[%i] = 0 (%i)",i,OnExp[i]);
}