Checking attached vehicle object
#5

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.

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);
    }
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.
Reply


Messages In This Thread
Checking attached vehicle object - by DLR - 11.04.2013, 06:15
Re: Checking attached vehicle object - by MP2 - 11.04.2013, 06:18
Re: Checking attached vehicle object - by DLR - 11.04.2013, 06:22
Re: Checking attached vehicle object - by Sithis - 11.04.2013, 06:58
Re: Checking attached vehicle object - by DLR - 11.04.2013, 07:25
Re: Checking attached vehicle object - by DLR - 11.04.2013, 07:58
Re: Checking attached vehicle object - by MP2 - 11.04.2013, 08:01
Re: Checking attached vehicle object - by DLR - 11.04.2013, 08:03
Re: Checking attached vehicle object - by MP2 - 11.04.2013, 08:06
Re: Checking attached vehicle object - by DLR - 11.04.2013, 08:09

Forum Jump:


Users browsing this thread: 2 Guest(s)