I was able to get the player's position easily but I am not able to figure out how to get the vehicle's position (x,y,z) from this addresses
Cars 0xB6F980 - Is the direct pointer to the pool start (CVehicle) 0xBA18FC - Current vehicle pointer: 0 = on-foot >0 = in-car 0x969084 - First vehicle you got into Note: To get the next vehicle, so the second one, you need to add +0x4 as many times you want. They are 0 if you haven't entered a first/second/third/etc car yet. 0xB74494 - Contains a pointer to main struct This struct: +0 = Contains a pointer to the first element in the pool +4 = Contains a pointer to a byte map indicating which elements are in use +8 = [dword] Is the maximum number of elements in the pool +12 = [dword] Is the current number of elements in the pool Each vehicle object is 2584 (0xA18) bytes. It starts at 0xC502AA0. For each vehicle in the pool: +20 = [byte] Contains a pointer to the rotation/position matrix (84 bytes): +0 = [float] X-axis Rotation (Grad) +4 = [float] Y-axis Rotation (Grad) +8 = [float] Z-axis Rotation (Grad) +16 = [float] X-axis Rotation (Looking) +20 = [float] Y-axis Rotation (Looking) +24 = [float] Z-axis Rotation (Looking) +48 = [float] X-axis Position +52 = [float] Y-axis Position +56 = [float] Z-axis Position +34 = [word] Vehicle ID from vehicles.ide
I just don't understand witch address should I use and how to start and how to get the position from these addresses, also I would like to get the vehicle ID and the speed of the vehicle. The vehicle that I would like to find the position for is the current vehicle I am inside. Could anyone please explain to me how to use this addresses to get to the vehicle's position or speed. thanks a lot.