Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SetAllVehicleRespawnTime( time )
- {
- if( typeof(time) != "integer" ) //Check if the time is a integer or not
- {
- throw "Expected: Integer. Got: " + typeof(time); //The process
- }
- time = time*1000;
- local a = GetVehicleCount();
- for( local veh, i = 1; i <= a; i++ ) //Loop through all the vehicles.
- {
- veh = FindVehicle( i ); //The vehicle instance.
- if( veh != null ) //Check if the vehicle exists.
- {
- veh.RespawnTimer = time; //Done!
- }
- }
- }
- function onServerStart()
- {
- SetAllVehicleRespawnTime( 60 ); //Time in seconds.
- }
Add Comment
Please, Sign In to add comment