Help with respawn all cars
#1

pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0 || strcmp(cmd, "/rac", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(playerVariables[playerid][pAdminLevel] < 3)
            {
                SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
                return 1;
            }
            new samp[256];
            SetTimer("RACtime", 3000, 0);
            format(samp, 256,"{FFFFFF}All unused cars well be respawned in {009999}3 {FFFFFF}seconds by %s!",playerVariables[playerid][pNormalName]);
            submitToAdmins(samp, -1);
        }
        return 1;
    }
pawn Код:
public ractime(playerid)
{
      new string[256];
      new bool:unwanted[CAR_AMOUNT];
      for(new player=0; player<MAX_PLAYERS; player++)
      {
        if(IsPlayerInAnyVehicle(player)) { unwanted[GetPlayerVehicleID(player)]=true; }
      }
      for(new car = 1; car <= MAX_VEHICLES; car++)
      {
        if(!unwanted[car]) SetVehicleToRespawn(car);
      }
      return 1;
}
pawn Код:
public RACtime(playerid)
{
      for(new player=0; player<MAX_PLAYERS; player++)
      {
      if(!IsVehicleOccupied(player)) SetVehicleToRespawnEx(player);
      }
      for(new car = 1; car <= 1300; car++)
      {
          if(!IsVehicleOccupied(car)) SetVehicleToRespawnEx(car);

      }
      return 1;
}
So i want to don't respawn the TRUCKER trailers because, when i type /rac it respawns all cars including trailers.
Reply
#2

SetTimer("RACtime", 3000, 0);
you timer this, but public ractime

try SetTimer("ractime", 3000, 0);
Reply
#3

What is with your post? You didn't read all my post.
All my command is working properly but i want to don't respawn the truck trailers.
pawn Код:
So i want to don't respawn the TRUCKER trailers because, when i type /rac it respawns all cars including trailers.
Reply
#4

see this post and comments

https://sampforum.blast.hk/showthread.php?tid=374169 i mean work
Reply
#5

i Want to don't respawn it , this link shows you how can respawn it
Reply
#6

UP !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)