CheiN Posted July 17, 2012 Share Posted July 17, 2012 function enterVehicle( theVehicle, seat, jacked) local vh = getPedOccupiedVehicle ( source ) vehicles = { [541, 506, 603, 423, 411, 536, 500, 582, 495, 562, 560, 480, 429, 502, 402, 488, 601, 487, 424, 471] } nm = tonumber ( math.random( #vehicles ) ) setElementModel ( vh, nm ) end) addEventHandler("onPlayerVehicleEnter", enterVehicle, setElementModel) the thing is: i want if a player is in the vehicle Sethim a Random car if im bad correctme plz.. Link to comment
TAPL Posted July 17, 2012 Share Posted July 17, 2012 vehicles = {541, 506, 603, 423, 411, 536, 500, 582, 495, 562, 560, 480, 429, 502, 402, 488, 601, 487, 424, 471} function enterVehicle(veh, seat, jacked) local nm = math.random(#vehicles) setElementModel(veh, nm) end addEventHandler("onPlayerVehicleEnter", root, enterVehicle) 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