ZOBYETEAM Documentation
  • คู่มือการใช้งาน (Document)
  • 📂Resource
    • ZOBYETEAM_GARAGE
      • Setup
        • oxmysql (จำเป็น)
      • Connections
        • Add vehicle
        • Customize vehicle
      • Common problems
        • ปัญหาน้ำมันไม่บันทึก
    • ZOBYETEAM_CARCUSTOMS
      • Setup
      • Connections
      • Admin commands
    • ZOBYETEAM_CARPARK
      • Setup
    • ZOBYETEAM_ECONOMY
      • Setup
      • Connections
    • ZOBYETEAM_INVENTORY
      • Setup
      • Connections
        • ZOBYETEAM_TRUNK
        • ZOBYETEAM_SAFEBOX
      • Common problems
    • ZOBYETEAM_PROFILE
      • Setup
      • Common problems
    • ZOBYETEAM_PARTY
      • Connections
        • Exports function
        • bt_alljob
      • Common problems
    • ZOBYE_MUSICBOX
      • Config
    • ZOBYETEAM_NOTIFY
      • Connections
        • Exports function
      • Common problems
  • ✉️Contact
    • Github
    • Discord
    • Facebook
Powered by GitBook
On this page

Was this helpful?

  1. Resource
  2. ZOBYETEAM_GARAGE
  3. Connections

Customize vehicle

ในตัวอย่างนี้จะใช้ร้านปรับแต่งรถของ esx_lscustom เป็นหลัก

เมื่อการปรับแต่งรถเสร็จสิ้น และมีการเปลี่ยนแปลงรายละเอียดที่ตัวรถ ไม่ว่าจะเป็น สี ล้อ หรือ อื่นๆ จะต้องมีการใช้ Function พิเศษ เพื่อให้ ZOBYETEAM_GARAGE รับรู้ว่ามีการเปลี่ยนแปลงรายละเอียดที่ตัวรถ ดังตัวอย่าง บรรทัดที่ 6

esx_lscustom (client)
RegisterNetEvent('esx_lscustom:installMod')
AddEventHandler('esx_lscustom:installMod', function()
    local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
    myCar = ESX.Game.GetVehicleProperties(vehicle)
    TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar)
    exports['zobyeteam_garage']:saveProps()
end)

สำหรับ Function "saveProps" จะไม่มีการรับค่าใดๆ สำหรับการเรียกใช้จากทรัพยากรอื่นๆสามารถ ทำได้ดังตัวอย่าง:

exports['zobyeteam_garage']:saveProps()
PreviousAdd vehicleNextCommon problems

Last updated 2 years ago

Was this helpful?

📂