[HELP] event's cars
#1

Hello I wonder how to make that with command I only reset/respawn event cars? And how can I make to respawn just trailers? Thanks
Reply
#2

How did you defined the vent vehicles at first?
(it's a rough example)

pawn Код:
new vehicles[10];

// on event creation assign array to vehicleids
for(..) {
     vehicles[x] = ++a;
}

// on respawn cmd
for(..) {
     SetVehicleToRespawn(vehicles[x]);
}
Reply
#3

I don't understand you?
Reply
#4

Did you created the event system already? If no, look for event scripts on how-to.
Reply
#5

yes I already have that I just need code for respawn that vehicles? Thanks
Reply
#6

Trailers are also vehicles so you can use DestroyVehicles/SetVehicleToRespawn.

Assigning vehicle ids to an array is nice idea.

pawn Код:
new EventCars[10];
EventCars[0] = CreateVehicle(..);
EventCars[1] = CreateVehicle(..);
..
So if you want to destroy all event vehicles do this\
pawn Код:
for(new e; e != sizeof EventCars; ++e)
{
    DestroyVehicle(EventCars[e]);
}
And yes, for respawning all trailers:
pawn Код:
for(new t; t != MAX_VEHICLES; t++)
{
    new model = GetVehicleModel(t);
    switch(model)
    {
        case 435,450,569,570,584,590,591,606,607,608,610,611:
        SetVehicleToRespawn(t);
    }
}
Reply
#7

How can I make for respawn all job's vehicles beacuse I have plenty job's vehicles.Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)