Hallo wollte mal fragen wie ich das machen kann für Premium nen extra Zinsatz das die halt mehr Zinsen kriegen.
Danke schonmal für die hilfe
MFG.
HaxXorr
Hallo wollte mal fragen wie ich das machen kann für Premium nen extra Zinsatz das die halt mehr Zinsen kriegen.
Danke schonmal für die hilfe
MFG.
HaxXorr
welches script nutzt du ?!? ohne daten keine hilfe...^^
MfG Paddy
wo habe ich denn hiuer reingepostet
The Godfather
schhieck mal den auschnitt mit den zinsen
public PayDay(playerid)
{
new string[128];
new gehalt2 = PlayerInfo[playerid][pGehalt];
new account,interest;
new rent = 0;
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLevel] > 0)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
account = PlayerInfo[playerid][pAccount];
new key = PlayerInfo[playerid][pPhousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(playerid))
{
PlayerInfo[playerid][pPhousekey] = 255;
SendClientMessage(playerid, COLOR_WHITE, "Sie wurden vertrieben.");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[playerid][pPayDayHad] >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo[playerid][pAccount] -= TaxValue;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
new bonus = PlayerInfo[playerid][pPayCheck] / 2;
PlayerInfo[playerid][pPayCheck] += bonus;
}
new checks = PlayerInfo[playerid][pPayCheck];
new ebill = (PlayerInfo[playerid][pAccount]/10000)*(PlayerInfo[playerid][pLevel]);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid, checks);
if(PlayerInfo[playerid][pAccount] > 0)
{
PlayerInfo[playerid][pAccount] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo[playerid][pAccount]/1000)*(tmpintrate);
PlayerInfo[playerid][pExp]++;
PlayerPlayMusic(playerid);
PlayerInfo[playerid][pAccount] = account+interest;
SendClientMessage(playerid, COLOR_WHITE, "|___ Zahltag ___|");
format(string, sizeof(string), " Lohn: $%d Steuern: -$%d", checks, TaxValue);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Fraktions Gehalt: %d€", gehalt2);
SendClientMessage(playerid, COLOR_GRAD6, string);
if(PlayerInfo[playerid][pPhousekey] != 255 || PlayerInfo[playerid][pPbiskey] != 255)
{
format(string, sizeof(string), "Stromrechnung: -$%d", ebill);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
format(string, sizeof(string), "Kontostand: $%d", account);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "Zinssatz: 0.%d Prozent",tmpintrate);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "Zinsen: $%d", interest);
SendClientMessage(playerid, COLOR_GRAD3, string);
SendClientMessage(playerid, COLOR_GRAD4, "|--------------------------------------|");
format(string, sizeof(string), "Neuer Kontostand: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD5, string);
format(string, sizeof(string), "Miete: -$%d", rent);
SendClientMessage(playerid, COLOR_GRAD5, string);
format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
GameTextForPlayer(playerid, string, 5000, 1);
rent = 0;
PlayerInfo[playerid][pPayCheck] = 0;
PlayerInfo[playerid][pConnectTime] += 1;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
PlayerInfo[playerid][pPayDayHad] += 1;
if(PlayerInfo[playerid][pPayDayHad] >= 2)
{
PlayerInfo[playerid][pExp]++;
PlayerInfo[playerid][pPayDayHad] = 0;
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "* Du hast nicht lange genug gespielt, um PayDay zu erhalten.");
}
}
}
Checkprop();
return 1;
}
probier es mal so
public PayDay(playerid)
{
new string[128];
new gehalt2 = PlayerInfo[playerid][pGehalt];
new account,interest,zins;
new rent = 0;
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pLevel] > 0)
{
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
account = PlayerInfo[playerid][pAccount];
new key = PlayerInfo[playerid][pPhousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(playerid))
{
PlayerInfo[playerid][pPhousekey] = 255;
SendClientMessage(playerid, COLOR_WHITE, "Sie wurden vertrieben.");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = intrate+4; }
else { tmpintrate = intrate+2; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}
if(PlayerInfo[playerid][pPayDayHad] >= 5)
{
Tax += TaxValue;//Should work for every player online
PlayerInfo[playerid][pAccount] -= TaxValue;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
new bonus = PlayerInfo[playerid][pPayCheck] / 2;
PlayerInfo[playerid][pPayCheck] += bonus;
}
new checks = PlayerInfo[playerid][pPayCheck];
new ebill = (PlayerInfo[playerid][pAccount]/10000)*(PlayerInfo[playerid][pLevel]);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid, checks);
if(PlayerInfo[playerid][pAccount] > 0)
{
PlayerInfo[playerid][pAccount] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
zins = tmpintrate;
if(PlayerInfo[playerid][pDonateRank] > 0) { zins = 5; }// Zinssatz (5%) bei Premium
interest = (PlayerInfo[playerid][pAccount]/1000)*(zins);
PlayerInfo[playerid][pExp]++;
PlayerPlayMusic(playerid);
PlayerInfo[playerid][pAccount] = account+interest;
SendClientMessage(playerid, COLOR_WHITE, "|___ Zahltag ___|");
format(string, sizeof(string), " Lohn: $%d Steuern: -$%d", checks, TaxValue);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Fraktions Gehalt: %d€", gehalt2);
SendClientMessage(playerid, COLOR_GRAD6, string);
if(PlayerInfo[playerid][pPhousekey] != 255 || PlayerInfo[playerid][pPbiskey] != 255)
{
format(string, sizeof(string), "Stromrechnung: -$%d", ebill);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
format(string, sizeof(string), "Kontostand: $%d", account);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), "Zinssatz: 0.%d Prozent",zins);
SendClientMessage(playerid, COLOR_GRAD2, string);
format(string, sizeof(string), "Zinsen: $%d", interest);
SendClientMessage(playerid, COLOR_GRAD3, string);
SendClientMessage(playerid, COLOR_GRAD4, "|--------------------------------------|");
format(string, sizeof(string), "Neuer Kontostand: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD5, string);
format(string, sizeof(string), "Miete: -$%d", rent);
SendClientMessage(playerid, COLOR_GRAD5, string);
format(string, sizeof(string), "~y~PayDay~n~~w~Paycheck");
GameTextForPlayer(playerid, string, 5000, 1);
rent = 0;
PlayerInfo[playerid][pPayCheck] = 0;
PlayerInfo[playerid][pConnectTime] += 1;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
PlayerInfo[playerid][pPayDayHad] += 1;
if(PlayerInfo[playerid][pPayDayHad] >= 2)
{
PlayerInfo[playerid][pExp]++;
PlayerInfo[playerid][pPayDayHad] = 0;
}
}
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "* Du hast nicht lange genug gespielt, um PayDay zu erhalten.");
}
}
}
Checkprop();
return 1;
}
wenn eroors fehler kommen posten
habs hingekriegt danke dir snipe du hast es echt raus
-closed-
Hi,
Brauche das auch,bei mir ist es etwas anders ...
public PayDay(playerid)
{
new string[128];
new account,interest;
new rent = 0;
if(SpielerInfo[playerid][pAge] > 0)
{
if(IsAFK[playerid]!=1)
{
if(MoneyMessage[playerid]==1)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "Du Hast Schulden deswegen musst du nun in den Knast.");
GameTextForPlayer(playerid, "~r~Verhaftet!", 2000, 1);
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,198.3396,162.2801,1003.0300);
SetPlayerFacingAngle(playerid,182.0951);
SpielerInfo[playerid][pJailed] = 1;
ResetPlayerWeapons(playerid);
WantedPoints[playerid] = 0;
SpielerInfo[playerid][pJailTime] = 240;
format(string, sizeof(string), "Du bist im Gefängnis für %d Sekunden. Kaution: nicht möglich", SpielerInfo[playerid][pJailTime]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
account = SpielerInfo[playerid][pAccount];
SpielerInfo[playerid][sMonat] ++;
new key = SpielerInfo[playerid][pPhousekey];
if(key != 999)
{
rent = HouseInfo[key][hRent];
HouseInfo[key][hMuell] += 3;
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(playerid))
{
SpielerInfo[playerid][pPhousekey] = 999;
SendClientMessage(playerid, COLOR_WHITE, "Du hast nicht genug Geld für die Miete, du wurdest Raus geschmissen.");
rent = 0;
}
HouseInfo[key][hMuell] += 3;
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if(SpielerInfo[playerid][pDonateRank] == 1) { tmpintrate = intrate+3; }
else if(SpielerInfo[playerid][pDonateRank] == 2) { tmpintrate = intrate+5; }
else if(SpielerInfo[playerid][pDonateRank] == 3) { tmpintrate = intrate+8; }
else { tmpintrate = intrate+0; }
if(SpielerInfo[playerid][sJob] > 0)
{
if(SpielerInfo[playerid][pContractTime] < 25)
{
SpielerInfo[playerid][pContractTime] ++;
}
}
if(SpielerInfo[playerid][pAge] >= 1) { Tax += TaxValue; SpielerInfo[playerid][pAccount] -= TaxValue; }
new frakgeld, auto1geld, auto2geld, auto3geld, versicherung1geld, versicherung2geld, arggeld, handygeld;
new checks = SpielerInfo[playerid][pPayCheck] / 10;
new jobgeld = SpielerInfo[playerid][pJobGehalt];
new ebill = SBizzInfo[4][sbEntranceCost];
ConsumingMoney[playerid] = 1;
if(SpielerInfo[playerid][pAccount] > 0) { SpielerInfo[playerid][pAccount] -= ebill; SBizzInfo[4][sbTill] += ebill; }
else { ebill = 0; }
if(SpielerInfo[playerid][sLeader] > 0) { SpielerInfo[playerid][pAccount] += 1200; frakgeld = 1200; }
if(SpielerInfo[playerid][pARG] == 1 && verweigerarg == 0) { SpielerInfo[playerid][pAccount] += 395; arggeld = 395; }
if(Dtc_PlayerHaveCar[playerid][0])
{
if(PlayerCar[playerid][0][SteuerKlasse] == 1) { SpielerInfo[playerid][pAccount] -= 140; auto1geld = 140; }
else if(PlayerCar[playerid][0][SteuerKlasse] == 2) { SpielerInfo[playerid][pAccount] -= 140; auto1geld = 140; }
else if(PlayerCar[playerid][0][SteuerKlasse] == 3) { SpielerInfo[playerid][pAccount] -= 210; auto1geld = 210; }
}
else if(Dtc_PlayerHaveCar[playerid][1])
{
if(PlayerCar[playerid][1][SteuerKlasse] == 1) { SpielerInfo[playerid][pAccount] -= 90; auto2geld = 90; }
else if(PlayerCar[playerid][1][SteuerKlasse] == 2) { SpielerInfo[playerid][pAccount] -= 140; auto2geld = 140; }
else if(PlayerCar[playerid][1][SteuerKlasse] == 3) { SpielerInfo[playerid][pAccount] -= 210; auto2geld = 210; }
}
else if(Dtc_PlayerHaveCar[playerid][2])
{
if(PlayerCar[playerid][2][SteuerKlasse] == 1) { SpielerInfo[playerid][pAccount] -= 90; auto3geld = 90; }
else if(PlayerCar[playerid][2][SteuerKlasse] == 2) { SpielerInfo[playerid][pAccount] -= 140; auto3geld = 140; }
else if(PlayerCar[playerid][2][SteuerKlasse] == 3) { SpielerInfo[playerid][pAccount] -= 210; auto3geld = 210; }
}
if(SpielerInfo[playerid][pCarInsurance] == 1) { SpielerInfo[playerid][pAccount] -= 50; versicherung1geld = 50; }
else if(SpielerInfo[playerid][pCarInsurance] == 2) { SpielerInfo[playerid][pAccount] -= 100; versicherung1geld = 100; }
if(SpielerInfo[playerid][pLifeInsurance] == 1) { SpielerInfo[playerid][pAccount] -= 40; versicherung2geld = 40; }
else if(SpielerInfo[playerid][pLifeInsurance] == 2) { SpielerInfo[playerid][pAccount] -= 70; versicherung2geld = 70; }
else if(SpielerInfo[playerid][pLifeInsurance] == 3) { SpielerInfo[playerid][pAccount] -= 120; versicherung2geld = 120; }
if(SpielerInfo[playerid][pHandyVer] == 1) { handygeld = 60; SpielerInfo[playerid][pAccount] -= 60; SBizzInfo[2][sbTill] += 60; ExtortionSBiz(2, 60); }
if(SpielerInfo[playerid][sMember] > 0)
{
if(SpielerInfo[playerid][pRank] == 1) { frakgeld = 400; SpielerInfo[playerid][pAccount] += 400; }
else if(SpielerInfo[playerid][pRank] == 2) { frakgeld = 500; SpielerInfo[playerid][pAccount] += 500; }
else if(SpielerInfo[playerid][pRank] == 3) { frakgeld = 600; SpielerInfo[playerid][pAccount] += 600; }
else if(SpielerInfo[playerid][pRank] == 4) { frakgeld = 700; SpielerInfo[playerid][pAccount] += 700; }
else if(SpielerInfo[playerid][pRank] == 5) { frakgeld = 800; SpielerInfo[playerid][pAccount] += 800; }
else if(SpielerInfo[playerid][pRank] == 6 && SpielerInfo[playerid][sLeader] == 0) { frakgeld = 900; SpielerInfo[playerid][pAccount] += 900; }
}
interest = (SpielerInfo[playerid][pAccount]/1000)*(tmpintrate);
PlayerPlayMusic(playerid);
SpielerInfo[playerid][gPupgrade]++;
SpielerInfo[playerid][pAccount] += jobgeld;
SpielerInfo[playerid][pAccount] += checks;
SpielerInfo[playerid][pAccount] += interest;
SendClientMessage(playerid, COLOR_YELLOW, "|================ GEHALT ================|");
SendClientMessage(playerid, COLOR_WHITE, " ==== EINNAHMEN ====");
format(string, sizeof(string), " Jobverdienst: %d$ Fraktionsgehalt: %d$ Arbeitslosengeld: %d$", jobgeld, frakgeld, arggeld);
SendClientMessage(playerid, COLOR_GRAD1, string);
SendClientMessage(playerid, COLOR_WHITE, " ==== AUSGABEN ====");
if(SpielerInfo[playerid][pAge] >= 1)
{
format(string, sizeof(string), " Steuern: %d$ Miete: %d$ Stromkosten: %d$ Handyvertrag: %d$", TaxValue, rent, ebill, handygeld);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
else
{
format(string, sizeof(string), " Steuern: 0$ Miete: %d$ Stromkosten: %d$ Handyvertrag: %d$", rent, ebill, handygeld);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Autoversicherung: %d$ Krankenkasse: %d$ ", versicherung1geld, versicherung2geld);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Fahrzeug 1: Steuer: %d$ Fahrzeug 2: Steuer: %d$ Fahrzeug 3: Steuern: %d$", auto1geld, auto2geld, auto3geld);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Alter Kontostand: %d$ Zinssatz: 0.%d Prozent", account, tmpintrate);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Zinsen: %d$ Neuer Kontostand: %d$", interest, SpielerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_GRAD3, string);
SendClientMessage(playerid, COLOR_GRAD4, "|===========================================|");
format(string, sizeof(string), "~b~Zahltag! %d/12", SpielerInfo[playerid][sMonat]);
if(SpielerInfo[playerid][sMonat] >= 12)
{
SpielerInfo[playerid][sMonat] = 0;
SpielerInfo[playerid][pAge] ++;
format(string, sizeof(string), "Alles Gute zum Geburtstag! Du bist nun %d Jahre alt geworden.", SpielerInfo[playerid][pAge]);
SendClientMessage(playerid, TEAM_BALLAS_COLOR, string);
if(SpielerInfo[playerid][pPinB] >= 1)
{
SpielerInfo[playerid][pPinB] = SpielerInfo[playerid][pPinB]-10;
if(SpielerInfo[playerid][pPinB] < 0)
{
SpielerInfo[playerid][pPinB] = 0;
}
}
}
GameTextForPlayer(playerid, string, 5000, 1);
OnPropUpdate();
rent = 0;
if(DrugFarmerVar[playerid] == 0)
{
DrugFarmerPickup[playerid][0] = 0;
}
if(PizzaBaeckerVar[playerid] == 0) { PizzaBaeckerPickup[playerid][0] = 0; }
if(SmugglerWork[playerid] == 0) { PayDaySecure[playerid] = 0; }
if(SpielerInfo[playerid][sJob] == 20) { PayDaySecure[playerid] = 0; }
SpielerInfo[playerid][pExp]++;
SpielerInfo[playerid][pPayDay] = 0;
SpielerInfo[playerid][pPayCheck] = 0;
SpielerInfo[playerid][pJobGehalt] = 0;
SpielerInfo[playerid][pConnectTime] += 1;
if(SpielerInfo[playerid][pDonateRank] > 0)
{
SpielerInfo[playerid][pPayDayHad] += 1;
if(SpielerInfo[playerid][pPayDayHad] >= 5)
{
SpielerInfo[playerid][pExp]++;
SpielerInfo[playerid][pPayDayHad] = 0;
}
}
}
else
{
SendClientMessage(playerid,COLOR_RED,"Du bist [A]way [F]rom [K]eyboard und bekommst deswegen kein Payday!");
}
}
Checkprop();
return 1;
}
Danke im vorraus
MFG
hierran musst du arbeiten:
new tmpintrate; if(SpielerInfo[playerid][pDonateRank] == 1) { tmpintrate = intrate+3; } else if(SpielerInfo[playerid][pDonateRank] == 2) { tmpintrate = intrate+5; } else if(SpielerInfo[playerid][pDonateRank] == 3) { tmpintrate = intrate+8; }
hierran musst du arbeiten:
new tmpintrate; if(SpielerInfo[playerid][pDonateRank] == 1) { tmpintrate = intrate+3; } else if(SpielerInfo[playerid][pDonateRank] == 2) { tmpintrate = intrate+5; } else if(SpielerInfo[playerid][pDonateRank] == 3) { tmpintrate = intrate+8; }
Wie muss ich das in mein Script einbauen ?