Jump to content

LolyAdv

Member
  • Posts

    1,268
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by LolyAdv

  1. apropo, trebuie sa ai peste 1000 de secunde, daca nu-ti da nici acum inseamna ca ai probleme la acel sistem, nu la payday.
  2. poftim: public PayDay() { new string[128], str[256], string3[128], interest, account[MAX_PLAYERS], hour, minn, sec, expamount, rent[MAX_PLAYERS]; gettime(hour,minn,sec); foreach(Player,i) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pLevel] >= 0) { new wakaname[25]; GetPlayerName(i,wakaname,sizeof(wakaname)); if(MoneyMessage[i]==1) { SendClientMessage(i, COLOR_LIGHTRED, "You failed to pay your debt, Jail time."); new rand; rand = random(sizeof(gRandomJailSpawns)); SetPlayerInterior(i, 6); SetPlayerPosEx(i,gRandomJailSpawns[rand][0],gRandomJailSpawns[rand][1],gRandomJailSpawns[rand][2]); PlayerInfo[i][pJailed] = 1; ResetPlayerWeaponsEx(i); ResetPlayerWeapons(i); WantedPoints[i] = 0; PlayerInfo[i][pJailTime] = 240; format(string, sizeof(string), "You are jailed for %d seconds. Bail: Unable", PlayerInfo[i][pJailTime]); SendClientMessage(i, COLOR_LIGHTBLUE, string); Update(i,pJailedx); Update(i,pJailTimex); TogglePlayerControllable(i, 0); SetTimerEx("UnFreezeStation", 1000, false, "i", i); } new key = PlayerInfo[i][pPhousekey]; if(key != 999) { rent[i] = HouseInfo[key][hRent]; if(rent[i] > GetPlayerCash(i) && strcmp(PlayerInfo[i][pNormalName], HouseInfo[key][hOwner], false) == 0) { PlayerInfo[i][pPhousekey] = 999; Update(i,pPhousekeyx); } HouseInfo[key][hTakings] += rent[i]; mysql_format(SQL,str,sizeof(str),"UPDATE `houses` SET `Takings`='%d' WHERE `ID`='%d'",HouseInfo[key][hTakings],key); mysql_tquery(SQL,str,"",""); } new tmpintrate; if(PlayerInfo[i][pPremiumAccount] == 1) { tmpintrate = 2; new bonus = PlayerInfo[i][pPayCheck] / 2; PlayerInfo[i][pPayCheck] += bonus; } else { tmpintrate = 1; } account[i] = PlayerInfo[i][pAccount]; Tax += TaxValue; PlayerInfo[i][pAccount] -= TaxValue; new checks = PlayerInfo[i][pPayCheck]; PlayerInfo[i][pAccount] += checks; interest = (PlayerInfo[i][pAccount]/1000)*(tmpintrate); new finalinterest; SendClientMessage(i, COLOR_TEAL, "----------------------------------------------------------------------------"); SendClientMessage(i, COLOR_WHITE, "Your paycheck has arrived; please visit the bank to withdraw your money."); new stringsu[256]; if(PlayerInfo[i][pRob] < 20) { PlayerInfo[i][pRob]++; } else { SendClientMessage(i, COLOR_WHITE, "Nu ai primit niciun rob/free point pentru ca ai deja 20 rob/free points."); } if(PlayerInfo[i][pPayDay] >= 1800) { PlayerInfo[i][pConnectTime] += 1; Update(i, pConnectTimex); finalinterest = interest; PlayerInfo[i][pPayDay] = 0; //Update(i, pPayDayx); PlayerInfo[i][pPaydayLuat] += 1; //Update(i, pPaydayLuatx); if(PlayerInfo[i][pGiftTime] > 0) { PlayerInfo[i][pGiftTime] -= 1; Update(i, pGiftTimex); } if(PlayerInfo[i][pPremiu] > 0) { PlayerInfo[i][pPremiu] -= 1; Update(i, pPremiux); } } else { finalinterest = interest / 2; format(stringsu,sizeof(stringsu),"Ai primit doar jumatate din dobanda de la banca pentru ca ai jucat doar %d minute din aceasta ora (31 necesare pentru dobanda intreaga).",PlayerInfo[i][pPayDay]/60+1); SendSplitMessage(i, COLOR_LIGHTBLUE, stringsu); } PlayerInfo[i][pExp] += 1; PlayerInfo[i][pAccount] += finalinterest; format(string, sizeof(string), "Paycheck: $%s | Bank balance: $%s | Bank interest: $%s | Tax: $%s (10 percent)", FormatNumber(checks), FormatNumber(PlayerInfo[i][pAccount]), FormatNumber(finalinterest), FormatNumber(TaxValue)); SendClientMessage(i, COLOR_GREY, string); format(string3, sizeof(string3), "Rent: $%s | Total earnings: $%d", FormatNumber(rent[i]), checks-TaxValue); SendClientMessage(i, COLOR_GREY, string3); SendClientMessage(i, COLOR_TEAL, "----------------------------------------------------------------------------"); format(string, sizeof(string), "~y~PAYDAY"); GameTextForPlayer(i, string, 5000, 1); if(PlayerInfo[i][pPremiu] == 0) { SendClientMessage(i, COLOR_WHITE, "Tasteaza comanda /premiu deoarece ai primit acces."); } if(PlayerInfo[i][pMember] >= 0) { PlayerInfo[i][pPaydayuri] += 1; Update(i, pPaydayurix); } if(PlayerInfo[i][pCarLicT] > 0) { PlayerInfo[i][pCarLicT] -= 1; } if(PlayerInfo[i][pFlyLicT] > 0) { PlayerInfo[i][pFlyLicT] -= 1; } if(PlayerInfo[i][pBoatLicT] > 0) { PlayerInfo[i][pBoatLicT] -= 1; } if(PlayerInfo[i][pGunLicT] > 0) { PlayerInfo[i][pGunLicT] -= 1; } if(PlayerInfo[i][pFpunish] > 0) { PlayerInfo[i][pFpunish]--; } if(PlayerInfo[i][pFpunish] < 0) { PlayerInfo[i][pFpunish] = 0; } if(PlayerInfo[i][pCarLicSuspend] > 0) { PlayerInfo[i][pCarLicSuspend]--; Update(i, pCarLicSuspendx); if(PlayerInfo[i][pCarLicSuspend] == 0) SendClientMessage(i, COLOR_YELLOW, "* Licenta ta de condus a fost confiscata recent. Acum poti merge din nou la scoala de soferi pentru a lua licenta din nou."); } if(PlayerInfo[i][pGunLicSuspend] > 0) { PlayerInfo[i][pGunLicSuspend]--; Update(i, pGunLicSuspendx); if(PlayerInfo[i][pGunLicSuspend] == 0) SendClientMessage(i, COLOR_YELLOW, "* Licenta ta de arme a fost confiscata recent. Acum poti da din nou testul cu un instructor pentru a lua licenta din nou."); } if(IsACop(i)) { PlayerInfo[i][pLawyer] += 1; } PlayerInfo[i][pPayCheck] = 0; if(PlayerInfo[i][pLevel] == 1 || PlayerInfo[i][pLevel] == 2 || PlayerInfo[i][pLevel] == 3 || PlayerInfo[i][pLevel] == 4) { expamount = PlayerInfo[i][pLevel]*2; if(PlayerInfo[i][pExp] >= expamount) { SCM(i,COLOR_LIGHTBLUE,"Poti tasta comanda /buylevel."); } } else if(PlayerInfo[i][pLevel] >= 5) { expamount = PlayerInfo[i][pLevel]*3; if(PlayerInfo[i][pExp] >= expamount) { SCM(i,COLOR_LIGHTBLUE,"** You can use buylevel because you have necessary respect points."); } } } } } for(new x = 0; x < MAX_GROUPS; x++) { DynamicFactions[x][fBank] += DynamicFactions[x][fPaydayMoney]; mysql_format(SQL,str,sizeof(str),"UPDATE `factions` SET `Bank`='%d' WHERE `ID`='%d'",DynamicFactions[x][fBank],x); mysql_tquery(SQL,str,"",""); } return 1; }
  3. Nu trebuie neaparat sa fie direct la onplayerdisconnect, poate fi intr-o functie gen "despawnaremasini" si sa fie apelata la onplayerdisconnect.
  4. Iti este lene sa copii tot public PayDay sau function PayDay sau cum ai tu si sa pui aici? Da-mi-l si-l modific eu daca are vreo problema.
  5. Stergi toate functiile de despawnare la vehicule personale. Te iei dupa cum este facut sistemul de vehicule si mai faci sloturi pur si simplu.
  6. Vreau toata functia payday, nu doar aia save.
  7. Lasa aici toata functia payday.
  8. Username: LolyAdv. Vârstă: 16. Ce vinzi?: Panel pentru SAMP v2. Dovada (că ești în posesia produsului): Nu cred ca trebuie, prezentarea este aici: si prima versiune unde arat mai multe Preț: 25 de euro, accept si foarte multi bani og-times. Detalii de contact: LolyAdv#1155 pe discord. Alte precizări: Panel-ul este full compatibil cu gamemode-ul: https://leaks.ro/index.php?/topic/1236-vand-mod-de-joc-eternal-times-ultimate/
×
×
  • Create New...