Jump to content

Change car direction


Flexxy

Recommended Posts

I did it like that, but it's not working. It looks same as

;_:

wrmarker = createMarker(4094.1000976563, 325.79998779297, 67.900001525879, "arrow", 5, 255, 255, 255, 0) 
  
function wallride(player) 
if getElementType(player)=="player" then 
local vehicle=getPedOccupiedVehicle(player) 
if source==wrmarker then 
local speedx, speedy, speedz = getElementVelocity (localPlayer)  
setElementVelocity(localPlayer, -speedx, -speedy, -speedz) 
setElementRotation(vehicle, 0, 90 , 312)  
end 
end 
end 
addEventHandler("onClientMarkerHit", getRootElement(), wallride) 

Link to comment

This Is Example But Change The Time and The Velocity To Works Perfectly

function wallride ( player ) 
        if ( source == wrmarker ) then 
            if ( player == localPlayer ) then 
        local vehicle = getPedOccupiedVehicle ( player ); 
            setElementVelocity ( player, 40,  40, 40 ); 
        setTimer ( setElementVelocity, 90, 1, player, 100, 100, 100 ); 
            setElementRotation ( vehicle, 0, 90 , 312 ); 
        end 
    end 
end 
  
addEventHandler ( "onClientMarkerHit", root, wallride ); 
Link to comment
This Is Example But Change The Time and The Velocity To Works Perfectly

function wallride ( player ) 
        if ( source == wrmarker ) then 
            if ( player == localPlayer ) then 
        local vehicle = getPedOccupiedVehicle ( player ); 
            setElementVelocity ( player, 40,  40, 40 ); 
        setTimer ( setElementVelocity, 90, 1, player, 100, 100, 100 ); 
            setElementRotation ( vehicle, 0, 90 , 312 ); 
        end 
    end 
end 
  
addEventHandler ( "onClientMarkerHit", root, wallride ); 
Link to comment
Hey guys can someone tell me what I've use to write Change Car Direction script ? (Reverse in puma markers)

From the video I can't really see what kind of change of direction you want. Do you wish to change the speed also? Is it like a 180 degrees turn or completely 2 opposite directions in all x,y and z axis?

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...