Jump to content

Search the Community

Showing results for tags 'getvehiclecomponents'.

  • 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
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 2 results

  1. The question is the same as the title: how to get width and height of a vehicle component?I dont think that there is any way to do it.
  2. Okey, so im currently working on a repair script for my server, until this point everything worked, but now i need to calculate some offsets(world offset, and rotation offset too), and i have no idea how to do it.So, the basic idea is to hold every demounted component like this.Heres the script i made. --CLIENT SIDE local r = { ["door_lf_dummy"] = {90,0,-90}, ["door_rf_dummy"] = {90,0,-90}, ["door_lr_dummy"] = {90,0,-90}, ["door_rr_dummy"] = {90,0,-90}, } addEvent("addVehComponentToPlayer",true) function funkzson(veh,comp,player) setTimer(function() local rotx,roty,rotz = getElementRotation(player) setElementRotation(veh,rotx,rotx,rotz) for k in pairs(getVehicleComponents(veh)) do if not (k==comp) then setVehicleComponentVisible(veh,k,false) end end local cX,cY,cZ = getVehicleComponentPosition(veh,comp,"world") local vX,vY,vZ = getElementPosition(veh) local offsetX,offsetY,offsetZ = (vX-cX),(vY-cY),(cZ-vZ) exports.bone_attach:attachElementToBone(veh,player,2,0,-0.4,-0.65,r[comp][1],r[comp][2],r[comp][3]) setPedAnimation(player,"carry","crry_prtial",0,false,false,false) end,50,1) end addEventHandler("addVehComponentToPlayer",getLocalPlayer(),funkzson) --SERVER SIDE addCommandHandler("setcompstate",function(source,_,comp) local x,y,z = getElementPosition(source) local veh = createVehicle(440,x,y,z,rotx,roty,rotz) setElementCollisionsEnabled(veh,false) setVehicleDamageProof(veh,true) setElementData(veh,"onlyfixveh",true) triggerClientEvent("addVehComponentToPlayer",root,veh,comp,source) end) Ignore that i attached the server side triggerClientEvent to a command, i made it like this only for testing purposes. btw, maybe i will post the full script as a community script.
×
×
  • Create New...