Loop through all vehicles.
#6

Quote:
Originally Posted by arjanforgames
Посмотреть сообщение
I now have this but it doesnt work:

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    for( new c = 1; c <= MAX_VEHICLES; c ++ )
    {
        new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(c, engine, lights, alarm, doors, bonnet, boot, objective);
        SetVehicleParamsEx(c,0,lights,alarm,doors,bonnet,boot,objective);
    }
    return 1;
}
That looks to me like the cars will go into a huge loop.

1st car spawns turn off its engine
2nd car spawns turn off its engine and the 1st cars engine.
3rd car spawns turn off its engine and the 2nd and 1st car engine.

Why dont you set the parameters like:

pawn Код:
public OnVehicleSpawn(vehicleid)
{
    new engine, lights, alarm, doors, bonnet, boot, objective;
    GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    SetVehicleParamsEx(vehicleid, 0,lights,alarm,doors,bonnet,boot,objective);
    return 1;
}
Reply


Messages In This Thread
Loop through all vehicles. - by arjanforgames - 21.07.2013, 11:12
Respuesta: Loop through all vehicles. - by Xabi - 21.07.2013, 11:16
Re: Respuesta: Loop through all vehicles. - by IstuntmanI - 21.07.2013, 11:20
Re: Loop through all vehicles. - by arjanforgames - 21.07.2013, 11:49
Re: Loop through all vehicles. - by Misiur - 21.07.2013, 11:52
Re: Loop through all vehicles. - by DobbysGamertag - 21.07.2013, 11:53
Re: Loop through all vehicles. - by arjanforgames - 21.07.2013, 12:05
Re: Loop through all vehicles. - by IstuntmanI - 21.07.2013, 12:13
Re: Loop through all vehicles. - by arjanforgames - 21.07.2013, 12:17
Re: Loop through all vehicles. - by zDevon - 21.07.2013, 12:17

Forum Jump:


Users browsing this thread: 1 Guest(s)