plantanium Posted January 2, 2011 Share Posted January 2, 2011 Hello I Am Here Asking You How To Make Speedboosts And Teleports In MTA SA MAPEDITOR? I Want To Make A Map Pls Help Me Link to comment
Aibo Posted January 2, 2011 Share Posted January 2, 2011 you cant do that in map editor, you need to script that. Link to comment
proracer Posted January 2, 2011 Share Posted January 2, 2011 Use functions: createMarker and setElementVelocity .If I'm not wrong. Link to comment
Frozzer Posted January 3, 2011 Share Posted January 3, 2011 Make a new txt file. Copy in this code. Click on Save As. Yourname.lua Open the meta file in notepad and write in <script src="Yourname.lua" type="client" /> Just works when you are making a race map (DM,DD,Race) You have to test with race too. Not working if you just press F5. Change the X,Y,Z to your cords. You can change the Multiplier = 1.5 how much you want. (Dont go higher then 5.0) Do not change anything under fuction SpeedBoost (player) function start() SpeedBoost = { createMarker (X, Y, Z, "corona", 5, 60, 255, 100, 255 ), } end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start ) Multiplier = 1.5 function SpeedBoost (player) if player ~= getLocalPlayer() then return end if getElementType(player) == "player" then if isPedInVehicle ( player ) then local car = getPedOccupiedVehicle(player) if getVehicleController(car) == player then speedx, speedy, speedz = getElementVelocity ( car ) speedcnx = (speedx*Multiplier) speedcny = (speedy*Multiplier) speedcnz = (speedz*Multiplier) setElementVelocity ( car, speedcnx, speedcny,speedcnz ) fixVehicle(car) -- fixes the vehicle playSoundFrontEnd(46) end end end end addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost ) Link to comment
plantanium Posted January 4, 2011 Author Share Posted January 4, 2011 but how do i change the speed to more? Link to comment
Kenix Posted January 4, 2011 Share Posted January 4, 2011 coordinates are entered here what you need. function start() SpeedBoost = { createMarker (-1797, -1880, 490, "corona", 5, 60, 255, 100, 105 ), createMarker (-1797, -1880, 490, "corona", 5, 60, 255, 100, 105 ), createMarker (-1797, -1880, 490, "corona", 5, 60, 255, 100, 105 ), createMarker (-1797, -1880, 490, "corona", 5, 60, 255, 100, 105 ), createMarker (-2367.9, -1752.2, 485, "corona", 5, 60, 255, 100, 105 ), createMarker (-2367.9, -1752.2, 485, "corona", 5, 60, 255, 100, 105 ), createMarker (-2375.3, -1724.3, 499.2, "corona", 5, 60, 255, 100, 105 ), createMarker (-2375.3, -1724.3, 520, "corona", 5, 60, 255, 100, 105 ), createMarker (1977.36, -1286.72, 245.344, "corona", 5, 60, 255, 100, 105 ), createMarker (1790.89, -1631.36, 195.339, "corona", 5, 60, 255, 100, 105 ), createMarker (1470.72, -1623.86, 200.364, "corona", 5, 60, 255, 100, 105 ), createMarker (1332.67, -1548.88, 246.432, "corona", 5, 60, 255, 100, 105 ), createMarker (1702.74, -1351.29, 130.889, "corona", 5, 60, 255, 100, 105 ), createMarker (1099.04, -1541.56, 192.859, "corona", 5, 60, 255, 100, 105 ), createMarker (1542.42, -1183.14, 184.604, "corona", 5, 60, 255, 100, 105 ), createMarker (1373.26, -1178.31, 288.364, "corona", 5, 60, 255, 100, 105 ), } end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), start ) Multiplier = 1.5 function SpeedBoost (player) if player ~= getLocalPlayer() then return end if getElementType(player) == "player" then if isPedInVehicle ( player ) then local car = getPedOccupiedVehicle(player) if getVehicleController(car) == player then speedx, speedy, speedz = getElementVelocity ( car ) speedcnx = (speedx*Multiplier) speedcny = (speedy*Multiplier) speedcnz = (speedz*Multiplier) setElementVelocity ( car, speedcnx, speedcny,speedcnz ) fixVehicle(car) addVehicleUpgrade(car, 1010) playSoundFrontEnd(46) end end end end addEventHandler ( "onClientMarkerHit", getResourceRootElement(getThisResource()), SpeedBoost ) in meta.xml Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now