1. Multi Theft Auto: San Andreas 1.x

    1. Support for MTA:SA 1.x

      HELP! HELP! Need help? Post here.
      50,436
      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.

      10
      posts
    3. Open Source Contributors

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

      1,206
      posts
    4. Suggestions

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

      7,529
      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.

      570
      posts
  2. General MTA

    1. News

      News and updates on Multi Theft Auto.
      9,451
      posts
    2. Media

      User-made screens and movies go here.

      4,204
      posts
    3. Site/Forum/Discord/Mantis/Wiki related

      Share your comments & concerns about our services.

      5,105
      posts
    4. MTA Chat

      MTA related chat that is NOT support related!
      1,830
      posts
    5. 314,343
      posts
  3. MTA Community

    1. Scripting

      All Lua scripting topics related to Multi Theft Auto.

      247,662
      posts
    2. Maps

      Discussions for maps on various gamemodes.
      12,875
      posts
    3. Resources

      Everything else about resources.
      26,773
      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.

      1,691
      posts
    5. Competitive gameplay

      Discussions about various MTA-related competitive gameplay events. Also gang (clan) forums.
      26,673
      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.
      13,584
      posts
  4. Other

    1. General

      Non-MTA discussions. Anything you want.
      37,912
      posts
    2. Multi Theft Auto 0.5r2

      Discussion regarding Multi Theft Auto 0.5r2 for GTAIII and Vice City.
      617
      posts
    3. Third party GTA mods

      Showcase for single player mods and requests.
      754
      posts
  5. Archive

    1. 144,036
      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,574
      posts
  • Posts

    • Yes, let's say you have 2 script files named Server.Lua and Client.Lua. You know what file is which, but we must also tell the server which file is which and that is done in the meta file. <meta> <script src="Server.Lua" type="server" /> <script src="Client.Lua" type="client" /> </meta> Alright, so now then, we want to call something to run from the Client File, so we will make some function in the Client File (AKA Client Side): function ClientTest() -- The custom function name outputChatBox("Test: I'm the Client Script!") -- Just a very basic test message end addEvent("Client-ClientTest",true) -- We must add this event to be able to call it from the Server Script addEventHandler("Client-ClientTest",getRootElement(),ClientTest) -- We must also add this Event Handler to point it correctly at our Function Now we'll be able to call the new function from the Server File (AKA Server Side): function SomeFunction() outputChatbox("This is the Server Script!",source) -- Another very basic message triggerClientEvent(source,"Client-ClientTest",source) -- Calls the Client Side Event/Function end In this example, you would get 2 messages in the chat, one from the Server and the other from the Client If you use setCameraTarget(90, 90, 90) then it will show where ever X(90) is, Y(90) is and Z(90) is and thats not what you want... What you need to do is figure out where you want the camera to be looking at and use the coordinates of that exact location (No angles, rotations, etc)
    • I remember that in 2012 it worked perfectly with update 1.2 I think that was it. And now that I want to go back to make race maps I realized that this resource does not work well... when I define the game mode everything goes very well if it works, but when it is time to put the road controlpoint it is bad, instead of leaving the cs_roadbridge04 file only a trash can comes out as a control point. This is how it should look and how it should work, I don't know why in older versions this works well and in recent versions it doesn't. I hope someone can solve this https://www.youtube.com/watch?v=MCaFxnnXrfM&t=23s
    • Sorry, forgot to add the "end" for the function itself... number = 0 -- Declare the variable outside the function function outputRandomMessage() number = number + 1 -- Add +1 so it changes each time the function is called local msg = messages[number] -- Display the Message if number = 3 then -- If it just Displayed the last Message... number = 0 -- Reset it to start all over again end end -- Forgotten End :(  
    • There's no blip on the minimap.
    • I'm new to this. I'm having trouble understanding the functional part of it. I do understand the idea, though. This is what I understood from your comment: since this is a client event, I need to create a script that's running in a "client.Lua" file. I created it and edited the meta.xml to look for the source file (type="client"). Up to this point, is this the correct way to proceed? The script looks like this: function joinHandler() -- player spawns at coordinates 2023, 1008, 10.83, with a rotation of -90, and a randomized skin id between 1 and 288. spawnPlayer(source, 2023, 1008, 10.83, -90, math.random (1,288)) -- screen fades from black to color. fadeCamera(source, true) -- if target not defined, syntax maintains player targeted setCameraTarget(90, 90, 90) -- (targetX, targetY, targetZ) adding different values ranging 0-359 changes nothing end addEventHandler("onPlayerJoin", getRootElement(), joinHandler) I added X, Y, Z = 90 to have round values and to see a noticable change to the camera, if any. And just to be sure, I added the same line to server.Lua. Console threw an error coming from server.Lua, so I deleted the line and the error went away. However, the script doesn't seem to be working. Nothing is happening. The camera is still pointing to the north. There are no errors coming from client.Lua. (off context: how come the error only comes from server.Lua, even though both server.Lua and client.Lua have the same line?)