Jump to content

[Help] Creating Random Vehicles


Snow-Man

Recommended Posts

local cars = { 
{602},  
{600}, 
{587},  
{603}, 
{402},  
{411},  
{475}, 
{559},  
{560},  
{451},  
{506},  
{505},  
{566},  
{526},  
{522},  
{423},  
{444},  
{539} 
} 
locations = { 
{-2272.46704, 2286.02295, 4.22989}, 
{-2516.78662, 1229.13538, 36.83798}, 
{-2646.33350, 1357.95874, 6.57915}, 
{-1637.33765, 1296.62366, 6.39873}, 
{-1826.16296, 1310.79150, 59.09760}, 
{-1430.88330, -38.95546, 5.34191}, 
{-1368.96899, 19.28440, 5.36328}, 
{-1941.39233, -1086.80957, 30.14117}, 
{1245.36621, -2038.52136, 59.25457}, 
{1280.26892, -1810.79163, 12.79264}, 
{781.90558, -1344.65381, 12.89385} 
} 
  

Vehicles won't create in Map

Link to comment
i make Other codes but XxmadeXx gave me this functions about random cars

Note : cars and positions definated

local c = locations[math.random(#locations)] 
local marker = createVehicle (math.random(#cars), c[1], c[2], c[3] -1) 
createBlipAttachedTo(marker, 53) 
  

  
local marker = createVehicle ( cars [ math.random ( #cars ) ],unpack ( locations [ math.random ( #locations ) ] ) ) 
createBlipAttachedTo(marker, 53) 
  

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...