Automatic Vehicle Respawn Problem
#1

Here is the code,

PHP код:
#define RESPAWN_TIME 20 // Twenty minutes  
   
public OnGameModeInit() {  
     
SetTimer("VehicleRespawn"RESPAWN_TIME 600001);  
     return 
1;  
}  
   
forward VehicleRespawn();  
public 
VehicleRespawn() {  
    for(new 
0MAX_VEHICLES++ ) {  
         for(new 
0GetMaxPlayers(); ++ ) {  
              if(!
IsPlayerConnected(o)) continue;  
              if(
IsAnyBodyInVehicle(i)) continue;  
              
SetVehicleToRespawn(i);  
         }  
    }  
    return 
1;  
}  
   
stock IsAnyBodyInVehicle(vid) {  
  for(new 
0GetMaxPlayers(); ++ ) {  
       if(
IsPlayerInVehicle(ivid)) return 1;  
  }  
  return 
0;  

My problem:

When it respawns the vehicles it respawns trailers that are being used at the moment and connected to a truck.I need the script to check if the trailer is connected to a truck,if not respawn it,if yes no respawn.I have no idea how to make this.Can someone help me out with this? PLEASE !!! I need this really bad on my server! I'will rep+1 anyone who helps me out with this...
Reply


Messages In This Thread
Automatic Vehicle Respawn Problem - by xxxSpeedxxx - 01.06.2016, 23:48
Re: Automatic Vehicle Respawn Problem - by BR3TT - 01.06.2016, 23:54
Re: Automatic Vehicle Respawn Problem - by Jefff - 02.06.2016, 01:43
Re: Automatic Vehicle Respawn Problem - by Sew_Sumi - 02.06.2016, 02:09
Re: Automatic Vehicle Respawn Problem - by Micko123 - 02.06.2016, 04:46
Re: Automatic Vehicle Respawn Problem - by Nin9r - 02.06.2016, 09:57
Re: Automatic Vehicle Respawn Problem - by xxxSpeedxxx - 02.06.2016, 10:10
Re: Automatic Vehicle Respawn Problem - by Dayrion - 02.06.2016, 10:26

Forum Jump:


Users browsing this thread: 1 Guest(s)