Guten Tag,
Die Public Payday wird leider nicht mehr ausgelöst:
Hier gebe ich den wert ein bei 60 sollte er einen Payday haben der wert wird auch größer aber eh geht ins unendliche
public paydaytimer()
{
ForAllPlayers(i){
if(PlayerInfo[i][pJailed] != 2){
PlayerInfo[i][pPayDay] += 1;
}}
return 1;
}
public PayDay(i)
{
new string[128],
PaydayZinsen,
account,
Stromkosten,
HouseRent,
Respekt,
Zinsen,
playername[MAX_PLAYER_NAME];
if(IsPlayerConnected(i)){
if(PlayerInfo[i][pLevel] > 0){
if(PlayerInfo[i][pPayDay] >= 60){
new Level = PlayerInfo[i][pLevel];
if(Level >= 0 && Level <= 2) { PlayerInfo[i][pPayCheck] += 600; }
else if(Level >= 3 && Level <= 4) { PlayerInfo[i][pPayCheck] += 1000; }
else if(Level >= 5 && Level <= 6) { PlayerInfo[i][pPayCheck] += 1400; }
else if(Level >= 7 && Level <= 8) { PlayerInfo[i][pPayCheck] += 1800; }
else if(Level >= 9 && Level <= 10) { PlayerInfo[i][pPayCheck] += 2200; }
else if(Level >= 11 && Level <= 12) { PlayerInfo[i][pPayCheck] += 2600; }
else if(Level >= 13 && Level <= 14) { PlayerInfo[i][pPayCheck] += 3000; }
else if(Level >= 15 && Level <= 16) { PlayerInfo[i][pPayCheck] += 3600; }
else if(Level >= 17 && Level <= 18) { PlayerInfo[i][pPayCheck] += 4000; }
else if(Level >= 19 && Level <= 20) { PlayerInfo[i][pPayCheck] += 4400; }
else if(Level >= 21) { PlayerInfo[i][pPayCheck] += 5000; }
GetPlayerName(i, playername, sizeof(playername));
account = PlayerInfo[i][pBank];
new HouseKey = PlayerInfo[i][pPhousekey];
new BizKey = PlayerInfo[i][pBizKey];
if(HouseKey != -1){
HouseRent = HouseInfo[HouseKey][hRent];
if(strcmp(playername, HouseInfo[HouseKey][hOwner], true) == 0){HouseRent = 0;}
else if(HouseRent > PlayerInfo[i][pCash]){
PlayerInfo[i][pPhousekey] = -1;
SendClientMessage(i, COLOR_ERRORTEXT, " Dein Mieter hat dich aus der Wohnung geschmissen !");
HouseRent = 0;
}
HouseInfo[HouseKey][hKasse] += HouseRent;
}
if(PlayerInfo[i][pBank] > 0){
if(HouseKey != -1 && strcmp(playername, HouseInfo[HouseKey][hOwner], true) == 0 || BizKey != -1){
format(string, sizeof(string), " Stromkosten: -%s$", GetPoint(Stromkosten));
SendClientMessage(i, COLOR_GRAD1, string);
Stromkosten = PlayerInfo[i][pBank]/20000;
PlayerInfo[i][pBank] -= Stromkosten;
SBizInfo[4][sbTill] += Stromkosten/100*10;
ExtortionSBiz(4, Stromkosten/100*5);
}
else
{
Stromkosten = 0;
}
}
else
{
Stromkosten = 0;
}
PlayerInfo[i][pPayDayHad] += 1;
Respekt = MinRespekt;
new GehaltCheck = PlayerInfo[i][pPayCheck];
GivePlayerMoneys(i, GehaltCheck);
if(PlayerInfo[i][pDonatorRank] == 0)
{
if(PlayerInfo[i][pPayDayHad] >= 4)
{
if(PlayerInfo[i][pBikeLicPoints] >= 2)
{
PlayerInfo[i][pBikeLicPoints] -= 2;
}
else if(PlayerInfo[i][pBikeLicPoints] >= 1)
{
PlayerInfo[i][pBikeLicPoints] -= 1;
}
if(PlayerInfo[i][pCarLicPoints] >= 2)
{
PlayerInfo[i][pCarLicPoints] -= 2;
}
else if(PlayerInfo[i][pCarLicPoints] >= 1)
{
PlayerInfo[i][pCarLicPoints] -= 1;
}
}
if(PlayerInfo[i][pPayDayHad] == 1 || PlayerInfo[i][pPayDayHad] == 3)
{
PaydayZinsen = 1;
}
if(PlayerInfo[i][pPayDayHad] >= 4)
{
PlayerInfo[i][pPayDayHad] = 0;
}
Zinsen = MinZinsen;
}
else if(PlayerInfo[i][pDonatorRank] == 1)
{
if(PlayerInfo[i][pPayDayHad] >= 4)
{
if(PlayerInfo[i][pBikeLicPoints] >= 2)
{
PlayerInfo[i][pBikeLicPoints] -= 2;
}
else if(PlayerInfo[i][pBikeLicPoints] >= 1)
{
PlayerInfo[i][pBikeLicPoints] -= 1;
}
if(PlayerInfo[i][pCarLicPoints] >= 2)
{
PlayerInfo[i][pCarLicPoints] -= 2;
}
else if(PlayerInfo[i][pCarLicPoints] >= 1)
{
PlayerInfo[i][pCarLicPoints] -= 1;
}
}
if(PlayerInfo[i][pPayDayHad] == 2 || PlayerInfo[i][pPayDayHad] >= 4)
{
Respekt += 1;
}
if(PlayerInfo[i][pPayDayHad] == 1 || PlayerInfo[i][pPayDayHad] == 3)
{
PaydayZinsen = 1;
}
if(PlayerInfo[i][pPayDayHad] >= 4)
{
PlayerInfo[i][pPayDayHad] = 0;
}
Zinsen = MinZinsen;
}
else if(PlayerInfo[i][pDonatorRank] >= 2)
{
if(PlayerInfo[i][pPayDayHad] >= 4)
{
if(PlayerInfo[i][pBikeLicPoints] >= 2)
{
PlayerInfo[i][pBikeLicPoints] -= 2;
}
else if(PlayerInfo[i][pBikeLicPoints] >= 1)
{
PlayerInfo[i][pBikeLicPoints] -= 1;
}
if(PlayerInfo[i][pCarLicPoints] >= 2)
{
PlayerInfo[i][pCarLicPoints] -= 2;
}
else if(PlayerInfo[i][pCarLicPoints] >= 1)
{
PlayerInfo[i][pCarLicPoints] -= 1;
}
}
if(PlayerInfo[i][pPayDayHad] == 2 || PlayerInfo[i][pPayDayHad] >= 4)
{
Respekt += 2;
}
if(PlayerInfo[i][pPayDayHad] == 1 || PlayerInfo[i][pPayDayHad] == 3)
{
PaydayZinsen = 1;
}
if(PlayerInfo[i][pPayDayHad] >= 4)
{
PlayerInfo[i][pPayDayHad] = 0;
}
Zinsen = MinZinsen+1;
}
#pragma unused PaydayZinsen
#pragma unused Zinsen
new Steuern = (PlayerInfo[i][pLevel]*StuffInfo[sSteuern]);
PlayerInfo[i][pBank] -= Steuern;
PlayerInfo[i][pBank] -= HouseRent;
StuffInfo[sSteuerkasse] += Steuern;
StuffInfo[sEinnahmen] += Steuern;
SendClientMessage(i, COLOR_BEIGE, string);
SendClientMessage(i, COLOR_BEIGE, "|-----------------Gehalts-Check------------------|");
format(string, sizeof(string), " Gehalt: %s$ Steuern: -%s$", GetPoint(GehaltCheck), GetPoint(Steuern));
SendClientMessage(i, COLOR_GREY, string);
format(string, sizeof(string), " Neuer Stand: %s$", GetPoint(PlayerInfo[i][pBank]));
SendClientMessage(i, COLOR_BEIGE, string);
format(string, sizeof(string), " Alter Kontostand: %s$", GetPoint(account));
SendClientMessage(i, COLOR_BEIGE, string);
if(HouseRent > 0)
{
format(string, sizeof(string), " Miete: -$%d", HouseRent);
SendClientMessage(i, COLOR_BEIGE, string);
}
format(string, sizeof(string), "~y~PayDay~n~~w~Zahltag");
GameTextForPlayer(i, string, 5000, 1);
PlayerInfo[i][pRespekt] += Respekt;
PlayerInfo[i][pPayDay] = 0;
PlayerInfo[i][pPayCheck] = 0;
PlayerInfo[i][pConnectTime] += 1;
if(PlayerInfo[i][pKreditkarte] == 1)
{
PlayerInfo[i][pKreditkartenkosten] += 700;
format(string, sizeof(string), "Kreditkarte: {FF0000}-%d$",PlayerInfo[i][pKreditkartenkosten]);
SendClientMessage(i, COLOR_BEIGE, string);
PlayerInfo[i][pBank] -= PlayerInfo[i][pKreditkartenkosten];
PlayerInfo[i][pKreditkartenkosten] = 0;
}
if(PlayerInfo[i][pFestPD]>=1){PlayerInfo[i][pFestPD]-=1;}
else if(!PlayerInfo[i][pFestPD] && PlayerInfo[i][pFestgeld] != 0)
{
new tmp_brx = floatround(float(PlayerInfo[i][pFestgeld])*0.035);
format(string,sizeof(string),"Die Bank dir $%d überwiesen + einen Zinssatz von ca. 3%% ($%d)", PlayerInfo[i][pFestgeld], tmp_brx);
SendClientMessage(i,-1,string);
PlayerInfo[i][pBank]+=tmp_brx;
PlayerInfo[i][pFestgeld]=0;
PlayerInfo[i][pFestPD]=0;
}
new exp = PlayerInfo[i][pRespekt], nxtlevel = PlayerInfo[i][pLevel]+1, expamount = nxtlevel*levelexp;
if(exp >= expamount)
{
GameTextForPlayer(i, "LEVEL UP", 5000, 0);
PlayerInfo[i][pLevel] += 1;
PlayerInfo[i][pRespekt] = 0;
}
if(PlayerInfo[i][pCarLicPoints] >= 10)
{
PlayerInfo[i][pCarLicPoints] = 0;
new wielange = (LicensSperreTage*24*60*60);
new Zeit = wielange+Time();
PlayerInfo[i][pCarLic] = Zeit;
PlayerInfo[i][pLKWLic] = Zeit;
SendClientMessage(i, COLOR_LIGHTBLUE, "Dir wurde vom Staat deine License zum Führen eines Fahrzeuges entzogen.");
}
if(PlayerInfo[i][pBikeLicPoints] >= 10)
{
PlayerInfo[i][pBikeLicPoints] = 0;
new wielange = (LicensSperreTage*24*60*60);
new Zeit = wielange+Time();
PlayerInfo[i][pBikeLic] = Zeit;
PlayerInfo[i][pLKWLic] = Zeit;
SendClientMessage(i, COLOR_LIGHTBLUE, "Dir wurde vom Staat deine License zum Führen eines Fahrzeuges entzogen.");
}
if(strcmp(PlayerInfo[i][pWerberName], "Niemand", true) != 0)
{
if(PlayerInfo[i][pConnectTime] >= 36)
{
ForAllPlayers(ii){
if(IsPlayerConnected(ii) && gPlayerLogged[ii]){
GetPlayerName(ii, playername, sizeof(playername));
new playername2[MAX_PLAYER_NAME];
if(strcmp(playername, PlayerInfo[i][pWerberName], true) == 0)
{
GetPlayerName(i, playername2, sizeof(playername2));
if(PlayerInfo[ii][pDonatorRank] == 2)
{
}
else
{
PlayerInfo[ii][pDonatorRank] = 1;
}
PlayerInfo[ii][pRespekt] += 2;
strmid(PlayerInfo[i][pWerberName], "Niemand", 0, strlen("Niemand"), 255);
format(string, sizeof(string), "[System Info] %s hat dich als Werber angegeben! Du erhälst 2 Respektpunkte.", playername2);
SendClientMessage(ii, COLOR_LIGHTBLUE2, string);
break;
}}}}}
}
}
}
return 1;
}
Danke im vorraus,
Mfg,