Search the Community
Showing results for tags 'position'.
-
I have a big problem with this code. When i enter a vehicle then the camera is attaching, and the free cam is also working. But when i rotate the vehicles x position 180 degree then the camera is at the same position. I want to attach the camera to a fix point on the vehicle. So my problem is that its not attaching the camera to that point 100 %. its a really strange bug. I could not explain it correctly, maybe you can test it, and then you will see the bug. So i want to attach it like in the bone attach resource. local vvx, vvy, vvz = 0,0,0 function vehicle_cam(screenX, screenY, absoluteX, absoluteY, vx,vy,vz) local x,y,z = getElementPosition(getPedOccupiedVehicle(getLocalPlayer())) if ( vx and vy and vz ) then vvx, vvy, vvz = vx, vy, vz end setCameraMatrix ( x+4.7, y-0.66, z+3.2, vvx, vvy, vvz ); end addEventHandler("onClientRender", root, vehicle_cam) addEventHandler("onClientCursorMove", getRootElement(), vehicle_cam)
-
Hi! I use guieditor to add an image(with dxdrawimage) position. It is on relative, but it's don't working. We are in the server, and someone's hud sticking out from the screen. He has correct resolution. What is the problem? Here is the code: dxDrawImage(screenW * 0.6698, screenH * 0.0130, screenW * 0.3228, screenH * 0.1341, "img/hud.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
- 1 reply
-
- dxdrawimage
- image
- (and 5 more)
-
Hey, I need to get the positions of vehicles that are occupied by players clientside. But as soon as they are far away, those positions are not accurate anymore. Actually, they just don't change for about 1500 ms before they are updated again. I changed the "lightweight_sync_interval" in the server config file to 200 ms, but that didn't help. So, is there a solution to get the actual values, or does only the server have them at any time? Bonsai