function sendOnfootSync(x, y, z, car)
_, myId = sampGetPlayerIdByCharHandle(PLAYER_PED)
data = allocateMemory(68)
sampStorePlayerOnfootData(myId, data)
setStructElement(data, 37, 1, 3, false)
setStructFloatElement(data, 6, x, false)
setStructFloatElement(data, 10, y, false)
setStructFloatElement(data, 14, z, false)
setStructElement(data, 62, 1, car, false)
sampSendOnfootData(data)
freeMemory(data)
end