Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- 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.");
- 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;
- finalinterest = interest;
- PlayerInfo[i][pPayDay] = 0;
- if(PlayerInfo[i][pGiftTime] > 0)
- {
- PlayerInfo[i][pGiftTime] -= 1;
- Update(i, pGiftTimex);
- }
- }
- else
- {
- finalinterest = interest / 2;
- new stringsu[256];
- 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][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][pMotoLicT] > 0)
- {
- PlayerInfo[i][pMotoLicT] -= 1;
- }
- if(PlayerInfo[i][pTruckLicT] > 0)
- {
- PlayerInfo[i][pTruckLicT] -= 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,"** You can use buylevel because you have necessary respect points.");
- }
- }
- 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;
- }
- stock GetWeaponSlot (weaponid)
- {
- switch (weaponid)
- {
- case 0, 1:
- return 0;
- case 2 .. 9:
- return 1;
- case 10 .. 15:
- return 10;
- case 16 .. 19, 39:
- return 8;
- case 22 .. 24:
- return 2;
- case 25 .. 27:
- return 3;
- case 28, 29, 32:
- return 4;
- case 30, 31:
- return 5;
- case 33, 34:
- return 6;
- case 35 .. 38:
- return 7;
- case 40:
- return 12;
- case 41 .. 43:
- return 9;
- case 44 .. 46:
- return 11;
- }
- return 0;
- }
- stock GivePlayerWeaponEx(playerid,weapon,ammo)
- {
- WeaponData[playerid][GetWeaponSlot(weapon)] = true;
- return GivePlayerWeapon(playerid,weapon,ammo);
- }
- stock ResetPlayerWeaponsEx(playerid)
- {
- WeaponData[playerid][0] = false; WeaponData[playerid][1] = false; WeaponData[playerid][2] = false; WeaponData[playerid][3] = false;
- WeaponData[playerid][4] = false; WeaponData[playerid][5] = false; WeaponData[playerid][6] = false; WeaponData[playerid][7] = false;
- WeaponData[playerid][8] = false; WeaponData[playerid][9] = false; WeaponData[playerid][10] = false; WeaponData[playerid][11] = false;
- WeaponData[playerid][12] = false;
- return ResetPlayerWeapons(playerid);
- }
- stock GetWeaponNameEx(id, name[], len) return format(name,len, "%s", GunNames[id]);
- stock RemovePlayerWeapon(playerid, weaponid);
- public RemovePlayerWeapon(playerid, weaponid)
- {
- new plyWeapons[12] = 0,
- plyAmmo[12] = 0;
- for(new sslot = 0; sslot != 12; sslot++)
- {
- new wep, ammo;
- GetPlayerWeaponData(playerid, sslot, wep, ammo);
- if(wep != weaponid && ammo != 0) GetPlayerWeaponData(playerid, sslot, plyWeapons[sslot], plyAmmo[sslot]);
- }
- ResetPlayerWeaponsEx(playerid);
- ResetPlayerWeapons(playerid);
- for(new sslot = 0; sslot != 12; sslot++)
- {
- if(plyAmmo[sslot] != 0) GivePlayerWeaponEx(playerid, plyWeapons[sslot], plyAmmo[sslot]);
- }
- return 1;
- }
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i,
- li,
- aNum,
- len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement