CMD:loadpackages(playerid, params[]) { new string[128], packages; // L1: 0 | L2: 100 | L3: 300 | L4: 700 | L5: 1200 if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 100) packages = 5; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 300) packages = 10; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 700) packages = 15; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 1200) packages = 20; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] >= 1200) packages = 25; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pJob] != JOB_TRUCKER && PlayerInfo[playerid][pVIPJob] != JOB_TRUCKER) return SendClientMessage(playerid, COLOR_GREY, "Nu ai job-ul Trucker."); if(PlayerInfo[playerid][pTPackages] == 1) return SendClientMessage(playerid, COLOR_GREY, "Transporti deja."); if(!IsPlayerInAnyVehicle(playerid) || !IsTruckerVehicle(GetPlayerVehicleID(playerid))) return SendClientMessage(playerid, COLOR_GREY, "Nu esti intr-un vehicul corespunzator."); if(!IsPlayerInRangeOfPoint(playerid, 5, -480.1533,-539.1694,25.5296)) return SendClientMessage(playerid, COLOR_GREY, "Nu esti la locul de incarcat."); if(PlayerInfo[playerid][pMoney] < packages*5) return SendClientMessage(playerid, COLOR_GREY, "Nu ai destui bani."); PlayerInfo[playerid][pTPackages] ++; GiveDodMoney(playerid, -(packages*5)); PlayerInfo[playerid][pDeliverTruck] = GetPlayerVehicleID(playerid); TruckPackages[GetPlayerVehicleID(playerid)] = playerid; format(string, sizeof(string), "* %s a incarcat %d de produse pentru a le livra.", RPN(playerid), packages); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); format(string, sizeof(string), "* Ai incarcat {FF6347}%d de produse{33CCFF} pentru {FF6347}$%d{33CCFF}, a le livra la locatie. (Checkpoint)", packages, packages*5); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); SetPlayerCheckpoint(playerid, 2222.5107,-2682.7368,13.5409, 2); return 1; } forward PackTimer(playerid); public PackTimer(playerid) { if(IsPlayerLoggedIn(playerid)) { PackTime[playerid]--; if(PackTime[playerid] > 2) { SetTimerEx("PackTimer", 3600, false, "i", playerid); } } return 1; } CMD:deliverpackages(playerid, params[]) { new string[128], packages, oldj, newj, price; // L1: 0 | L2: 100 | L3: 300 | L4: 700 | L5: 1200 if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 100) packages = 5; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 300) packages = 10; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 700) packages = 15; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] < 1200) packages = 20; else if(PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] >= 1200) packages = 25; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(PlayerInfo[playerid][pJob] != JOB_TRUCKER && PlayerInfo[playerid][pVIPJob] != JOB_TRUCKER) return SendClientMessage(playerid, COLOR_GREY, "Nu ai jobul Trucker."); if(!PlayerInfo[playerid][pTPackages]) return SendClientMessage(playerid, COLOR_GREY, "Nu ai ce sa transporti."); if(PlayerInfo[playerid][pDeliverTruck] != GetPlayerVehicleID(playerid)) return SendClientMessage(playerid, COLOR_GREY, "This is not the vehicle that your packages were loaded to."); if(!IsPlayerInRangeOfPoint(playerid, 5, 2222.5107,-2682.7368,13.5409)) return SendClientMessage(playerid, COLOR_GREY, "You are not near a packages dropoff."); if(Products >= 10000) return SendClientMessage(playerid, COLOR_GREY, "The dropoff can't hold anymore products at the moment."); oldj = strval(RPJL(playerid,JOB_TRUCKER)); PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] ++; if(DayRespect == 1) { PlayerInfo[playerid][pJobSkill][JOB_TRUCKER] ++; } Products += packages; if(Products > 10000) Products = 1000000000; newj = strval(RPJL(playerid,JOB_TRUCKER)); if(PlayerInfo[playerid][pTPackages] == 1) {price = packages*50;} else if(PlayerInfo[playerid][pTPackages] == 2) {price = packages*60;} GiveDodMoney(playerid, price); PlayerInfo[playerid][pDeliverTruck] = -1; TruckPackages[GetPlayerVehicleID(playerid)] = -1; format(string, sizeof(string), "* %s a livrat %d produse.", RPN(playerid), PlayerInfo[playerid][pTPackages]*5); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); format(string, sizeof(string), "* Ai livrat {FF6347}%d produse{33CCFF} de pachete pentru{FF6347}$%d{33CCFF}", PlayerInfo[playerid][pTPackages]*5, price); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); if(oldj < newj) { format(string, sizeof(string), "** Your Trucker level is now %d, you can now carry %d packages. **", newj, newj*5); SendClientMessage(playerid, COLOR_YELLOW, string); } format(string, sizeof(string), "Descarcare Trucker\n{FFFF00}/deliverpackages pentru a descarca\nProduse disponibile: %d/1000000000", Products); UpdateDynamic3DTextLabelText(ProductsText, COLOR_RED, string); PlayerInfo[playerid][pTPackages] = 0; return 1; } Doresc ca la jobul de truker sa pot face de 2 ori la o ora. Comenzile jobului sunt cele de mai sus.