[FilterScript] [0.3.7] Flashing Police Lights (ELM)
#3

Nice work, optimized the code a lil bit for you.

NOTE: it's untested, but it should work, can't test it right now but should work fine.

pawn Code:
forward OnLightFlash(vehicleid);

public OnLightFlash(vehicleid)
{
    new panels, doors, lights, tires;
    GetVehicleDamageStatus(vehicleid, panels, doors, lights, tires);

    new states[ 3 ] =
    {
        2, 4, 5
    };

    new currstate = states[ random( 3 ) ];

    UpdateVehicleDamageStatus( vehicleid, panels, doors, currstate, tires );
    return 1;
}
Reply


Messages In This Thread
[0.3.7] Flashing Police Lights (ELM) - by TakeiT - 23.04.2015, 18:17
Re : [0.3.7] Flashing Police Lights (ELM) - by XDamienX007 - 23.04.2015, 18:42
Re: [0.3.7] Flashing Police Lights (ELM) - by Smileys - 23.04.2015, 19:10
Re: [0.3.7] Flashing Police Lights (ELM) - by TakeiT - 23.04.2015, 19:16
Re : [0.3.7] Flashing Police Lights (ELM) - by streetpeace - 23.04.2015, 19:46
Re: [0.3.7] Flashing Police Lights (ELM) - by Smileys - 23.04.2015, 20:03
Re: [0.3.7] Flashing Police Lights (ELM) - by d0nTtoucH - 24.04.2015, 11:49
Re: [0.3.7] Flashing Police Lights (ELM) - by TakeiT - 24.04.2015, 15:01
Re: [0.3.7] Flashing Police Lights (ELM) - by Maximun - 24.04.2015, 15:34
Re: [0.3.7] Flashing Police Lights (ELM) - by SpikY_ - 24.04.2015, 16:50

Forum Jump:


Users browsing this thread: 4 Guest(s)