Hiii i make a system for drawrays/line behind the player but it doesnot work i would know what is the problem :3
My code :
function drawRays(iniPos, finPos, col_r, col_g, col_b, col_a, lightForceCoef)
x1, y1, z1 = iniPos
x2, y2, z2 = finPos
DrawLine(x1, y1, z1, x2, y2, z2, col_r, col_g, col_b, col_a)
DrawLightWithRange(x1, y1, z1, col_r, col_g, col_b, 5.0, 10.0 * lightForceCoef)
end
function GetBoneCoord(boneId)
GetPedBoneCoords(GetPlayerPed(-1), boneId, 0.0, 0.0, 0.0)
end
function DrawRaysBehindP()
Citizen.CreateThread(function()
if IsPedRunning(GetPlayerPed(-1)) then
drawRays(GetBoneCoord(0), GetBoneCoord(31086), 255, 255, 255, 200, 0.01)
ShakeGameplayCam("SMALL_EXPLOSION_SHAKE", 1.0)
PlaySoundFromEntity(-1, "Architect_Fall", GetPlayerPed(-1), "FBI_HEIST_SOUNDSET", 0.0, 0.0)
end
end)
end