Abend,
Ich krieg kein Level up, wenn ich Payday bekomme.
public PayDayCheck()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i))continue;
if(sInfo[i][eingeloggt]==0)continue;
new string[64];
if(sInfo[i][Paytime] <= 60)
{
sInfo[i][Paytime] ++;
}
if(sInfo[i][Paytime] >= 60)
{
sInfo[i][Paytime] = 0;
sInfo[i][Exp]++;
new nxtlevel = sInfo[i][Level]+1;
new costlevel = nxtlevel*levelcost;
new expamount = nxtlevel*levelexp;
if(sInfo[i][Exp] >= expamount)
{
sInfo[i][Exp] = 0;
sInfo[i][Level]+=1;
SetPlayerScore(i,sInfo[i][Level]);
GivePlayerMoney(i, (-costlevel));
format(string,sizeof(string),"~g~LEVEL UP");
GameTextForPlayer(i, string, 5000, 1);
}
SendClientMessage(i,-1,"_________________ PayDay _________________");
format(string,sizeof(string),"Fraktionsgehalt: $%d",sInfo[i][FrakGehalt]);
SendClientMessage(i,COLOR_GREY,string);
SendClientMessage(i,-1,"_________________ PayDay _________________");
if(!isPlayerInFrakt(i,0))
{
if(sInfo[i][FrakGehalt] == 0)
{
SendClientMessage(i,COLOR_RED,"Du bekommst keinen Gehalt. Sag deinem Leader bescheid!");
}
else if(sInfo[i][FrakGehalt] >= 0)
{
sInfo[i][bKonto] += sInfo[i][FrakGehalt];
format(string,sizeof(string),"Neuer Kontostand: $%d",sInfo[i][bKonto]);
SendClientMessage(i,COLOR_GREY,string);
}
}
SendClientMessage(i,COLOR_GREY,"Du hast 1 Respektpunkt erhalten.");
}
}
return 1;
}