battle309 Posted September 23, 2012 Share Posted September 23, 2012 Hey, guys sorry to bother you I managed to make this script but I still have problems. look at this image this is what I want http://puu.sh/17H9Vin that image cars spawn randomly. I made a spawn point for the cars, all I need is for them to be random vehicles. at the moment my spawn points are all motor bikes I need them to be different cars but I have no idea why this doesn't work. when I say randomly I mean if car blows up. you and your car spawn together in a different vehicle function onSpawn ( ) local vehicles = { 411, 602, 496, 491 } local veh = createVehicle ( vehicles [ math.random ( #vehicles ) ], 0, 0, 3 ) warpPedIntoVehicle ( source, veh ) end addEventHandler ( "onPlayerSpawn", getRootElement(), onSpawn ) Link to comment
Castillo Posted September 23, 2012 Share Posted September 23, 2012 That script will get a random model from the table and create the vehicle with it. 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