27.04.2013, 17:33
Hey, problem is that SOMETIMES, players dont get a paycheck.
It usually works fine, but when there are many online it won't give the paycheck [SOMETIMES]
It usually works fine, but when there are many online it won't give the paycheck [SOMETIMES]
Код:
if(Minute >= 59 && Second == 59) { SetWorldTime(Hour+1); format(str, sizeof(str), "The time is now %d:00.", Hour+1); SendClientMessageToAll(GREY, str); PlayerStat[i][PlayingHours]++; if(PlayerStat[i][SecondsLoggedIn] > 100) { SendClientMessage(i, GREY, "-------------------------------------------------------------"); SendClientMessage(i, WHITE, "Paycheck time!"); if(PlayerStat[i][Paycheck] == 0) { SendClientMessage(i, WHITE, "You have been given $50 as for the Prison Payday, Didn't get anything from your job."); GiveMoney(i, 50); if(PlayerStat[i][FactionID] > 0) { GiveMoney(i, 250); SendClientMessage(i, LIGHTBLUE, "You have been given $250 Extra Because of being a member of the DoC."); } if(PlayerStat[i][GangID] > 0) { GiveMoney(i, 150); SendClientMessage(i, WHITE, "You have been given $150 from the gang's drug dealing [Gang Paycheck]."); } if(PlayerStat[i][pVIP] == 1) { GiveMoney(i, 100); SendClientMessage(i, WHITE, "As you're a Regular VIP you got 100$."); } else if(PlayerStat[i][pVIP] == 2) { GiveMoney(i, 250); SendClientMessage(i, WHITE, "As you're a Silver VIP you got 250$."); } else if(PlayerStat[i][pVIP] == 3) { GiveMoney(i, 375); SendClientMessage(i, WHITE, "As you're a Premium VIP you got 375$."); } } else { format(str, sizeof(str), "You have received $%d and an extra of $75. you can withdraw them from your locker.", PlayerStat[i][Paycheck]); SendClientMessage(i, WHITE, str); PlayerStat[i][LockerMoney] += PlayerStat[i][Paycheck]; PlayerStat[i][Paycheck] = 0; GiveMoney(i, 75); if(PlayerStat[i][FactionID] > 0) { GiveMoney(i, 250); SendClientMessage(i, LIGHTBLUE, "You have been given $250 Extra Because of being a member of the DoC."); } if(PlayerStat[i][GangID] > 0) { GiveMoney(i, 150); SendClientMessage(i, WHITE, "You have been given $150 from the gang's drug dealing [Gang Paycheck]."); } if(PlayerStat[i][pVIP] == 1) { GiveMoney(i, 100); SendClientMessage(i, WHITE, "As you're a Regular VIP you got 100$."); } else if(PlayerStat[i][pVIP] == 2) { GiveMoney(i, 250); SendClientMessage(i, WHITE, "As you're a Silver VIP you got 250$."); } else if(PlayerStat[i][pVIP] == 3) { GiveMoney(i, 375); SendClientMessage(i, WHITE, "As you're a Premium VIP you got 375$."); } if(PlayerStat[i][JobID] >= 1) return PlayerStat[i][HoursInJob]++; } } else return SendClientMessage(i, WHITE, "You must be logged in for 5 minutes at least to receive a paycheck."); } }