Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PayDay()
- {
- for(new i = 1; i < MAX_ADMINS; i++)
- {
- if(!IsPlayerConnected(GetPlayerIDS(AdminInfo[aIme])))
- {
- AdminInfo[aNeakt] ++;
- SaveAdmin(i);
- }
- }
- if(dupliexp == 1)
- {
- for(new i = 0; i < MAX_IGRACA; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PI[pLevel] > 0)
- {
- PI[pExp]++;
- }
- }
- }
- }
- if(dupliexpn == 1)
- {
- for(new i = 0; i < MAX_IGRACA; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PI[pLevel] < 4)
- {
- PI[pExp]++;
- }
- }
- }
- }
- for(new i = 0; i < MAX_IGRACA; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PI[pLevel] > 0)
- {
- if(MoneyMessage==1)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Niste platili vas dug, vreme je za zatvor.");
- GameTextForPlayer(i, "~r~Uhapsen si!", 2000, 1);
- JBC_TogglePlayerControllable(i, 0);
- new djura = random(sizeof(gZatvorSpawn));
- JBC_SetPlayerPos(i, gZatvorSpawn[djura][0], gZatvorSpawn[djura][1], gZatvorSpawn[djura][2]);
- PI[pJailed] = 1;
- SetPlayerVirtualWorld(i, 1);
- JBC_ResetPlayerWeapons(i);
- PI[pJailTime] += 300;
- }
- //POREZ
- new vdracun;
- new gdracun;
- new ebill;
- new interest;
- if(PI[pPhousekey] != 2555)
- {
- ovobrate += 100 + random(50);
- }
- if(PI[pPbiskey] != 255)
- {
- ovobrate += 100 + random(50);
- }
- if(PI[pPstankey] != 255)
- {
- ovobrate += 100 + random(50);
- }
- PI[pAccount] -= ovobrate;
- SCMF(i, -1, "** Vas ukupan porez je: $%d, taj novac vam je oduzet iz banke!",ovobrate);
- ovobrate = 0;
- //KREDIT PODIGNUT
- if(PI[pBankKredit] > 0)
- {
- new rand = random(200)+1000;
- PI[pAccount] -= rand;
- SCMF(i, -1, " Oduzeto vam je iz banke $%d, jer ste dizali kredit.",rand);
- SCMF(i, -1, " Da bi podigli novi kredit, morate prvo otplatiti ovaj.");
- PI[pBankKredit] -= rand;
- }
- if(PI[pPayDay] >= 5)
- {
- Tax += TaxValue;//Should work for every player online
- PI[pAccount] -= TaxValue;
- if(PI[pAccount] > 0)
- {
- new randovann = random(300)+300;
- interest = randovann;
- PI[pExp]++;
- PlayerPlayMusic(i);
- PI[pAccount] += interest;
- new smrdic1[256];
- new smrdic[513];
- new stringpl[64];
- format(smrdic1,256,"{00FFEE}Stecen Interes: {FFFFFF}$%d\n{00FFEE}Racun za struju: {FFFFFF}$%d\n{00FFEE}Racun za vodu: {FFFFFF}$%d\n{00FFEE}Racun za komunalije: {FFFFFF}$%d\n{00FFEE}Porez na imovinu: {FFFFFF}$%d\n",interest,ebill,vdracun,gdracun,ovobrate);
- format(smrdic,sizeof(smrdic),"%s",smrdic1);
- format(stringpl, sizeof(stringpl), "~y~PayDay");
- SPD(i,6,DIALOG_STYLE_MSGBOX," IZVESTAJ NARODNE BANKE",smrdic,"OK","");
- GameTextForPlayer(i, stringpl, 5000, 1);
- PI[pPayCheck] = 0;
- PI[pConnectTime]++;
- }
- else
- {
- SendClientMessage(i, COLOR_WHITE, "* Niste igrali dovoljno dugo da biste dobili platu.");
- }
- new nxtlevel = PI[pLevel]+1;
- new expamount = nxtlevel*levelexp;
- new infostring[128];
- if (PI[pExp] >= expamount)
- {
- PI[pLevel]++;
- PI[pExp] = 0;
- PI[gPupgrade] = PI[gPupgrade]+2;
- new rucakxd[300];
- format(rucakxd, sizeof(rucakxd), "~g~LEVEL UP~n~~w~Sada si level %d !", nxtlevel);
- GameTextForPlayer(i, rucakxd, 5000, 1);
- format(infostring, 256, "[ LEVEL UP ] Sada ste level %d. Cestitamo!", nxtlevel);
- SendClientMessage(i, COLOR_RED, infostring);
- format(infostring, 256, "Imate %d nepotrosenih Upgrade Poena",PI[gPupgrade]);
- SendClientMessage(i, BELA, infostring);
- SetPlayerScore(i, PI[pLevel]);
- }
- }
- if(PI[pVip] == 4 || PI[pOSC] >= 1)
- {
- PI[pExp]++;
- }
- if(PI[pOSC] > 0)
- {
- SCM(i, BELA, " Ti si administrator i dobio si 2000$ na bankovni racun !");
- PI[pAccount] += 2000;
- }
- if(PI[pHelper] > 0)
- {
- SCM(i, BELA, " Ti si helper i dobio si 1500$ na bankovni racun !");
- PI[pAccount] += 1500;
- }
- if(PI[pOSC] < 1 && PI[pMember] > 0)
- {
- SCM(i, BELA, " Ti si clan organizacije i dobio si 300$ na bankovni racun !");
- PI[pAccount] += 300;
- }
- if(PI[pOSC] < 1 && PI[pLeader] > 0)
- {
- SCM(i, BELA, " Ti si lider organizacije i dobio si 500$ na bankovni racun !");
- PI[pAccount] += 500;
- }
- }
- }
- }
- SaveAccounts();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment