function onGameInit(ARG_0) UPVALUE0 = game.datastore:GetNumber("missionNumber") UPVALUE1 = CheckPrice(ARG_0, 5, 7) s_merchandise = {} s_merchandise[0] = { s_name = "REFUELA", s_sound = "GasRefuelingSound", n_price = function() return CheckRefuelPrice(UPVALUE0) end, b_visible = CheckVisibility(ARG_0, 2), n_restriction = function(ARG_0, ARG_1) if ARG_1:GetFuelTankCapacity() - ARG_1:GetActualFuel() < UPVALUE0 then return 106 end return 0 end, s_item = false, t_offset = nil, n_range = nil } s_merchandise[1] = { s_name = "REFUELB", s_sound = "GasRefuelingSound", n_price = function() return CheckRefuelPrice(UPVALUE0) end, b_visible = CheckVisibility(ARG_0, 2), n_restriction = function(ARG_0, ARG_1) if ARG_1:GetFuelTankCapacity() - ARG_1:GetActualFuel() < UPVALUE0 then return 106 end return 0 end, s_item = false, t_offset = nil, n_range = nil } s_merchandise[2] = { s_name = "CANISTER", s_sound = "GasCanSound", n_price = function() return 100 + 10 * UPVALUE0 end, b_visible = true, -- make canister visible n_restriction = function(ARG_0, ARG_1) if ARG_0:InventoryHaveItem(38) then return 3 end return 0 end, s_item = { -- add canister item to the list "GS_kanistr01", "GS_kanistr02", "GS_kanistr03", "GS_kanistr04", "GS_kanistr05", "GS_kanistr06", "GS_kanistr07", "GS_kanistr08", "GS_kanistr09", "GS_kanistr10" -- add new canister item }, t_offset = nil, n_range = nil } s_merchandise[3] = { s_name = "WASH", s_sound = false, n_price = function() if UPVALUE0 > 6 or UPVALUE0 < 1 then return 3 else return 5 end end, b_visible = CheckVisibility(ARG_0, 1), n_restriction = function(ARG_0, ARG_1) return 0 end, s_item = false, t_offset = nil, n_range = nil } end

function BuyItem(ARG_0, ARG_1, ARG_2) if ARG_2 == 0 then if ARG_0.ctrl.cashRegister then ARG_0.ctrl.cashRegister:AddMoney(s_merchandise[ARG_1].n_userPrice or s_merchandise[ARG_1].n_price()) end if ARG_1 == 0 or ARG_1 == 1 then ARG_0.cfg.refuelingScript:RefuelingStart({ vendorPos = "GasRefuelingProdavacPos0" .. ARG_1, carPos = "GasRefuelingPosition0" .. ARG_1, stojan = UPVALUE0[1], price = s_me


原文地址: https://www.cveoy.top/t/topic/dJqH 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录