Skip to main content

nc_garage

ตัวอย่างรหัสที่ใช้เพิ่มไปยังทรัพยากร nc_garage เพื่อส่งข้อมูลมายัง azael_dc-serverlogs

danger

โปรดตรวจสอบตัวแปรของรหัสทุกครั้ง เนื่องจากเวอร์ชันของทรัพยากรในตัวอย่างอาจจะไม่มีความเข้ากันได้กับทรัพยากรในเวอร์ชันที่คุณกำลังใช้งานอยู่ และส่งผลให้ไม่มีการส่งข้อมูลไปยัง azael_dc-serverlogs เนื่องจากมีข้อผิดพลาดเกิดขึ้นจากรหัสที่คุณดำเนินการเพิ่ม

config.functions.client.lua

ไปยัง config.functions.client.lua แล้วดำเนินการเปิดไฟล์

เบิกรถ-การาจ

EventLabel
NC_GetVehicleGarageเบิกรถ-การาจ

วางรหัสด้านล่างนี้ภายใน Config.ClientSpawnedVehicle = function

pcall(function()
exports['azael_dc-serverlogs']:insertData({
event = 'NC_GetVehicleGarage',
content = ('เบิก ยานพาหนะ %s ทะเบียน %s ออกจาก %s (ZONE: %s)'):format(GetDisplayNameFromVehicleModel(properties.model), plate, zoneType, zoneName),
coords = type(zoneCoords) == 'vector3' and zoneCoords,
color = 7
})
end)

เบิกรถ-พาวท์

EventLabel
NC_GetVehiclePoundเบิกรถ-พาวท์

วางรหัสด้านล่างนี้ภายใน Config.ClientPoundedVehicle = function

pcall(function()
exports['azael_dc-serverlogs']:insertData({
event = 'NC_GetVehiclePound',
content = ('เบิก ยานพาหนะ %s ทะเบียน %s ออกจาก %s (ZONE: %s)'):format(GetDisplayNameFromVehicleModel(properties.model), plate, zoneType, zoneName),
coords = type(zoneCoords) == 'vector3' and zoneCoords,
color = 3
})
end)

เก็บรถ-การาจ

EventLabel
NC_PutVehicleGarageเก็บรถ-การาจ

วางรหัสด้านล่างนี้ภายใน Config.ClientStoredVehicle = function

pcall(function()
exports['azael_dc-serverlogs']:insertData({
event = 'NC_PutVehicleGarage',
content = ('เก็บ ยานพาหนะ %s ทะเบียน %s เข้า %s (ZONE: %s | TARGET: %s)'):format(GetDisplayNameFromVehicleModel(properties.model), plate, zoneType, zoneName, target),
coords = type(zoneCoords) == 'vector3' and zoneCoords,
color = 7
})
end)

ย้ายรถ-การาจ

EventLabel
NC_MoveVehicleGarageย้ายรถ-การาจ

วางรหัสด้านล่างนี้ภายใน Config.ClientSentVehicleToGarage = function

pcall(function()
exports['azael_dc-serverlogs']:insertData({
event = 'NC_MoveVehicleGarage',
content = ('ย้าย ยานพาหนะ %s ทะเบียน %s เข้า %s (ZONE: %s | TARGET: %s)'):format(GetDisplayNameFromVehicleModel(properties.model), plate, zoneType, zoneName, target),
coords = type(zoneCoords) == 'vector3' and zoneCoords,
color = 2
})
end)