Hello guys , i need help with something, i want to replace esx_shop marker by a Ped :
SO basically what i’m trying to is to replace the Drawmarker fuction with a CreatePed function.
I already isolate the function to do so:
-- Display markers
Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
local coords = GetEntityCoords(GetPlayerPed(-1))
for k,v in pairs(Config.Zones) do
for i = 1, #v.Pos, 1 do
if(Config.Type ~= -1 and GetDistanceBetweenCoords(coords, v.Pos[i].x, v.Pos[i].y, v.Pos[i].z, true) < Config.DrawDistance) then
DrawMarker(Config.Type, v.Pos[i].x, v.Pos[i].y, v.Pos[i].z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.Size.x, Config.Size.y, Config.Size.z, Config.Color.r, Config.Color.g, Config.Color.b, 100, false, true, 2, false, false, false, false)
end
end
end
end
end)
And I tried to Create a Ped instead by writing this :
-- Display markers
Citizen.CreateThread(function()
while true do
Citizen.Wait(10)
local coords = GetEntityCoords(GetPlayerPed(-1))
for k,v in pairs(Config.Zones) do
for i = 1, #v.Pos, 1 do
if(Config.Type ~= -1 and GetDistanceBetweenCoords(coords, v.Pos[i].x, v.Pos[i].y, v.Pos[i].z, true) < Config.DrawDistance) then
CreatePed( PED_TYPE_NETWORK_PLAYER , mp_m_freemode_01, v.Pos[i].x, v.Pos[i].y, v.Pos[i].z,0.0, false, true )
end
end
end
end
end)
But the ped doesn’t seems to appear. Even so the shop system is still here like his bilp.
If you guys know what I’ve done wrong please tell me!
Thanks for taking the time to read me and my shitty english