Hello I try any solutions to resolve my problem but all solutions didn’t work
My problem is that my TriggerServerEvent (‘GetIDPlayer’) is in a loop that returns a TriggerServerEvent with a drawtxt. The trick is that I feel like I have an epileptic seizure with the message blinking every 0.0000001 seconds. It’s horrible :3 So the solution is to use that code and it doesn’t works. An idea to solve my problem?
local pos = GetEntityCoords(GetPlayerPed(-1)) local rped = GetClosestPed(pos['x'], pos['y'], pos['z'], 5.0,1,1,0) if DoesEntityExist(rped) then TriggerServerEvent('GetIDPlayer') end
I’m trying to use GetClosestRoad and found your thread name relevant but its content is not.
// 0x132F52BBA570FE92 0x567B0E11
Any GET_CLOSEST_ROAD(float x, float y, float z, float p3, int p4, Vector3* p5, Vector3* p6, Any* p7, Any* p8, float* p9, BOOL p10);
p1 seems to be always 1.0f in the scripts
So I tried this:
local pos1=GetEntityCoords(GetPlayerPed(-1))
local pos2=GetEntityCoords(GetPlayerPed(-1))
local p7=.0
local p8=.0
local p9=.0
GetClosestRoad(pos1.x,pos1.y,pos1.z, 1000.0, 0, Citizen.PointerValueVector(pos1), Citizen.PointerValueVector(pos2),Citizen.PointerValueFloat(p7), Citizen.PointerValueFloat(p8), Citizen.PointerValueFloat(p9), false);