function sendOnfootSync(x, y, z, car)
local _, id = sampGetPlayerIdByCharHandle(playerPed)
local mem = allocateMemory(68)
sampStorePlayerOnfootData(id, mem)
setStructElement(mem, 37, 1, 3, false)
setStructFloatElement(mem, 6, x, false)
setStructFloatElement(mem, 10, y, false)
setStructFloatElement(mem, 14, z, false)
setStructElement(mem, 62, 2, car, false)
sampSendOnfootData(mem)
freeMemory(mem)
end