Xwad Posted February 1, 2015 Share Posted February 1, 2015 Hi how can i make rhinos speed slowlyer in mta? Link to comment
Gallardo9944 Posted February 1, 2015 Share Posted February 1, 2015 You can change its handling or limit the velocity Link to comment
Xwad Posted February 1, 2015 Author Share Posted February 1, 2015 this? function equalTwoRandomPlayersVelocity() if getPlayerCount() < 2 then -- If there's only one player (or no players) this doesn't make sense return false end local randomPlayer1, randomPlayer2 = getRandomPlayer(), getRandomPlayer() -- Get two random players while randomPlayer1 == randomPlayer2 do -- Make sure the two players are different randomPlayer2 = getRandomPlayer() end local speedx, speedy, speedz = getElementVelocity (randomPlayer1) -- Get the velocity of the first random player setElementVelocity(randomPlayer2, speedx, speedy, speedz) -- Copy that velocity to the second random player outputChatBox("Now " .. getPlayerName(randomPlayer2) .. " runs as fast as " .. getPlayerName(randomPlayer1) .. "!", root, 255, 128, 0) return true end Link to comment
Xwad Posted February 1, 2015 Author Share Posted February 1, 2015 ohh no that is for ped not for vehicle Link to comment
Xwad Posted February 1, 2015 Author Share Posted February 1, 2015 is it so good? function equalTwoRandomVehiclesVelocity() if getVehicleCount() < 2 then -- If there's only one player (or no players) this doesn't make sense return false end local randomVehicle1, randomVehicle2 = getRandomVehicle(), getRandomVehicle() -- Get two random players while randomVehicle1 == randomVehicle2 do -- Make sure the two players are different randomVehicle2 = getRandomPlayer() end local speedx, speedy, speedz = getElementVelocity (randomVehicle1) -- Get the velocity of the first random player setElementVelocity(randomVehicle2, speedx, speedy, speedz) -- Copy that velocity to the second random player outputChatBox("Now " .. getVehicleName(randomVehicle2) .. " runs as fast as " .. getVehicleName(randomVehiclePlayer1) .. "!", root, 255, 128, 0) return true end Link to comment
Gallardo9944 Posted February 1, 2015 Share Posted February 1, 2015 Neither of your codes will work the way you want them to. Scripting section is not a place where everyone will do everything for you. According to the messages, you don't even understand how those things work. Starting off with https://wiki.multitheftauto.com is necessary. 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