Hi,
bei unserem PayDay system zieht sich die Zeit momentan über 60 Minuten. Eigentlich soll derjenige nach 60 gespielten Minuten 1 RP bekommen, was früher auch einwandfrei ging und jetzt nicht mehr klappt. oO
Das public vom PayDay schaut so aus:
public PayDay(playerid)
{
new string[128];
new account,interest;
new rent = 0;
if(IsPlayerConnected(playerid))
{
SetPlayerGehalt(playerid);
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 > PlayerMoney[playerid])
{
PlayerInfo[playerid][pPhousekey] = 255;
SendClientMessage(playerid, COLOR_WHITE, "Du konntest deine Miete nicht bezahlen, und wurdest rausgeschmissen");
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+0; }//HouseInfo[key][hLevel]
}
else
{
if(PlayerInfo[playerid][pDonateRank] > 0) { tmpintrate = 3; }
else { tmpintrate = 1; }
}*/
Tax += TaxValue;//Should work for every player online
PlayerInfo[playerid][pAccount] -= TaxValue;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
}
new ebill = (PlayerInfo[playerid][pAccount]/10000)*(PlayerInfo[playerid][pLevel]);
new checks = PlayerInfo[playerid][pPayCheck];
ConsumingMoney[playerid] = 1;
// Geld abziehen ^.^
// PlayerInfo[i][pAccount] += Gehalt[i];
// PlayerInfo[i][pAccount] -= Tax;
account += Gehalt[playerid];
account -= Tax;
// Geld abziehen ^.^
if(PlayerInfo[playerid][pAccount] > 0)
{
PlayerInfo[playerid][pAccount] -= ebill;
SBizzInfo[4][sbTill] += ebill;
}
else
{
ebill = 0;
}
if(PlayerInfo[playerid][pMember] == 0 && PlayerInfo[playerid][pLeader] == 0)
{
checks += 500;
}
interest = (PlayerInfo[playerid][pAccount]/1000)*(tmpintrate);
PlayerInfo[playerid][pExp]++;
PlayerPlayMusic(playerid);
PlayerInfo[playerid][pAccount] = account+interest;
SendClientMessage(playerid, COLOR_GREEN, "|___ PAYDAY/ZAHLTAG ___|");
format(string, sizeof(string), " Gehalt: $%d Steuern: -$%d", checks, Tax);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[playerid][pPhousekey] != 255 || PlayerInfo[playerid][pPbiskey] != 255)
{
format(string, sizeof(string), " Stromkosten: -$%d", ebill);
SendClientMessage(playerid, COLOR_WHITE, string);
}
format(string, sizeof(string), " Kontostand: $%d", account);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " Zinssrate: 0.%d Prozent",tmpintrate);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " Zinsen erhalten: $%d", interest);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " Miete: -$%d", rent);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), " Respektpunkte erhalten: 1");
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_WHITE, "|--------------------------------------|");
format(string, sizeof(string), " Neuer Kontostand: $%d", PlayerInfo[playerid][pAccount]);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "~y~Zahltag");
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,5000);
rent = 0;
PlayerInfo[playerid][pPayDay] = 0;
PlayerInfo[playerid][pLoginZeit] = 1;
PlayerInfo[playerid][pConnectTime] -= 3600;
if(PlayerInfo[playerid][pDonateRank] > 0)
{
PlayerInfo[playerid][pPayDayHad] += 1;
if(PlayerInfo[playerid][pPayDayHad] >= 5)
{
PlayerInfo[playerid][pExp]++;
PlayerInfo[playerid][pPayDayHad] = 0;
}
}
}
// Checkprop();
return 1;
}
Währe lieb wenn mir jemand helfen könnte ;D
Gruß