Jump to content

Xwad

Members
  • Posts

    1,089
  • Joined

  • Last visited

Everything posted by Xwad

  1. check this code. this code makes possible that the onClientCursorMove will also triggered if the cursor is not showing addEventHandler ( "onClientCursorMove", getRootElement ( ), function ( cursorX, cursorY, absoluteX, absoluteY, x2, y2, z2 ) if not isChatBoxInputActive ( ) and not isMainMenuActive ( ) and not isConsoleActive ( ) and not isCursorShowing ( ) then local x1, y1, z1 = getPedBonePosition ( player, 6 ) setCameraMatrix ( x1, y1, z1, x2, y2, z2 ) outputChatBox( "cursor moved") end end )
  2. you mean the gunner passanger script?
  3. I added a tank skin for the car alpha. I made a script that a makes possible to rotate the tanks (alpha) turret and the tanks barrel. I have a lot of problems. I hope you can help me. Tanks in advance. 1. The tanks barrel (misc_b) is only rotating up and down if i rotate the camera to the right or to the left:/ It should be go down and up when i look with the camera down and up. 2. The synchronisation is also not working. Only that player can see the tanks rurret rotating who is inside the vehicle. 3. the Roating is too fast. Is it possible to slow it down? CLIENT.LUA function onEnter() local veh = getPedOccupiedVehicle(localPlayer) local id = getElementModel ( veh ) if id == 602 then addEventHandler("onClientRender", getRootElement(), server) end end addEventHandler("onClientVehicleEnter", getRootElement(), onEnter) function server() triggerServerEvent ( "server", resourceRoot) end function turn() local veh = getPedOccupiedVehicle(localPlayer) local id = getElementModel ( veh ) if id == 602 then local vx,vy,vz = getElementRotation(veh) local cx,cy,cz = getPedCameraRotation(localPlayer) local rx,ry,rz = getVehicleComponentRotation( veh, "misc_a" ) setVehicleComponentRotation(veh, "misc_a", rx,ry,0-vz-cx) local rx2,ry2,rz2 = getVehicleComponentRotation( veh, "misc_b" ) setVehicleComponentRotation(veh, "misc_b", 0-cx,ry2,rz2) end end addEvent( "turn", true ) addEventHandler( "turn", resourceRoot, turn ) SERVER.LUA function server () triggerClientEvent ( "turn", getRootElement() ) end addEvent( "server", true ) addEventHandler( "server", resourceRoot, server )
  4. Xwad

    RPG aiming

    its not the mp5 shooting stance:/
  5. Xwad

    gta sa textures

    i will add trees and such more thing.
  6. Xwad

    gta sa textures

    its only 69 object Einheit-101.
  7. Xwad

    gta sa textures

    Yeah its impsible
  8. i already tryed that bit its olt wporking:/
  9. Download the resource and you will see that its not so easy as you think, Its more complicated. If i change i crosshairs position that will not change the shooting direction.. now my only question is: I want to set the projectiles direction to the turrets direction. Whats the problem in my script? function shootProjectile() local veh =getPedOccupiedVehicle(localPlayer) if(veh) and getVehicleModel(veh) == 601then local tx, ty = getVehicleTurretPosition (veh) createProjectile(veh, 19, tx,ty,2) endend
  10. Yeah but i have more problems with you resource: the crosshair is Too much on the top. I want to make a script where the crosshair is lower if you know what i mean
  11. I already did that. Now i have a new problem. Since 1.5.2 released your vreload script causes always game crashes so i decided to make a new script like yours. I created a script that makes possible to shoot projectiles with the swat tank. My problem is that the projectile is not shooting to the direction where the turret is looking at. I hope you can help me. Thanks function shootProjectile() local veh =getPedOccupiedVehicle(localPlayer) if(veh) and getVehicleModel(veh) == 601then local tx, ty = getVehicleTurretPosition (veh) createProjectile(veh, 19, tx,ty,2) endend
  12. one more question: why is this code not working? the projectile is not shooting function shootProjectile() local veh = getPedOccupiedVehicle(localPlayer) if(veh) and getVehicleModel(veh) == 601 then local tx, ty = getVehicleTurretPosition ( veh) createProjectile(veh, 19, tx,ty,2) end end
  13. now its wokring! i made it on a funny way:D I created another object to the middle and attached the other object to it.
  14. I made the script but its not working correctly:/ I set the rotation of the object but i also need to set the position. How can i do that? pls help function object() local veh = getPedOccupiedVehicle ( localPlayer ) local x,y,z = getElementPosition(veh) local id = getElementModel ( veh ) if id == 432 then object = createObject ( 356, x,y,z) attachElements ( object, veh, 0, 0, 0, 0, 7, 96 ) addEventHandler("onClientRender", getRootElement(), rotate_object) end end addEventHandler("onClientVehicleEnter", getRootElement(), object) function rotate_object() local veh = getPedOccupiedVehicle ( localPlayer ) local tx,ty = getVehicleTurretPosition ( veh ) ty = math.deg ( -ty ) tx = math.deg ( tx ) setElementAttachedOffsets ( object, 0.56, 1.15, 1.3, 0, ty+7, tx+96) end
  15. Xwad

    deleted

    i know we dont like each other but: sniper scope
  16. Hi i tryed to attach an object to the rhino vehicle but when the rhinos turret is rotating then the object is not moving. Is it possible to attach it to the rhinos turret? Thanks!
  17. Try this: function move_ramp() local veh = getPedOccupiedVehicle ( localPlayer) local x,y,z = getElementPosition(veh) if veh then ramp = createObject ( 0, 0, 0, 1000, 90, 0, 0 ) setElementAlpha(ramp , 0) attachElements ( ramp , veh, x, y, z ) local rotX, rotY, rotZ = getElementRotation(ramp ) setElementRotation(ramp ,rotX,rotY,rotZ+10) end end addCommandHandler("rampdown", move_ramp)
  18. I think you should use these functions. Create an object and when the ramp is moving down then set the objects rotation createObject setElementRotation setElementAlpha
  19. Xwad

    gta sa textures

    I uploaded the objects and cols. Here is the link: http://www.mediafire.com/download/0bv7t ... _natal.rar CodyL i want to do the same think that ..&G:.. said. I want to put all dff, col files into 1 file, so i can build the map with 1 object, so i dont need to build the map with a lot of pieces. If you really can do it pls share it with me too. Thanks in advance!
  20. Hi. im trying to remove all world objects. Its working but i want to save 7 objects. Is it possible to make that only these objects will be not removed? --10324 --10329 --10330 --10331 --10332 --10715 --10719 i use this code ( its removing all objects) for i=550,20000 do removeWorldModel(i,10000,0,0,0) end setOcclusionsEnabled(false)
  21. Xwad

    gta sa textures

    no. He want to put the DFF files together not the COL files
  22. Xwad

    gta sa textures

    He dosen't want to export the col. He wants to put all the objects togethe into 1 object, dff file.
  23. Xwad

    gta sa textures

    Wait. I learned how to do it. I just expoerted the col files:D
×
×
  • Create New...