gpt-3.5-turbo-0301· openai
Suzhen/CodeChat
fivem scripting how can i draw an ‘A’ marker and also a ‘B’ marker
- User
fivem scripting how can i draw an ‘A’ marker and also a ‘B’ marker
- Assistant
Assuming you are asking how to create markers in FiveM:
To create an 'A' marker, you can use the following code:
local markerA = { type = 1, -- means the marker is a sphere pos = vector3(x, y, z), -- the position of the marker size = {x=1.0, y=1.0, z=1.0}, -- the size of the marker r = 255, g = 0, b = 0, a = 200, -- the color and transparency of the marker rotation = {x=0.0, y=0.0, z=0.0}, -- the rotation of the marker bobUpAndDown = true -- whether the marker should bob up and down } -- create the marker local markerAId = Citizen.InvokeNative(0x554D9D53F696D002, markerA.type, markerA.pos.x, markerA.pos.y, markerA.pos.z, markerA.size.x, markerA.size.y, markerA.size.z, markerA.r, markerA.g, markerA.b, markerA.a, markerA.rotation.x, markerA.rotation.y, markerA.rotation.z, markerA.bobUpAndDown, false, 0, false)Similarly, to create a 'B' marker, you can use:
local markerB = { type = 1, pos = vector3(x, y, z), size = {x=1.0, y=1.0, z=1.0}, r = 0, g = 0, b = 255, a = 200, rotation = {x=0.0, y=0.0, z=0.0}, bobUpAndDown = true } -- create the marker local markerBId = Citizen.InvokeNative(0x554D9D53F696D002, markerB.type, markerB.pos.x, markerB.pos.y, markerB.pos.z, markerB.size.x, markerB.size.y, markerB.size.z, markerB.r, markerB.g, markerB.b, markerB.a, markerB.rotation.x, markerB.rotation.y, markerB.rotation.z, markerB.bobUpAndDown, false, 0, false)