Jump to content

Asking for a vehicle Light function


Overkillz

Recommended Posts

Hello dear community, well, Im so dump right now and I have forgotten a new function which was added to MTA some few months ago. It was the possibility to keep the vehicle tail lights ON even if the time in game was too early. I have been several minutes looking for this function at the wiki, sadly, I couldn't find it.

Here some screen shots (Open the spoiler) if you don't understand me.

As you can see, on the first picture the car is stopped, but on the second one the car is stopping.Thanks for reading

Spoiler

 

04c01a4966.png

3011c3d641.png

 

 

Edited by Overkillz
Link to comment
  • Moderators

There  is a light element, but will probably only give partly the results you want.

Please read the notes:

Note:

  • The direction of the light only has any effect if the light type is spot light.
  • One light will only apply illumination effects to peds, players, wheels and number plates (like a emergency vehicle siren light does).
  • Two or more lights will apply illumination effects to everything (excluding objects) that is in range of, at least, two of them.

https://wiki.multitheftauto.com/wiki/CreateLight

<light posX="" posY="" posZ="" type="" radius="" color="" dirX="" dirY="" dirZ="" shadows="" />

 

  • Like 2
Link to comment
56 minutes ago, IIYAMA said:

There  is a light element, but will probably only give partly the results you want.

Please read the notes:

Note:

  • The direction of the light only has any effect if the light type is spot light.
  • One light will only apply illumination effects to peds, players, wheels and number plates (like a emergency vehicle siren light does).
  • Two or more lights will apply illumination effects to everything (excluding objects) that is in range of, at least, two of them.

https://wiki.multitheftauto.com/wiki/CreateLight


<light posX="" posY="" posZ="" type="" radius="" color="" dirX="" dirY="" dirZ="" shadows="" />

 

Well, You gave me a great idea for other thing in a near future, however, this function didn't help me at all. Might I'm executing worngly the following function

I tried to create a simple light on my vehicle position with a red colour, however, It didn't work. I tried to change the light type from 1-3

function createTheLight()
	local theVeh = getPedOccupiedVehicle(localPlayer)
	if theVeh then
		local x,y,z = getElementPosition( theVeh )
		createLight(2,x,y,z,25,255,0,0,0,0,90,true)
		outputChatBox("Created Light")
	end
end
addCommandHandler("testlight",createTheLight)

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...