wait then respawn
#1

Whats the code for
Quote:

Wait 15 seconds
Respawn/make another one of CAR1

(for eg)
make another one of would be preffered
Reply
#2

The function is:
pawn Код:
SetVehicleToRespawn( vehicleid );
You can use a timer for what you want to do!
Reply
#3

Respawn so SetVehicleToRespawn(vehicleid);
Reply
#4

How can I use a timer?
Is there a respawn ALL vehichles?
Reply
#5

Here is a little script that let you respawn all vehicles:

Foreach version
pawn Код:
for( new V = 0; V < MAX_VEHICLES; V ++ )
{
    foreach(new i : Player)
    {
        if( IsPlayerInVehicle( i, V ) ) SetVehicleToRespawn( V );
    }
}
Loop version
pawn Код:
for( new V = 0; V < MAX_VEHICLES; V ++ )
{
    for( new i = 0; i < MAX_PLAYERS; i ++ )
    {
        if( IsPlayerInVehicle( i, V ) ) SetVehicleToRespawn( V );
    }
}
Reply
#6

@Roach_: The foreach loop is a loop as well, so naming the loop version 'loop version' is a bit wrong naming convention. The second example is just a nested for loop.

Also: isn't it possible to have a foreach in a foreach?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)