11.04.2013, 07:25
Yeah. I don't know why I even started doing it the way I did in the first place lol. Tired I guess.
This is what I have now, incase anybody else is trying to figure it out.
SAPDVehicles[x] stores the vehicle ID. This just selects a certain set of vehicles to attach the bars too. I would share my script that turns the lightbars on and off using a command but it probably wouldn't be much help as everybody's script works differently. But with this script here, it's easy to make a command, just checking if the non-flashing bar exists to the vehicle the player is in, then getting the object position of it, and then adding the flashing one.
Much more simple than I anticipated.
This is what I have now, incase anybody else is trying to figure it out.
pawn Код:
for(new i = SAPDVehicles[27]; i < SAPDVehicles[33]; i++)
{
LightBarOff[i] = CreateObject(19420,0.0,0.0,0.0,0.0,0.0,0.0,100.0);
AttachObjectToVehicle(LightBarOff[i], i, 0.0, 0.0, 1.2, 0.0, 0.0, 0.0);
}
Much more simple than I anticipated.