Posts: 5
Threads: 1
Joined: Oct 2010
Reputation:
0
Hey,
i have a question: is there a way to destroy a vehicle when someone leaves a car for more than 30 seconds?
The cars are spawned with CreateVehicle().
So, can someone explain this to me?
Posts: 5
Threads: 1
Joined: Oct 2010
Reputation:
0
Ow thanks, I'm sorry, but this callback was not included in my GM.
And I did use search but I didn't find anything.
Posts: 655
Threads: 49
Joined: Sep 2007
Reputation:
0
You bunch of failers XD .
The thing is, destroying it on Spawn will be make it impossible to even get it in the first time.
It's possible and quite easy.
When OnPlayerStateChange -> if( oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER )
Just Set an EX Timer for the vehicle.
In the timer, check with a loop if IsPlayerInVehicle(i, vehicleid) and if not, then Destroy it.