Respawning cars
#9

pawn Код:
#define RESPAWN_TIME 3

OnGamemodeInit()
{
SetTimer("VehicleRespawn", RESPAWN_TIME * 50000, 1);
return 1;
}

forward VehicleRespawn();
public VehicleRespawn() {
    GameTextForAll("~b~Vehicles~r~Respawn~w~!!!",4000,6);
    for(new i = 0; i < MAX_VEHICLES; i ++ ) {
         for(new o = 0; o < GetMaxPlayers(); o ++ ) {
              if(!IsPlayerConnected(o)) continue;
              if(IsAnyBodyInVehicle(i)) continue;
              SetVehicleToRespawn(i);
         }
    }
    return 1;
}
stock IsAnyBodyInVehicle(vid) {
  for(new i = 0; i < GetMaxPlayers(); i ++ ) {
       if(IsPlayerInVehicle(i, vid)) return 1;
  }
  return 0;
}
This will work but try to learn it
Reply


Messages In This Thread
Respawning cars - by Biess - 15.03.2013, 11:43
Re: Respawning cars - by P3DRO - 15.03.2013, 11:46
Re: Respawning cars - by Biess - 15.03.2013, 11:49
Re: Respawning cars - by Glad2BeHere - 15.03.2013, 11:54
Re: Respawning cars - by RicaNiel - 15.03.2013, 11:54
Re: Respawning cars - by Biess - 15.03.2013, 11:55
Re: Respawning cars - by P3DRO - 15.03.2013, 11:57
Re: Respawning cars - by Glad2BeHere - 15.03.2013, 12:09
Re: Respawning cars - by Gamer_007 - 15.03.2013, 12:14
Re: Respawning cars - by RicaNiel - 15.03.2013, 12:19

Forum Jump:


Users browsing this thread: 1 Guest(s)