Hallo Community hab hier mal mein Payday system erstellt allerdings bin ich mir nicht sicher ob das so funktioniert und die Prämiumränge sollen mehr Zinsen bekommen wo stell ich das ein.
hier mal mein system
PlayerInfo[i][pGesamtMinutes]++;
PlayerInfo[i][pMinutesSinceLogin]++;
PlayerInfo[i][pMinutesSinceAn]++;
if(PlayerInfo[i][pPlayMinutes] <= 60)
{
PlayerInfo[i][pPlayMinutes]++;
}
if(PlayerInfo[i][pPlayMinutes] >= 60)
{
PlayerInfo[i][pPlayMinutes] = 0;
new string[128];
new account,interest;
new rent = 0;
if(IsPlayerConnected(i))
{
if(M_Bot[i][PAFK] == 0)
{
if(MoneyMessage[i]==1)
{
if(PlayerInfo[i][pJailed] == 0 && WantedLevel[i] >= 0)
{
SendClientMessage(i, COLOR_LIGHTRED, "Du konntest deine Schulden nicht Bezahlen und hast ein Wanted bekommen!");
GivePlayerMoney(i, 1000);
WantedLevel[i]++;
}
else if(PlayerInfo[i][pJailed] == 1)
{
SendClientMessage(i, COLOR_LIGHTRED, "Du bist in den Schulden und musst 3 Minuten länger sitzen!");
PlayerInfo[i][pJailTime] += 180;
GivePlayerMoney(i, 1000);
}
}
new playername2[MAX_PLAYER_NAME];
GetPlayerName(i, playername2, sizeof(playername2));
account = PlayerInfo[i][pAccount];
new key = PlayerInfo[i][pPhousekey];
if(key != 255)
{
rent = HouseInfo[key][hRent];
if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
rent = 0;
}
else if(rent > GetPlayerMoney(i))
{
PlayerInfo[i][pPhousekey] = 255;
SendClientMessage(i, COLOR_WHITE, "Du wurdest aus der Wohnung geschmissen!");
rent = 0;
}
HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
}
new tmpintrate;
if (key != 255 && strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
{
if(PlayerInfo[i][pDonateRank] > 0)
{
tmpintrate = 4;
}
else
{
tmpintrate = 3;
}//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[i][pDonateRank] > 0)
{
tmpintrate = 3;
}
else
{
tmpintrate = 2;
}
}
if(PlayerInfo[i][pPbiskey] > 0)
{
tmpintrate++;
}
new fraktion = 0;
new checks;
if(PlayerInfo[i][pMember] > 0) fraktion = PlayerInfo[i][pMember] - 1;
if(PlayerInfo[i][pLeader] > 0) fraktion = PlayerInfo[i][pLeader] - 1;
if(fraktion >= 0)
{
if(FraktionsKasse[fraktion] - PlayerInfo[i][pGehalt])
{
GivePlayerMoney(i, checks);
checks = PlayerInfo[i][pGehalt];
GivePlayerMoney(i, checks);
FraktionsKasse[fraktion] -= checks;
}
}
else if(PlayerInfo[i][pMember] == 0 || PlayerInfo[i][pLeader] == 0)
{
checks = 2000;
}//Should work for every player online
PlayerInfo[i][pAccount] -= Tax;
FraktionsKasse[6] += Tax;
new ebill = (PlayerInfo[i][pAccount]/12000)*(PlayerInfo[i][pLevel]/2);
//new oil = (PlayerInfo[i][pPhousekey]*100);
ConsumingMoney[i] = 1;
if(PlayerInfo[i][pAccount] > 0)
{
PlayerInfo[i][pAccount] -= ebill;
SBizzInfo[3][sbTill] = SBizzInfo[3][sbTill] + ebill;
}
else
{
ebill = 0;
}
interest = (PlayerInfo[i][pAccount]/1000)*tmpintrate;
if(interest < 0)
{
interest = 0;
}
PlayerInfo[i][pExp]++;
PlayerPlayMusic(i);
PlayerInfo[i][pAccount] = account+interest;
if(checks < 1500)
{
checks = 1500;
GivePlayerMoney(i, checks);
}
SendClientMessage(i, COLOR_GOLD, "|================| KONTOAUSZUG |================|");
format(string, sizeof(string), " Gehalt: $%d Miete: -$%d Steuern: -$%d", checks, rent, Tax);
SendClientMessage(i, COLOR_GRAD1, string);
if(PlayerInfo[i][pPhousekey] != 255 || PlayerInfo[i][pPbiskey] != 255)
{
format(string, sizeof(string), " Strom Kosten: -$%d", ebill);
SendClientMessage(i, COLOR_GRAD1, string);
if(SBizzInfo[5][sbProducts] > 0)
{
AddToBizzTill(5,ebill/2);
ExtortionSBiz(5, ebill/2);
SBizzInfo[5][sbProducts]--;
new string4[160];
if(SBizzInfo[5][sbOwned] == 1)
{
format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[5][sbMessage],SBizzInfo[5][sbOwner],SBizzInfo[5][sbExtortion],SBizzInfo[5][sbEntranceCost],SBizzInfo[5][sbLevelNeeded],SBizzInfo[5][sbProducts],SBizzInfo[5][sbMaxProducts], SBizzInfo[5][sbPriceProd]);
Update3DTextLabelText(SBizzInfo[5][sbText],COLOR_BUYED,string4);
}
}
}
if(PlayerInfo[i][pVersichert] == 1)
{
SendClientMessage(i,COLOR_GRAD2," Krankenversicherung: -$750");
GivePlayerMoney(i, -750);
}
if(PlayerInfo[i][pHandyVer] == 1)
{
SendClientMessage(i,COLOR_GRAD2," Handyvertragskosten: -$100");
GivePlayerMoney(i, -100);
if(SBizzInfo[4][sbProducts] > 0)
{
AddToBizzTill(4,160);
ExtortionSBiz(4,160);
SBizzInfo[4][sbProducts]--;
new string4[160];
if(SBizzInfo[4][sbOwned] == 1)
{
format(string4, sizeof(string4), "[%s]\nInhaber: %s\nTeilhaber: %s\nEintrittspreis: %d$\nLevel: %d\nProdukte: %d/%d\nPreis pro Produkt: %d", SBizzInfo[4][sbMessage],SBizzInfo[4][sbOwner],SBizzInfo[4][sbExtortion],SBizzInfo[4][sbEntranceCost],SBizzInfo[4][sbLevelNeeded],SBizzInfo[4][sbProducts],SBizzInfo[4][sbMaxProducts], SBizzInfo[4][sbPriceProd]);
Update3DTextLabelText(SBizzInfo[4][sbText],COLOR_BUYED,string4);
}
}
}
if(PlayerInfo[i][pPlayerKreditDauer] > 0)
{
PlayerInfo[i][pAccount] -= PlayerInfo[i][pPlayerKredit];
PlayerInfo[i][pPlayerKreditDauer]--;
format(string, sizeof(string), " Kreditrate: -%d", PlayerInfo[i][pPlayerKredit]);
SendClientMessage(i, COLOR_GRAD1, string);
}
format(string, sizeof(string), " Zinsen: $%d [0.%d Prozent]", interest,tmpintrate);
SendClientMessage(i, COLOR_GRAD2, string);
SendClientMessage(i, COLOR_GOLD, "|=================||============||==============|");
format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[i][pAccount]);
SendClientMessage(i, COLOR_GRAD5, string);
format(string, sizeof(string), "~g~PayDay~y~!!!");
GameTextForPlayer(i, string, 5000, 1);
if(checks == 0 && FrakMember(i) && PlayerInfo[i][pJob] == 0)
{
SendClientMessage(i,COLOR_LIGHTRED, "Dein Leader hat dir kein Gehalt gesetzt oder die Fraktionskasse ist leer!");
SendClientMessage(i,COLOR_LIGHTRED, "Fordere ihn auf dir dein Gehalt mit /setlohn einzustellen!");
}
if(PlayerInfo[i][pMember] == 22 || PlayerInfo[i][pLeader] == 22)
{
GivePlayerMoney(i, 25000);
}
rent = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
if(WantedLevel[i] >= 1)
{
WantedLevel[i] --;
new wlevel;
wlevel = GetPlayerWantedLevel(i);
new tmp[64];
format(tmp,sizeof(tmp), "Aktuelles Wantedlevel: %i", wlevel-1);
SendClientMessage(i, COLOR_GREEN,tmp);
}
if(PlayerInfo[i][pDonateRank] > 0)
{
PlayerInfo[i][pPayDayHad] += 1;
if(PlayerInfo[i][pPayDayHad] >= 5)
{
PlayerInfo[i][pExp]++;
PlayerInfo[i][pPayDayHad] = 0;
}
}
if(PlayerInfo[i][pDonateRank] > 1)
{
PlayerInfo[i][pExp] +=2;
PlayerInfo[i][pCoins] +=1;
}
if(PlayerInfo[i][pDonateRank] > 2)
{
PlayerInfo[i][pExp] +=3;
GivePlayerMoney(i,+10000);
PlayerInfo[i][pCoins] +=2;
}
if(PlayerInfo[i][pDonateRank] > 3)
{
PlayerInfo[i][pExp] +=4;
GivePlayerMoney(i,+10000);
PlayerInfo[i][pCoins] +=3;
}
if(PlayerInfo[i][pDonateRank] > 4)
{
PlayerInfo[i][pExp] +=5;
GivePlayerMoney(i,+10000);
PlayerInfo[i][pCoins] +=4;
}
if(PlayerInfo[i][pDonateRank] > 5)
{
PlayerInfo[i][pExp] +=6;
GivePlayerMoney(i,+10000);
PlayerInfo[i][pCoins] +=5;
}
}
else
{
SendClientMessage(i, COLOR_LIGHTRED, "* AFK-Schnorrer bekommen keinen PayDay!!");
}
}
}
mfg Schokodonut