Jump to content

Help please :)


battle309

Recommended Posts

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/17H9V

in 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

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