I want to change the paycheck %% but how ? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: I want to change the paycheck %% but how ? (
/showthread.php?tid=519861)
I want to change the paycheck %% but how ? -
kevin_1991 - 16.06.2014
Hello, I want to change the paycheck but i cant find where it is here is my paycheck code please, can anyone help me with this problem ?
Код:
PayDay(i) {
new
string[128],
interest,
year,
month,
day;
getdate(year, month, day);
if(PlayerInfo[i][pLevel] > 0) {
if(GetPVarType(i, "debtMsg")) {
if(GetPlayerCash(i) < 0 && PlayerInfo[i][pJailTime] < 1 && !IsACop(i) && PlayerInfo[i][pWantedLevel] < 6) {
format(string,sizeof(string),"You're in debt $%s - find a way to pay back the money or you might get in trouble!", number_format(GetPlayerCash(i)));
SendClientMessageEx(i, COLOR_LIGHTRED, string);
}
else DeletePVar(i, "debtMsg");
}
if(0 <= PlayerInfo[i][pRenting] < sizeof HouseInfo) {
if(HouseInfo[PlayerInfo[i][pRenting]][hRentFee] > PlayerInfo[i][pAccount]) {
PlayerInfo[i][pRenting] = INVALID_HOUSE_ID;
SendClientMessageEx(i, COLOR_WHITE, "You have been evicted from your residence for failing to pay rent fees.");
}
else {
HouseInfo[PlayerInfo[i][pRenting]][hSafeMoney] += HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
PlayerInfo[i][pAccount] -= HouseInfo[PlayerInfo[i][pRenting]][hRentFee];
}
}
if(PlayerInfo[i][pConnectSeconds] >= 3600) {
if(GetPVarType(i, "AdvisorDuty")) {
PlayerInfo[i][pDutyHours]++;
}
if(SpecTimer) AddSpecialToken(i);
SendClientMessageEx(i, COLOR_WHITE, "________ BANK STATEMENT ________");
if(PlayerInfo[i][pNation] == 0)
{
format(string, sizeof(string), " Paycheck: $%s | SA Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 100) * TaxValue), TaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * TaxValue;
Tax += (PlayerInfo[i][pPayCheck] / 100) * TaxValue;
}
else if(PlayerInfo[i][pNation] == 1)
{
format(string, sizeof(string), " Paycheck: $%s | TR Gov Tax: $%s (%d percent)", number_format(PlayerInfo[i][pPayCheck]), number_format((PlayerInfo[i][pPayCheck] / 100) * TRTaxValue), TRTaxValue);
PlayerInfo[i][pAccount] -= (PlayerInfo[i][pPayCheck] / 100) * TRTaxValue;
TRTax += (PlayerInfo[i][pPayCheck] / 100) * TRTaxValue;
}
SendClientMessageEx(i, COLOR_GRAD1, string);
interest = (PlayerInfo[i][pAccount] + 1) / 1000;
Thanks.
Re: I want to change the paycheck %% but how ? -
Cutt3r - 16.06.2014
There should be a command for it within the gamemode you have downloaded.
Else find the part that defines the value of [pPayCheck]
Re: I want to change the paycheck %% but how ? -
kevin_1991 - 16.06.2014
Problem is resolved.
CLOSED