16.07.2010, 13:50
Код:
public PayDay()
{
new string[50];
for(new i; i<MAX_PLAYERS; i++)
if(logged[i] == 1)
{
{
if(exp[i] <=4)
{
exp[i] +=1;
GivePlayerMoney(i, 1000);
new rent;
rent = (PlayerInfo[i][Banka]/100*bank_rent) - PlayerInfo[i][Banka];
printf("Your current funds : $%d, you gained : $%d", PlayerInfo[i][Banka]+rent, rent);
PlayerInfo[i][Banka] += rent;
format(string, sizeof(string), " ___________________UD_STATEMENT_________________");
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Congratulations, you have now one more experience ");
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Your pocket money is $%d your new exp: %d ", GetPlayerMoney(i), exp[i]);
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Your current bank money is : $%d, you gained : $%d", PlayerInfo[i][Banka]+rent, rent);
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Type /stats to see your updates stats");
SendClientMessage(i, COLOR_BLUE, string);
continue;
}
GivePlayerMoney(i, 1000);
SetPlayerScore(i, GetPlayerScore(i) + 1);
exp[i] = 0;
Score[i] = GetPlayerScore(i);
new rent;
rent = (PlayerInfo[i][Banka]/100*bank_rent) - PlayerInfo[i][Banka];
printf("Your current funds : $%d, you gained : $%d", PlayerInfo[i][Banka]+rent, rent);
PlayerInfo[i][Banka] += rent;
format(string, sizeof(string), " ___________________UD_STATEMENT_________________");
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Congratulations, you have now one more experience ");
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Your pocket money is $%d your new exp: %d ", GetPlayerMoney(i), exp[i]);
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Your current bank money is : $%d, you gained : $%d", PlayerInfo[i][Banka]+rent, rent);
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Congratulations, it is your birthday ");
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "You are now %d year's old ", Score[i]);
SendClientMessage(i, COLOR_BLUE, string);
format(string, sizeof(string), "Type /stats to see your updates stats");
SendClientMessage(i, COLOR_BLUE, string);
continue;
}
}
else
{
SendClientMessage(i, COLOR_GREENBLUE,"You are not yet logged in, so you wont get payday!");
}
return 1;
}
What do I do wrong now it gives 0 interest
I have #define bank_rent 105 at the top of my gamemode

