สร้างหมายเลขทะเบียนใหม่
local retval = exports.mrft_vehicleshop:GeneratePlate()
print(retval) -- Output: ABC 123
ตรวจสอบว่าผู้เล่นกำลังอยู่ในหน้าร้านค้าหรือไม่
local retval = exports.mrft_vehicleshop:GetUIState()
if retval then
-- ผู้เล่นกำลังเปิดเมนูร้านค้า
end
สร้างร้านค้ารถใหม่สำหรับเชื่อมกับ UI หรือสคริปต์อื่น
data (table): ข้อมูลร้านค้า รถ พิกัด Spawn และค่ากล้อง Previewexports.mrft_vehicleshop:custom({
type = "car",
coords = vector3(40.17, -1055.00, 38.15),
spawnCoords = {x = 37.89, y = -1061.90, z = 38.15, h = 10.0},
preview = {
vehicle_coords = {x = 40.17, y = -1055.00, z = 38.15, h = 168.44},
camera_coords = {x = 37.77, y = -1063.87, z = 38.15, rotation = vector3(0.0, 0.0, 0.0), fov = 50.0}
},
vehicles = {
{hash = "police3", label = "Police Cruiser", price = 5000, category = ""},
{hash = "policeb", label = "Police Bike", price = 5000, category = ""},
{hash = "RIOT", label = "Police RIOT", price = 10000, category = "", extra_fov = 70.0},
}
})