Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PayDay()
- {
- /*if(LottoAuto >= 6)
- {
- new string[256];
- format(string, sizeof(string), "Nouvelle lotterie: Nous avons commence la loterie OGLotto's.");
- OOCOff(COLOR_WHITE, string);
- new rand = random(100);
- if(rand == 0) { new rand2 = random(50);
- rand += rand2; }
- Lotto(rand);
- LottoAuto = 0;
- } else { LottoAuto++; }*/
- new string[256],interest;
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gPlayerLogged[i] == 1 && TempsCM[i] == 1)
- {
- PlayerInfo[i][pPayDayHad] += 1;
- if(PlayerInfo[i][pPayDayHad] >= 6)
- {
- antidm[i] = 0; tabasser[i] = 0; violer[i] = 0;
- if(PlayerInfo[i][pNiveau] >= 1)
- {
- new anciencompte = 0,rent = 0;
- anciencompte = PlayerInfo[i][pAccount];
- if(MoneyMessage[i] == 1)
- {
- if(PlayerInfo[i][pCash] <= 0 && PlayerInfo[i][pAccount] <= 0)
- {
- SendClientMessage(i, COLOR_LIGHTRED, "Vous n'avez pas d'argent, la Banque porte plainte sur vous, vous allez en prison.");
- SetPlayerInterior(i, 10);
- new rand; rand = random(sizeof(PrisonSpawns)); attacher[i] = 1;
- SafeSetPlayerPos(i,PrisonSpawns[rand][0], PrisonSpawns[rand][1], PrisonSpawns[rand][2]);
- PlayerInfo[i][pJailed] = 3; SafeResetPlayerWeapons(i); WantedPoints[i] = 0;
- PlayerInfo[i][pWantedPoint] = 0; PlayerInfo[i][pJailTime] += 240;
- SafeResetPlayerWeapons(i); format(string, sizeof(string), "Vous êtes condamné à la prison pour %d secondes. Mise en liberte sous caution: Impossible", PlayerInfo[i][pJailTime]);
- SendClientMessage(i, COLOR_LIGHTBLUE, string);
- SafeResetMoney(i);
- PlayerInfo[i][pAccount] = 0;
- }
- if(PlayerInfo[i][pCash] >= 1 && PlayerInfo[i][pAccount] <= 0)
- {
- SafeGiveMoney(i, -PlayerInfo[i][pAccount]);
- PlayerInfo[i][pAccount] = 0;
- SendClientMessage(i, COLOR_LIGHTRED, " Vous avez remboursé la Banque! Vous deviez de l'argent ou vous n'aviez pas assez d'argent sur votre compte, vous avez rembourser la banque... ");
- }
- }
- new playername2[MAX_PLAYER_NAME],key = 255,bkey = 255,argentb = 0,salaire = 0;
- GetPlayerName(i, playername2, sizeof(playername2));
- key = PlayerInfo[i][pPhousekey];
- bkey = PlayerInfo[i][pPbiskey];
- new ebill = 0;
- //electriciter Maison
- if(key != 255)
- {
- rent = HouseInfo[key][hRent];
- if(strcmp(playername2, HouseInfo[key][hOwner], true) == 0) {
- rent = 0;
- ebill = HouseInfo[key][hValue]/1000;
- Tax = 30;
- } else if(rent > PlayerInfo[i][pAccount]) {
- PlayerInfo[i][pPhousekey] = 255;
- SendClientMessage(i, COLOR_WHITE, "Vous avez été expulsé.");
- rent = 0;
- ebill = 0;
- } else if(rent < PlayerInfo[i][pAccount]) {
- PlayerInfo[i][pAccount] -= rent;
- ebill = 0;
- }
- HouseInfo[key][hTakings] = HouseInfo[key][hTakings]+rent;
- }
- //electriciter Bizz
- if(bkey != 255) {
- if(strcmp(playername2, BizzInfo[bkey][bOwner], true) == 0) {
- argentb = BizzInfo[bkey][bBuyPrice]/1000;
- ebill = ebill+argentb;
- Tax = 30;
- }
- if(strcmp(playername2, SBizzInfo[bkey][sbOwner], true) == 0) {
- argentb = SBizzInfo[bkey][sbBuyPrice]/1000;
- ebill = ebill+argentb;
- Tax = 30;
- }
- }
- // Jour de paie
- new argenta = 0,carkey = 999,argentfinal = 0;
- carkey = PlayerInfo[i][pPcarkey];
- if(carkey != 999) {
- if(strcmp(playername2, CarInfo[carkey][cOwner], true) == 0) {
- argenta = CarInfo[carkey][cValue]/1000;
- } else {
- argenta = 0;
- }
- }
- // Interrer
- new tmpintrate = 1;
- tmpintrate = 1;
- interest = PlayerInfo[i][pAccount]/1000;
- if(interest <= 1) { interest = 0; }
- if(interest >= 10000) {
- interest = PlayerInfo[i][pNiveau]*100;
- }
- // Salaire
- if(PlayerInfo[i][pMembreFaction] == 2)
- {
- if(PlayerInfo[i][pRank] == 1) { salaire = 500; }
- else if(PlayerInfo[i][pRank] == 2) { salaire = 600; }
- else if(PlayerInfo[i][pRank] == 3) { salaire = 675; }
- else if(PlayerInfo[i][pRank] == 4) { salaire = 750; }
- else if(PlayerInfo[i][pRank] == 5) { salaire = 900; }
- else if(PlayerInfo[i][pRank] == 6) { salaire = 1100; }
- }
- else if(PlayerInfo[i][pMembreFaction] == 4)
- {
- if(PlayerInfo[i][pRank] == 1) { salaire = 600; }
- else if(PlayerInfo[i][pRank] == 2) { salaire = 700; }
- else if(PlayerInfo[i][pRank] == 3) { salaire = 775; }
- else if(PlayerInfo[i][pRank] == 4) { salaire = 850; }
- else if(PlayerInfo[i][pRank] == 5) { salaire = 1000; }
- else if(PlayerInfo[i][pRank] == 6) { salaire = 1200; }
- }
- else if(PlayerInfo[i][pMembreFaction] == 11)
- {
- if(PlayerInfo[i][pRank] == 1) { salaire = 400; }
- else if(PlayerInfo[i][pRank] == 2) { salaire = 550; }
- else if(PlayerInfo[i][pRank] == 3) { salaire = 625; }
- else if(PlayerInfo[i][pRank] == 4) { salaire = 700; }
- else if(PlayerInfo[i][pRank] == 5) { salaire = 800; }
- else if(PlayerInfo[i][pRank] == 6) { salaire = 1000; }
- }
- else if(PlayerInfo[i][pMembreFaction] == 7)
- {
- if(PlayerInfo[i][pRank] == 1) { salaire = 700; }
- else if(PlayerInfo[i][pRank] == 2) { salaire = 775; }
- else if(PlayerInfo[i][pRank] == 3) { salaire = 825; }
- else if(PlayerInfo[i][pRank] == 4) { salaire = 900; }
- else if(PlayerInfo[i][pRank] == 5) { salaire = 1300; }
- else if(PlayerInfo[i][pRank] == 6) { salaire = 1500; }
- }
- else { salaire = 400; }
- PlayerInfo[i][pAccount] += interest; // Interrer
- PlayerInfo[i][pAccount] -= argenta; // Assurance voiture
- PlayerInfo[i][pAccount] -= ebill; // Electriciter
- if(ebill >= 1) { SBizzInfo[4][sbTill] += ebill/20; }
- TaxValue += Tax; PlayerInfo[i][pAccount] -= Tax;
- SendClientMessage(i, COLOR_ORANGE, "|___ BANQUE DE DÉCLARATION ___|");
- format(string, sizeof(string), " Taux d'interêt: %d/100 Interêt acquise %d$",tmpintrate,interest);
- SendClientMessage(i, COLOR_WHITE, string);
- format(string, sizeof(string), " Loyer: -%d$ | Facture d'electricite: -%d$", rent,ebill);
- SendClientMessage(i, COLOR_WHITE, string);
- format(string, sizeof(string), " Salaire: %d$ | Impots: -%d$", salaire, Tax);
- SendClientMessage(i, COLOR_WHITE, string);
- format(string, sizeof(string), " Assurance véhicule: -%d$", argenta);
- SendClientMessage(i, COLOR_GRAD5, string);
- SendClientMessage(i, COLOR_LIGHTRED, "|-----------------------------------------------|");
- format(string, sizeof(string), " Ancien Solde: %d$ | Nouveau Solde: %d$",anciencompte,PlayerInfo[i][pAccount]);
- SendClientMessage(i, COLOR_WHITE, string);
- if(anciencompte > PlayerInfo[i][pAccount]) {
- argentfinal = anciencompte-PlayerInfo[i][pAccount];
- format(string, sizeof(string), " Perte de %d$ sur votre compte en banque.", argentfinal);
- SendClientMessage(i,COLOR_BROWN, string);
- }
- else if(anciencompte == PlayerInfo[i][pAccount]) {
- SendClientMessage(i,COLOR_GREEN, " Aucune perte ou de gain sur votre compte en banque.");
- } else {
- argentfinal = PlayerInfo[i][pAccount]-anciencompte;
- format(string, sizeof(string), " Gain de %d$ sur votre compte en banque.",argentfinal);
- SendClientMessage(i,COLOR_GREEN, string);
- }
- SendClientMessage(i, COLOR_LIGHTBLUE, "|-----------------------------------------------|");
- format(string, sizeof(string), "~y~La Paie");
- GameTextForPlayer(i, string, 5000, 1);
- rent = 0;
- PlayerInfo[i][pPayCheck] = 0; PlayerInfo[i][pPayDayHad] = 1; PlayerInfo[i][pPayDay] = 0;
- PlayerPlayMusic(i); PlayerInfo[i][pExp]++; PlayerInfo[i][pConnectTime] += 1;
- SendClientMessage(i, COLOR_LIGHTGREEN, "|-------------------|");
- SendClientMessage(i, COLOR_GREEN, "Vous avez reçu un point de respect en plus et 100$ pour nous excusez du dérangement pour les comptes");
- PlayerInfo[i][pExp]++; PlayerInfo[i][pAccount] += 100;
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement