MrRobinson Posted June 29, 2015 Share Posted June 29, 2015 Hey, I want one car to spawn however this is spawning 2 cars function CounterCar() local CCarID = GAMEPLAY.GET_HASH_KEY("stanier") STREAMING.REQUEST_MODEL(CCarID) while(not STREAMING.HAS_MODEL_LOADED(CCarID)) do wait(50) end for i = 1, 1 do CounterCarSpawn = VEHICLE.CREATE_VEHICLE(CCarID, 198.838, -705.200, 35.074, 0, true, true) ENTITY.SET_ENTITY_INVINCIBLE(CounterCarSpawn, true) end STREAMING.SET_MODEL_AS_NO_LONGER_NEEDED(CCarID)end Thanks Link to comment Share on other sites More sharing options...
MrRobinson Posted June 29, 2015 Author Share Posted June 29, 2015 I want one vehicle to spawn by the way... thanks Link to comment Share on other sites More sharing options...
sodanakin Posted June 29, 2015 Share Posted June 29, 2015 Just don't put it in the For loop ? It should work fine without a for loop to spawn them. Link to comment Share on other sites More sharing options...
MrRobinson Posted June 29, 2015 Author Share Posted June 29, 2015 Just don't put it in the For loop ? It should work fine without a for loop to spawn them. Nope still spawns 2 Link to comment Share on other sites More sharing options...
MrRobinson Posted June 29, 2015 Author Share Posted June 29, 2015 Fixed Link to comment Share on other sites More sharing options...
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