13.03.2019, 14:12
PHP код:
tax = (GovTax/100)*PlayerInfo[playerid][pSigncheck];//random(50) + 10;
format(m, sizeof(m), "Tax: %i", tax);
GovTax = 10
Full command
PHP код:
CMD:signcheck(playerid,params[]){
new m[512], tax;
if(TodayPlayingHour[playerid]>300)
{
if(PlayerInfo[playerid][pSavingMoney] > 0)
{
if(PlayerInfo[playerid][pSavingMoney] >= 50000) return SendClientMessage(playerid, COLOR_YELLOW, "You won't recieve anymore interest in saving account, your saving balance has reached maximum.");
SavingMoney[playerid] = PlayerInfo[playerid][pSavingMoney]*5/100; //Gets 2 percents from the savings, i guess it has to be *PERCENTAGE NUMBER WE WANT and divided by 100
PlayerInfo[playerid][pSavingMoney] += 2*SavingMoney[playerid];
}
if(PlayerHaveSigncheck[playerid]==0) return SendClientMessage(playerid, COLOR_RED, "There is no active signcheck.");
PlayerInfo[playerid][pEXP] += 1;
SendClientMessage(playerid, COLOR_GREY, "___________________| Signcheck Received |___________________");
format(m, sizeof(m), "Paycheck: $%i", PlayerInfo[playerid][pSigncheck]);
SendClientMessage(playerid, COLOR_GREY, m);
format(m, sizeof(m), "Savings Bonus: $%i", SavingMoney[playerid]);
SendClientMessage(playerid, COLOR_GREY, m);
SendClientMessage(playerid, COLOR_GREY, "Exp: +1");
tax = (GovTax/100)*PlayerInfo[playerid][pSigncheck];//random(50) + 10;
format(m, sizeof(m), "Tax: %i", tax);
SendClientMessage(playerid, COLOR_GREY, m);
GiveMoney(playerid, -tax);
AvailableGovTax += tax;
GiveMoney(playerid,PlayerInfo[playerid][pSigncheck]);
PlayerInfo[playerid][pSigncheck] = 0;
PlayerHaveSigncheck[playerid]=0;
}else
{
SendClientMessage(playerid, COLOR_RED, "You have to play atleast 5 minutes to obtain check.");
}
return 1;
}