how to freeze vehicles for 5 sec
#1

hello guys plz tell me how i can freeze vehicles for 5 sec for loading objects i make some custom maps and vehicles go in water i want to freeze vehicles for 5 sec
Reply
#2

Just let them spawn a little bit higher, dont think you can freeze vehicles
Reply
#3

hmm maybe you can make a respawnallvehicles command? i got 1 if you want it.
Reply
#4

okey plz post code /respawnallcar >who respawn all unused cars@@
Reply
#5

okay
at the top:
pawn Код:
forward VehicleOccupied(vehicleid);

public VehicleOccupied(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return 0;
}
i use zcmd here is the command
pawn Код:
CMD:respawnallvehicles(playerid, params[])
    {
        for(new cars=0; cars<MAX_VEHICLES; cars++)
         {
            if(!VehicleOccupied(cars))
            {
                SetVehicleToRespawn(cars);
                RepairVehicle(cars);
            }
        }
        return 1;
    }
Reply
#6

plz addd timer man i want its respawn all cars on every 5 sec here is no other way to do more
Reply
#7

Quote:
Originally Posted by Madsen
Посмотреть сообщение
okay
at the top:
pawn Код:
forward VehicleOccupied(vehicleid);

public VehicleOccupied(vehicleid)
{
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerInVehicle(i,vehicleid)) return 1;
    }
    return 0;
}
i use zcmd here is the command
pawn Код:
CMD:respawnallvehicles(playerid, params[])
    {
        for(new cars=0; cars<MAX_VEHICLES; cars++)
         {
            if(!VehicleOccupied(cars))
            {
                SetVehicleToRespawn(cars);
                RepairVehicle(cars);
            }
        }
        return 1;
    }
At the command you are using (eg. /teleport):

pawn Код:
SetTimer("CarRespawn",10000,0); // Change the amount of milisecounds to what you need.
Anywhere :
pawn Код:
forward CarRespawn();
public CarRespawn()
{
    for(new cars=0; cars<MAX_VEHICLES; cars++)
    {
        if(!VehicleOccupied(cars))
        {
            SetVehicleToRespawn(cars);
            RepairVehicle(cars);
        }
   }
return 1;
}
All done.
Reply
#8

i got this error plz check this!!!!

Quote:

H:\Documents and Settings\Bilawal2o5o\Desktop\poilts life\gamemodes\gtapilots.pwn(4461) : error 017: undefined symbol "VehicleOccupied"
H:\Documents and Settings\Bilawal2o5o\Desktop\poilts life\gamemodes\gtapilots.pwn(4467) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Reply
#9

If you are using a streamer, just do
pawn Код:
Streamer_UpdateEx( playerid, x, y, z );
If not, freeze a player for 3 seconds(5 is too much), I think it does affect vehicles, never tested out tho.
Reply
#10

All I can see here is like hes using u guys like slaves but saying please...

Time to learn how to script mate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)