Help! [REP+++]Automatic Vehicle Respawn System
#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

Forum Jump:


Users browsing this thread: 3 Guest(s)