Police blinking lights.
#1

https://www.youtube.com/watch?v=Ojrpnx7cq6I

I need something like in video.

pawn Код:
public FlasherFunc() {
        new panelsx,doorsx,lightsx,tiresx;
        for (new p=0; p<MAX_VEHICLES; p++)
        {
                if (Flasher[p] == 1)
                {
                        if (FlasherState[p] == 1)
                        {
                                GetVehicleDamageStatus(p,panelsx,doorsx,lightsx,tiresx);
                                UpdateVehicleDamageStatus(p, panelsx, doorsx, 4, tiresx);
                                FlasherState[p] = 0;
                        }
                        else
                        {
                                GetVehicleDamageStatus(p,panelsx,doorsx,lightsx,tiresx);
                                UpdateVehicleDamageStatus(p, panelsx, doorsx, 1, tiresx);
                                FlasherState[p] = 1;
                        }
                }
        }
        return 1;
}
Reply
#2

That looks like ELM or something in the video. Does your code not work?
Reply
#3

As DobbysGamertag said the flashing headlights you are seeing is a mod called ELM. It can't be scripted in your gamemode.
Reply
#4

pawn Код:
#define BLINK_LEFT_LIGHT 0
#define BLINK_RIGHT_LIGHT 1

new Flasher[MAX_VEHICLES],FlasherState[MAX_VEHICLES];

forward public FlasherFunc();
public FlasherFunc()
{
    new panelsx,doorsx,lightsx,tiresx;
    for(new i; i < MAX_VEHICLES; i++)
    {
        if(Flasher[i] == 1)
        {
            if(FlasherState[i] == BLINK_LEFT_LIGHT)
            {
                GetVehicleDamageStatus(i,panelsx,doorsx,lightsx,tiresx);
                UpdateVehicleDamageStatus(i,panelsx,doorsx,2,tiresx);
                FlasherState[i] = BLINK_RIGHT_LIGHT;
            }
            else if(FlasherState[i] == BLINK_RIGHT_LIGHT)
            {
                GetVehicleDamageStatus(i,panelsx,doorsx,lightsx,tiresx);
                UpdateVehicleDamageStatus(i,panelsx,doorsx,8,tiresx);
                FlasherState[i] = BLINK_LEFT_LIGHT;
            }
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)