Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BPS::PayDay()
- {
- new Conta,interest, dia, mes, ano;
- new rent = 0;
- timeinc = 0;
- teveguerra=false;
- teveprevisao=false;
- ResetSeq();
- new stringpayday[128];
- getdate(ano, mes, dia);
- format( stringpayday, sizeof stringpayday, "%s",VerSemana(dia,mes,ano));
- TextDrawSetString(Reloginho3, stringpayday);
- foreach(Player, i)
- {
- SetPVarInt(i, #VarFlood1, 0);
- SetPVarInt(i, #VarFlood2, 0);
- SetPVarInt(i, #VarFlood3, 0);
- SetPVarInt(i, #VarFlood4, 0);
- SetPVarInt(i, #VarFlood5, 0);
- SetPVarInt(i, #VarFlood6, 0);
- SetPVarInt(i, #VarFlood7, 0);
- SetPVarInt(i, #VarFlood8, 0);
- SetPVarInt(i, #VarFlood9, 0);
- SetPVarInt(i, #VarFlood10, 0);
- SetPVarInt(i, #VarFlood11, 0);
- SetPVarInt(i, #VarFlood13, 0);
- SetPVarInt(i, #VarFlood14, 0);
- SetPVarInt(i, #VarGranaBar1, 0);
- SetPVarInt(i, #VarGranaBar2, 0);
- SetPVarInt(i, #VarGranaBar3, 0);
- SetPVarInt(i, #VarGranaBar4, 0);
- SetPVarInt(i, #VarGranaBar5, 0);
- SetPVarInt(i, #VarFloodLocalizar, 0);
- SetPVarInt(i, #VarFloodsprunk, 0);
- SetPVarInt(i, "VarDano", 0);
- SetPVarInt(i, "timeLastVeh", 0);
- if(gPlayerLogged[i])
- {
- if(PlayerInfo[i][pLevel] > 0)
- {
- if(MoneyMessage[i]==1)
- {
- SendClientMessage(i, COR_TRIADS, "Você devia ter debitado suas dívidas, lhe enviaram um pedido de prisão.");
- GameTextForPlayer(i, "~r~apreendido !", 2000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i, 264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailed] = 1;
- ResetPlayerWeapons(i);
- WantedPoints[i] = 0;
- PlayerInfo[i][pJailTime] = 240;
- format(stringpayday, sizeof(stringpayday), "Você foi preso por %d segundos. Fiança: Desativada", PlayerInfo[i][pJailTime]);
- SendClientMessage(i, COLOR_LIGHTBLUE, stringpayday);
- }
- new playername2[MAX_PLAYER_NAME];
- GetPlayerName(i, playername2, sizeof(playername2));
- new key = PlayerInfo[i][pPHousekey];
- if(key != 500)
- {
- rent = HouseInfo[key][hRent];
- if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0)
- {
- rent = 0;
- }
- else if(rent > GetPlayerMoney(i))
- {
- PlayerInfo[i][pPHousekey] = 500;
- SendClientMessage(i, COLOR_WHITE, "Você foi expulso(a).");
- rent = 0;
- }
- HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
- }
- new tmpintrate;
- if(PlayerInfo[i][pVIP] == 1)
- {
- tmpintrate = 14;
- PlayerInfo[i][pExp]+=2;
- }
- else if(PlayerInfo[i][pVIP] == 2)
- {
- tmpintrate = 18;
- PlayerInfo[i][pExp]+=5;
- }
- else if(PlayerInfo[i][pVIP] == 5)
- {
- tmpintrate = 24;
- PlayerInfo[i][pExp]+=10;
- }
- else if(PlayerInfo[i][pVIP] == 6)
- {
- tmpintrate = 30;
- PlayerInfo[i][pExp]+=13;
- }
- else
- {
- tmpintrate = 6;
- PlayerInfo[i][pExp]++;
- }
- if(PlayerInfo[i][pPayDay] >= 3)
- {
- //new Conta = PlayerInfo[i][pConta];
- Tax += TaxValue;//Shorld work for every player online
- new Aleatoriedade = random(2000);
- new Aleatoriedade2 = random(9999);
- if(Aleatoriedade < 10000) Aleatoriedade += Aleatoriedade2;
- PlayerInfo[i][pConta] -= TaxValue;
- new checks = PlayerInfo[i][pSalario]*Aleatoriedade;
- new ebill = PlayerInfo[i][pLevel]*1000;
- new Febill = random(1500);
- new PGLT = random(300000);
- if(PGLT < 100000) PGLT += 100000;
- if(checks > 200000) checks = Aleatoriedade;
- if(checks < 30000) checks += 30000;
- if(checks < 0) checks = 100000;
- GiveDinheiro(i, checks);
- GiveDinheiro(i, -TaxValue);
- if(PlayerInfo[i][pConta] > 0)
- {
- PlayerInfo[i][pConta] -= ebill;
- SBizzInfo[4][sbTill] += ebill;
- PLO += ebill;
- DepositarOrgGrana(7,ebill);
- }
- else
- {
- ebill = 0;
- }
- Conta = PlayerInfo[i][pConta];
- interest = (PlayerInfo[i][pConta]/1000)*(tmpintrate);
- PlayerPlaySound(i, 1185, 0.0, 0.0, 0.0);
- //SgD = PlayerInfo[i][pLevel]*1000;
- PlayerInfo[i][pConta] = Conta+interest;
- //PlayerInfo[i][pConta] = Conta+SgD;
- DepositarOrgGrana(7,TaxValue);
- SendClientMessage(i, 0x808080AA, "» ~~~~~~~~ Salario {33CCFF}Project Show {808080}~~~~~~~~");
- format(stringpayday, sizeof(stringpayday), "» Pagamento:{00FF00} R$%d {808080}Imposto: {FF0000}-R$%d", checks, TaxValue);
- SendClientMessage(i, 0x808080AA, stringpayday);
- format(stringpayday, sizeof(stringpayday), "» Plano de saude: {FF0000}-R$300");
- SendClientMessage(i, 0x808080AA, stringpayday);
- if(PlayerInfo[i][pPHousekey] != 500 || PlayerInfo[i][pPbiskey] != 255)
- {
- format(stringpayday, sizeof(stringpayday), "» Energia [%s]: {FF0000}-R$%d ", SBizzInfo[4][sbMessage], ebill);
- SendClientMessage(i, 0x808080AA, stringpayday);
- PMH += Febill;
- PDU += Febill;
- SacarOrgGrana(7,Febill);
- }
- if(PlayerInfo[i][pPFazkey] != 255)
- {
- format(stringpayday, sizeof(stringpayday), "» Empresa d'agua: {FF0000}-R$%d", ebill);
- SendClientMessage(i, 0x808080AA, stringpayday);
- PME += Febill;
- PDU += Febill;
- SacarOrgGrana(7,Febill);
- }
- if(Conta > 0)
- {
- format(stringpayday, sizeof(stringpayday), "» Conta Bancaria: {00FF00}R$%s", ConvertMoney(Conta));
- SendClientMessage(i, 0x808080AA, stringpayday);
- }
- else
- {
- format(stringpayday, sizeof(stringpayday), "» Conta Bancaria: {FF0000}R$-%s", ConvertMoney(Conta));
- SendClientMessage(i, 0x808080AA, stringpayday);
- }
- format(stringpayday, sizeof(stringpayday), "» Juros: {00FF00}0.%d {B4B5B7}por cento {808080}Aluguel: {FF0000}-R$%d",tmpintrate, rent);
- SendClientMessage(i, 0x808080AA, stringpayday);
- format(stringpayday, sizeof(stringpayday), "» Valor ganho com Juros {33FF00}R$%d", interest);
- SendClientMessage(i, 0x808080AA, stringpayday);
- SalarioPlayer(i);
- SendClientMessage(i, 0x808080AA, "» ~~~~~~~~ Salario {33CCFF}Project Show {808080}~~~~~~~~");
- DepositarOrgGrana(7,interest);
- if(PlayerInfo[i][pConta] > 1)
- {
- format(stringpayday, sizeof(stringpayday), "» Novo Saldo Bancario: {00FF00}R$%s", ConvertMoney(PlayerInfo[i][pConta]));
- SendClientMessage(i, 0x808080AA, stringpayday);
- }
- else if(PlayerInfo[i][pConta] < 1)
- {
- format(stringpayday, sizeof(stringpayday), "» Novo Saldo Bancario: {FF0000}-R$%s", ConvertMoney(PlayerInfo[i][pConta]));
- SendClientMessage(i, 0x808080AA, stringpayday);
- }
- if(PlayerInfo[i][pLider] == 7)
- {
- if(CofreOrg[7][Dinheiro] >= 1000000)
- {
- PGLT = random(2000);
- }
- format(stringpayday, sizeof(stringpayday), " Lucros do Governo: {00FF00}R$%s", ConvertMoney(PGLT));
- SendClientMessage(i, COLOR_LIGHTBLUE, stringpayday);
- DepositarOrgGrana(7,PGLT);
- }
- if(PlayerInfo[i][pEmprego] > 0)
- {
- if(PlayerInfo[i][pContractTime] < 5)
- {
- PlayerInfo[i][pContractTime] ++;
- }
- }
- SetTimerEx("PararMusica", 7900, 0, "i", i);
- GameTextForPlayer(i, "~g~Salario~n~~w~BPS", 5000, 1);
- rent = 0;
- PlayerInfo[i][pPayDay] = 0;
- PlayerInfo[i][pCaixinha] = 0;
- PlayerInfo[i][pCaixaCash] = 0;
- PlayerInfo[i][pSalario] = 0;
- PlayerInfo[i][pLimparb] = 0;
- PlayerInfo[i][pConnectTime] += 1;
- if(PlayerInfo[i][pTempoConce] != 0)
- {
- PlayerInfo[i][pTempoConce] -= 1;
- }
- if(PlayerInfo[i][pTempoConce] <= 0)
- {
- PlayerInfo[i][pTempoConce] = 0;
- }
- if(MoneyMessage[i]==1)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Você não pagou a sua dívida e foi preso.");
- GameTextForPlayer(i, "~r~Preso!", 2000, 1);
- SetPlayerInterior(i, 6);
- SetPlayerPos(i, 264.6288,77.5742,1001.0391);
- PlayerInfo[i][pJailed] = 1;
- ResetPlayerWeapons(i);
- WantedPoints[i] = 0;
- storeexit[i] = 66;
- SetPlayerWantedLevelEx(i, 0);
- PlayerInfo[i][pJailTime] = 240;
- format(stringpayday, sizeof(stringpayday), "Você foi preso por %d segundos.", PlayerInfo[i][pJailTime]);
- SendClientMessage(i, COLOR_LIGHTBLUE, stringpayday);
- }
- Atividade[i][dia]++;
- SalvarAtividade(i);
- }
- else
- {
- SendClientMessage(i, COLOR_LIGHTRED, "* Você não jogou tempo suficiente para receber salário!");
- }
- }
- }
- new lolbagui;
- lolbagui = PlayerInfo[i][pExp];
- new nxtlevel = PlayerInfo[i][pLevel]+1;
- if(lolbagui >= nxtlevel*levelexp)
- {
- GameTextForPlayer(i, "~w~~h~Respeito Adquirido~n~~g~Digite /comprarnivel", 5000, 1);
- }
- }
- if(TriadMatou > HitmanMatou){
- format(stringpayday, 128, "Sua Organização Ganhou o Kit Bônus {FFFF00}[Contratos Triad %d x %d Contratos Hitmans]", TriadMatou, HitmanMatou);
- SendFamilyMessage(22, 0xFFFFFFFF, stringpayday);
- OrgVencedora = 22;
- }
- else if(HitmanMatou > TriadMatou){
- format(stringpayday, 128, "Sua Organização Ganhou o Kit Bônus {FFFF00}[Contratos Hitman %d x %d Contratos Triad]", HitmanMatou, TriadMatou);
- SendFamilyMessage(8, 0xFFFFFFFF, stringpayday);
- OrgVencedora = 8;
- }
- else{
- //format(stringpayday, 128, "[BONUS]: Nenhuma agência de assassinos ganhou o kit bônus neste payday.");
- OrgVencedora = 0;
- }
- TriadMatou = 0;
- HitmanMatou = 0;
- //SendClientMessageToAll(0xFFFF00FF, stringpayday);
- for(new i; i != MAX_TERRITORIOS; i++)
- {
- if(trLS[i][trCreated])
- trLS[i][trLiberarGuerra] = 0;
- }
- for(new k=1; k != MAX_ORGS; k++)
- {
- if(RadioDesativado[k] == 1)
- RadioDesativado[k] = 0;
- }
- Checkproop();
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement