Search the Community

Showing results for tags 'rotate'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 3 results

  1. local redcircle = dxCreateTexture("teszt.png") addEventHandler("onClientRender", root, function() dxDrawMaterialLine3D(-1989.73804, 214.91431, 50,-1989.73804, 214.91431,43.1096496582031, redcircle, 6, tocolor(255,255,255),0,5,6) end) I change numbers, but i cannot rotate the image... how to rotate the image? sorry for my bad english..
  2. Olá, estou tentando criar uma rotação circular no meu objeto. Para fazer isso, ele deve rotacionar em Z usando o Easing "SineCurve". (exemplo 20º) Até aí tudo certo... Mas o problema ocorre quando eu coloco outra rotação nos demais parâmetros, pois ele coloca "SineCurve" em todas as rotações informadas do moveObject, só que eu preciso que ele faça na rotação X com o Easing "CosineCurve", pois se usar o "SineCurve" no X também, ele rotaciona numa diagonal apenas. Imagem para ilustrar meu problema: Obs: Na luz já consigo fazer isso, pois ela tem uma espécie de "lookAt" porque ela aponta para uma coordenada em vez de ser rotacionada, já no objeto isso não é possível... Obs2: Colocar a rotação X em um moveObject separado não funciona, pois cancela o moveObject anterior deste objeto. Obs3: Anexar o objeto a outro não resolve, uma vez que moveObject não funciona em objetos-filho. Traduzindo tudo acima: Preciso que o objeto faça um "lookAt" em um ponto que irá se movimentar circularmente.
  3. Everythink is working in the code, only the rotating not. When i press mouse1 then the weapons and the object will be created but its not rotating. This rotating function makes possible to rotate the object called "object3" to that direction where the "misc_a" (vehicle component) and the "misc_c" (vehicle component) is rotating at. The problem is that its not rotating the object. I hope you can help me again. Thanks in advance! client object3 = {}; mg1 = {}; mg2 = {}; addEvent ( 'fire_mg',true ); addEventHandler ( 'fire_mg',root, function ( aVehicle,aX,aY,aZ ) if aVehicle and aX and aY and aZ then object3 [ aVehicle ] = createObject ( 357, aX,aY,aZ) attachElements ( object3 [ aVehicle ], aVehicle, -0.05,10,3, 0,0,90 ) mg1 [ aVehicle ] = createWeapon("m4", aX,aY,aZ) mg2 [ aVehicle ] = createWeapon("m4", aX,aY,aZ) setWeaponFiringRate(mg1 [ aVehicle ], 20) setWeaponFiringRate(mg2 [ aVehicle ], 20) setWeaponState(mg1 [ aVehicle ], "firing") setWeaponState(mg2 [ aVehicle ], "firing") attachElements(mg1 [ aVehicle ], object3 [ aVehicle ], 0.2, 0.2, 0, 0, 0, 0) attachElements(mg2 [ aVehicle ], object3 [ aVehicle ], 0.2, -0.3, 0, 0, 0, 0) setElementData ( aVehicle,'mgFireOn',true ); local veh = getPedOccupiedVehicle(localPlayer) setElementData ( aVehicle,'object3',object3 [ aVehicle ] ); addEventHandler("onClientRender",root,rotate_object) end end ); function rotate_object() local veh = getPedOccupiedVehicle(localPlayer) local _,_,rz = getVehicleComponentRotation(veh, "misc_a") local rx,_,_ = getVehicleComponentRotation(veh, "misc_c") triggerServerEvent("rotateWeapon", localPlayer, rx,rz) end server function rotateWeapon(rx,rz) outputChatBox("rotate_s") local object3 = getElementData ( aVehicle, "object3" ) rx = (-rx) setElementAttachedOffsets ( object3, 0, 5.25, 2.45, 0, rx+7, rz+96) end addEvent("rotateWeapon", true) addEventHandler("rotateWeapon", root, rotateWeapon) function fire ( aPlayer ) if aPlayer and getElementType ( aPlayer ) == 'player' then if isPedInVehicle ( aPlayer ) then local aVehicle = getPedOccupiedVehicle( aPlayer ); if aVehicle and getElementModel ( aVehicle ) == 592 then local aX,aY,aZ = getElementPosition ( aVehicle ); triggerClientEvent ( root,'fire_mg',root,aVehicle,aX,aY,aZ ); end end end end function bind_start() for _,aPlayers in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( aPlayers,'mouse1','down',fire ); end end addEventHandler ( 'onResourceStart',resourceRoot,bind_start) function bind_join() bindKey ( aPlayers,'mouse1','down',fire ); end addEventHandler ( 'onPlayerJoin',root,bind_join )