Jump to content

Forums

  1. Multi Theft Auto: San Andreas 1.x

    1. Support for MTA:SA 1.x

      HELP! HELP! Need help? Post here.

      52.3k
      posts
    2. User Guides

      These guides are a good place to start learning how to achieve certain things within MTA in an efficient and well mannered way.

      11
      posts
    3. Open Source Contributors

      This space is for contributors to discuss the development of MTA. No user suggestions/support.

      1.2k
      posts
    4. Suggestions

      Suggestions and requests go here. Please note that actual feature requests must be filed on our GitHub.

      7.6k
      posts
    5. Ban appeals

      Use this forum to appeal your GLOBAL MTA:SA bans. Permanent bans only - appeals for timed ones (eg. 24 hours) will be refused.

      Do not use it for appealing server-specific bans as we do not have power over these specific servers.

      1.3k
      posts
  2. General MTA

    1. News

      News and updates on Multi Theft Auto.

      9.5k
      posts
    2. Media

      User-made screens and movies go here.

      4.3k
      posts
    3. Site/Forum/Discord/Mantis/Wiki related

      Share your comments & concerns about our services.

      5.2k
      posts
    4. MTA Chat

      MTA related chat that is NOT support related!

      2k
      posts
    5. 324.6k
      posts
  3. MTA Community

    1. Scripting

      All Lua scripting topics related to Multi Theft Auto.

      255k
      posts
    2. Maps

      Discussions for maps on various gamemodes.

      13.1k
      posts
    3. Resources

      Everything else about resources.

      27.8k
      posts
    4. Other Creations & GTA modding

      This section includes things such as GUI themes, forum userbars, user-created MTA logos, etc. Also contains topics which cover general GTA modding areas that can be used in MTA, such as modelling.

      2.1k
      posts
    5. Competitive gameplay

      Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.

      26.7k
      posts
    6. Servers

      Looking for a server to play on? Looking for someone to host your server? Looking for a place to discuss with other server owners? Here's where to look.

      14.8k
      posts
  4. Other

    1. General

      Non-MTA discussions. Anything you want.

      38k
      posts
    2. Multi Theft Auto 0.5r2

      Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.

      636
      posts
    3. Third party GTA mods

      Showcase for single player mods and requests.

      762
      posts
  5. Archive

    1. 144k
      posts
    2. Trash

      These posts have broken forum rules. They are stored here temporarily so offending users can see what they have done wrong.

      1.9k
      posts
      • Tut
  • Posts

    • What? This is moves the spoiler on all vehicles... not just the one which I sit in
    • function spoiler() local vehicles = getElementsByType("vehicle"); for _,vehicle in ipairs(vehicles) do local sX, sY, sZ = getVehicleComponentPosition(vehicle, "movspoiler_23.5_1800") if (sX) then if spoiler == 1 then -- warning: variable overlaps with function name if sZ < 1.2 then setVehicleComponentPosition(vehicle, "movspoiler_23.5_1800", sX, sY-0.006, sZ+0.005) end elseif spoiler == 0 then if sZ > 1 then setVehicleComponentPosition(vehicle, "movspoiler_23.5_1800", sX, sY+0.012, sZ-0.01) end end end end end addEventHandler("onClientRender", root, spoiler) This clientside approach works as long as you do not want special synchronized modifications to the spoiler placement.
    • Hello, you need to trigger a server event as you said and then from server side you trigger all clients and call the function that manage the spoiler
    • Hello, maybe reducing the weight of the vehicle could help to make it "fly" more.
    • The spoiler is moving perfectly but just for me because this is client-sided. How can I make to server-side so everyone see when the spoiler moves?   function spoiler() local vehicle = getPedOccupiedVehicle(localPlayer) if vehicle then local sX, sY, sZ = getVehicleComponentPosition(vehicle, "movspoiler_23.5_1800") if spoiler == 1 then if sZ < 1.2 then setVehicleComponentPosition(vehicle, "movspoiler_23.5_1800", sX, sY-0.006, sZ+0.005) end elseif spoiler == 0 then if sZ > 1 then setVehicleComponentPosition(vehicle, "movspoiler_23.5_1800", sX, sY+0.012, sZ-0.01) end end end end addEventHandler("onClientRender", root, spoiler) I know I need to trigger server event, but the setVehicleComponentPosition & getVehicleComponentPosition is client-side functions only.

Twitter Feed

×
×
  • Create New...