Jump to content

2 cars spawning? [LUA]


MrRobinson

Recommended Posts

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

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

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

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
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.