Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(GetPVarType(playerid, "shipperDestinationId1") && mainJobsLocked[MAINJOB_SHIPPER] == false)
- {
- new houseId = GetPVarInt(playerid, "shipperHouseId1");
- if(IsPlayerInRangeOfPoint(playerid, 3.0, characterHouse[houseId][exteriorX], characterHouse[houseId][exteriorY],
- characterHouse[houseId][exteriorZ]))
- {
- new itemId = GetPVarInt(playerid, "shipperItemId1"),
- itemAmountLeft = GetPVarInt(playerid, "shipperItemAmountLeft1");
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS][cItemModel] == businessAvailableItem[itemId][cItemModel])
- {
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS][cNumberOfUses] <= 0)
- {
- switch(characterInventory[playerid][MAX_INVENTORY_ITEMS][cItemModel])
- {
- case ITEM_TYPE_PHONE, ITEM_TYPE_PORTABLE_RADIO:
- default: msg(playerid, COLOR_RED, "Vat pham khong con de co the giao.");
- }
- }
- inventoryRemoveCharacterItem(playerid, MAX_INVENTORY_ITEMS);
- updateInventoryAttachments(playerid);
- if((itemAmountLeft - 1) == 0)
- {
- new itemAmount = GetPVarInt(playerid, "shipperItemAmount1"),
- thistime = gettime(),
- orderTimestamp = GetPVarInt(playerid, "shipperOrderTimestamp1"),
- Packed:string[128];
- new original = businessDefaultItemPrice[itemId] * itemAmount,
- work = randomEx(24, 32) + floatround(itemAmount*4),
- _tips = floatround((60/(thistime-orderTimestamp))*4.5);
- format(string, sizeof(string), "Shipping Order #1: Ban da giao hang cho ngoi nha so '%d', nhan duoc tien goc '%d$'.",
- houseId, original);
- msg(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Shipping Order #1: Tien cong '%d$', tien tips '%d$' se duoc cong vao tai khoan ngan hang cua ban.", work, _tips);
- msg(playerid, COLOR_GREEN, string);
- _givePlayerMoney(playerid, original);
- givePlayerJobDeposits(playerid, work+_tips, 1);
- removePlayerDestination(playerid, GetPVarInt(playerid, "shipperDestinationId1"));
- DeletePVar(playerid, "shipperItemId1");
- DeletePVar(playerid, "shipperItemAmount1");
- DeletePVar(playerid, "shipperDestinationId1");
- DeletePVar(playerid, "shipperHouseId1");
- DeletePVar(playerid, "shipperItemAmountLeft1");
- DeletePVar(playerid, "shipperOrderTimestamp1");
- }
- SetPVarInt(playerid, "shipperItemAmountLeft1", itemAmountLeft-1);
- return 1;
- }
- else if(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cItemModel] == businessAvailableItem[itemId][cItemModel])
- {
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cNumberOfUses] <= 0)
- {
- switch(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cItemModel])
- {
- case ITEM_TYPE_PHONE, ITEM_TYPE_PORTABLE_RADIO:
- default: msg(playerid, COLOR_RED, "Vat pham khong con de co the giao.");
- }
- }
- inventoryRemoveCharacterItem(playerid, MAX_INVENTORY_ITEMS+1);
- updateInventoryAttachments(playerid);
- if((itemAmountLeft - 1) == 0)
- {
- new itemAmount = GetPVarInt(playerid, "shipperItemAmount1"),
- thistime = gettime(),
- orderTimestamp = GetPVarInt(playerid, "shipperOrderTimestamp1"),
- Packed:string[128];
- new original = businessDefaultItemPrice[itemId] * itemAmount,
- work = randomEx(24, 32) + floatround(itemAmount*4),
- _tips = floatround((60/(thistime-orderTimestamp))*4.5);
- format(string, sizeof(string), "Shipping Order #1: Ban da giao hang cho ngoi nha so '%d', nhan duoc tien goc '%d$'.",
- houseId, original);
- msg(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Shipping Order #1: Tien cong '%d$', tien tips '%d$' se duoc cong vao tai khoan ngan hang cua ban.", work, _tips);
- msg(playerid, COLOR_GREEN, string);
- _givePlayerMoney(playerid, original);
- givePlayerJobDeposits(playerid, work+_tips, 1);
- removePlayerDestination(playerid, GetPVarInt(playerid, "shipperDestinationId1"));
- DeletePVar(playerid, "shipperItemId1");
- DeletePVar(playerid, "shipperItemAmount1");
- DeletePVar(playerid, "shipperDestinationId1");
- DeletePVar(playerid, "shipperHouseId1");
- DeletePVar(playerid, "shipperItemAmountLeft1");
- DeletePVar(playerid, "shipperOrderTimestamp1");
- }
- SetPVarInt(playerid, "shipperItemAmountLeft1", itemAmountLeft-1);
- return 1;
- }
- }
- }
- if(GetPVarType(playerid, "shipperDestinationId2") && mainJobsLocked[MAINJOB_SHIPPER] == false)
- {
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS][cNumberOfUses] <= 0)
- {
- switch(characterInventory[playerid][MAX_INVENTORY_ITEMS][cItemModel])
- {
- case ITEM_TYPE_PHONE, ITEM_TYPE_PORTABLE_RADIO:
- default: msg(playerid, COLOR_RED, "Vat pham khong con de co the giao.");
- }
- }
- new houseId = GetPVarInt(playerid, "shipperHouseId2");
- if(IsPlayerInRangeOfPoint(playerid, 3.0, characterHouse[houseId][exteriorX], characterHouse[houseId][exteriorY],
- characterHouse[houseId][exteriorZ]))
- {
- new itemId = GetPVarInt(playerid, "shipperItemId2"),
- itemAmountLeft = GetPVarInt(playerid, "shipperItemAmountLeft2");
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS][cItemModel] == businessAvailableItem[itemId][cItemModel])
- {
- inventoryRemoveCharacterItem(playerid, MAX_INVENTORY_ITEMS);
- updateInventoryAttachments(playerid);
- if((itemAmountLeft - 1) == 0)
- {
- new itemAmount = GetPVarInt(playerid, "shipperItemAmount2"),
- thistime = gettime(),
- orderTimestamp = GetPVarInt(playerid, "shipperOrderTimestamp2"),
- Packed:string[128];
- new original = businessDefaultItemPrice[itemId] * itemAmount,
- work = randomEx(24, 32) + floatround(itemAmount*4),
- _tips = floatround((60/(thistime-orderTimestamp))*4.5);
- format(string, sizeof(string), "Shipping Order #2: Ban da giao hang cho ngoi nha so '%d', nhan duoc tien goc '%d$'.",
- houseId, original);
- msg(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Shipping Order #2: Tien cong '%d$', tien tips '%d$' se duoc cong vao tai khoan ngan hang cua ban.", work, _tips);
- msg(playerid, COLOR_GREEN, string);
- _givePlayerMoney(playerid, original);
- givePlayerJobDeposits(playerid, work+_tips, 1);
- removePlayerDestination(playerid, GetPVarInt(playerid, "shipperDestinationId2"));
- DeletePVar(playerid, "shipperItemId2");
- DeletePVar(playerid, "shipperItemAmount2");
- DeletePVar(playerid, "shipperDestinationId2");
- DeletePVar(playerid, "shipperHouseId2");
- DeletePVar(playerid, "shipperItemAmountLeft2");
- DeletePVar(playerid, "shipperOrderTimestamp2");
- }
- SetPVarInt(playerid, "shipperItemAmountLeft2", itemAmountLeft-1);
- return 1;
- }
- else if(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cItemModel] == businessAvailableItem[itemId][cItemModel])
- {
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cNumberOfUses] <= 0)
- {
- switch(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cItemModel])
- {
- case ITEM_TYPE_PHONE, ITEM_TYPE_PORTABLE_RADIO:
- default: msg(playerid, COLOR_RED, "Vat pham khong con de co the giao.");
- }
- }
- inventoryRemoveCharacterItem(playerid, MAX_INVENTORY_ITEMS+1);
- updateInventoryAttachments(playerid);
- if((itemAmountLeft - 1) == 0)
- {
- new itemAmount = GetPVarInt(playerid, "shipperItemAmount2"),
- thistime = gettime(),
- orderTimestamp = GetPVarInt(playerid, "shipperOrderTimestamp2"),
- Packed:string[128];
- new original = businessDefaultItemPrice[itemId] * itemAmount,
- work = randomEx(24, 32) + floatround(itemAmount*4),
- _tips = floatround((60/(thistime-orderTimestamp))*4.5);
- format(string, sizeof(string), "Shipping Order #2: Ban da giao hang cho ngoi nha so '%d', nhan duoc tien goc '%d$'.",
- houseId, original);
- msg(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Shipping Order #2: Tien cong '%d$', tien tips '%d$' se duoc cong vao tai khoan ngan hang cua ban.", work, _tips);
- msg(playerid, COLOR_GREEN, string);
- _givePlayerMoney(playerid, original);
- givePlayerJobDeposits(playerid, work+_tips, 1);
- removePlayerDestination(playerid, GetPVarInt(playerid, "shipperDestinationId2"));
- DeletePVar(playerid, "shipperItemId2");
- DeletePVar(playerid, "shipperItemAmount2");
- DeletePVar(playerid, "shipperDestinationId2");
- DeletePVar(playerid, "shipperHouseId2");
- DeletePVar(playerid, "shipperItemAmountLeft2");
- DeletePVar(playerid, "shipperOrderTimestamp2");
- }
- SetPVarInt(playerid, "shipperItemAmountLeft2", itemAmountLeft-1);
- return 1;
- }
- }
- }
- if(GetPVarType(playerid, "shipperDestinationId3") && mainJobsLocked[MAINJOB_SHIPPER] == false)
- {
- new houseId = GetPVarInt(playerid, "shipperHouseId3");
- if(IsPlayerInRangeOfPoint(playerid, 3.0, characterHouse[houseId][exteriorX], characterHouse[houseId][exteriorY],
- characterHouse[houseId][exteriorZ]))
- {
- new itemId = GetPVarInt(playerid, "shipperItemId3"),
- itemAmountLeft = GetPVarInt(playerid, "shipperItemAmountLeft3");
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS][cItemModel] == businessAvailableItem[itemId][cItemModel])
- {
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS][cNumberOfUses] <= 0)
- {
- switch(characterInventory[playerid][MAX_INVENTORY_ITEMS][cItemModel])
- {
- case ITEM_TYPE_PHONE, ITEM_TYPE_PORTABLE_RADIO:
- default: msg(playerid, COLOR_RED, "Vat pham khong con de co the giao.");
- }
- }
- inventoryRemoveCharacterItem(playerid, MAX_INVENTORY_ITEMS);
- updateInventoryAttachments(playerid);
- if((itemAmountLeft - 1) == 0)
- {
- new itemAmount = GetPVarInt(playerid, "shipperItemAmount3"),
- thistime = gettime(),
- orderTimestamp = GetPVarInt(playerid, "shipperOrderTimestamp3"),
- Packed:string[128];
- new original = businessDefaultItemPrice[itemId] * itemAmount,
- work = randomEx(24, 32) + floatround(itemAmount*4),
- _tips = floatround((60/(thistime-orderTimestamp))*4.5);
- format(string, sizeof(string), "Shipping Order #3: Ban da giao hang cho ngoi nha so '%d', nhan duoc tien goc '%d$'.",
- houseId, original);
- msg(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Shipping Order #3: Tien cong '%d$', tien tips '%d$' se duoc cong vao tai khoan ngan hang cua ban.", work, _tips);
- msg(playerid, COLOR_GREEN, string);
- _givePlayerMoney(playerid, original);
- givePlayerJobDeposits(playerid, work+_tips, 1);
- removePlayerDestination(playerid, GetPVarInt(playerid, "shipperDestinationId3"));
- DeletePVar(playerid, "shipperItemId3");
- DeletePVar(playerid, "shipperItemAmount3");
- DeletePVar(playerid, "shipperDestinationId3");
- DeletePVar(playerid, "shipperHouseId3");
- DeletePVar(playerid, "shipperItemAmountLeft3");
- DeletePVar(playerid, "shipperOrderTimestamp3");
- }
- SetPVarInt(playerid, "shipperItemAmountLeft3", itemAmountLeft-1);
- return 1;
- }
- else if(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cItemModel] == businessAvailableItem[itemId][cItemModel])
- {
- if(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cNumberOfUses] <= 0)
- {
- switch(characterInventory[playerid][MAX_INVENTORY_ITEMS+1][cItemModel])
- {
- case ITEM_TYPE_PHONE, ITEM_TYPE_PORTABLE_RADIO:
- default: msg(playerid, COLOR_RED, "Vat pham khong con de co the giao.");
- }
- }
- inventoryRemoveCharacterItem(playerid, MAX_INVENTORY_ITEMS+1);
- updateInventoryAttachments(playerid);
- if((itemAmountLeft - 1) == 0)
- {
- new itemAmount = GetPVarInt(playerid, "shipperItemAmount3"),
- thistime = gettime(),
- orderTimestamp = GetPVarInt(playerid, "shipperOrderTimestamp3"),
- Packed:string[128];
- new original = businessDefaultItemPrice[itemId] * itemAmount,
- work = randomEx(24, 32) + floatround(itemAmount*4),
- _tips = floatround((60/(thistime-orderTimestamp))*4.5);
- format(string, sizeof(string), "Shipping Order #3: Ban da giao hang cho ngoi nha so '%d', nhan duoc tien goc '%d$'.",
- houseId, original);
- msg(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "Shipping Order #3: Tien cong '%d$', tien tips '%d$' se duoc cong vao tai khoan ngan hang cua ban.", work, _tips);
- msg(playerid, COLOR_GREEN, string);
- _givePlayerMoney(playerid, original);
- givePlayerJobDeposits(playerid, work+_tips, 1);
- removePlayerDestination(playerid, GetPVarInt(playerid, "shipperDestinationId3"));
- DeletePVar(playerid, "shipperItemId3");
- DeletePVar(playerid, "shipperItemAmount3");
- DeletePVar(playerid, "shipperDestinationId3");
- DeletePVar(playerid, "shipperHouseId3");
- DeletePVar(playerid, "shipperItemAmountLeft3");
- DeletePVar(playerid, "shipperOrderTimestamp3");
- }
- SetPVarInt(playerid, "shipperItemAmountLeft3", itemAmountLeft-1);
- return 1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement