View Issue Details

IDProjectCategoryView StatusLast Update
0005822Multi Theft Auto : San AndreasClientpublic2015-06-23 00:10
ReporterGhOsT[X] Assigned Toccw  
Status resolvedResolutionfixed 
Target Version1.5Fixed in Version1.5 
Summary0005822: [Request] Light creation

I'm Requesting a function to create gta lights.

See additional info.

Additional Information

The names of the function,could be: createLight, createFlash,
createFlashLight, createFlashLightAt.

And the parameters: x,y,z,color,radius

The opcodes are: createLight (09E5) - createFlash (058A).

On GTA Forums, there are some more info.

void add_gta_light(char type, float pos_x_in, float pos_y_in, float pos_z_in, float dir_x_in, float dir_y_in, float dir_z_in, float radius_in, float red_in, float green_in, float blue_in, char a12, char a13, float alpha_in)

address: 0x007000E0


TagsNo tags attached.


has duplicate 0006024 closed New issues [Request] createLight( float x, float y, float z, float size, int r, int g, int b, int a, visibleTo ) 
related to 0007582 closed New issues Add Searchlight Function 
child of 0003344 closed New Feature Requests Requested features tracker 
child of 0008737 resolvedccw Source patches PointLight Creation 



2011-01-20 08:46

administrator   ~~0012640

what's the difference between a flash light and a Corona?


2011-01-20 11:17

viewer   ~~0012642

"...this will only create the part of the light that actually illuminates objects."


2011-01-20 22:21

viewer   ~~0012649

Last edited: 2011-01-20 23:29

Hm. one of the differences are clearly in the function, corona doesn't has a direction parameter, and light does. ('Atleast' is documented with the 3 direction parameters in GTA Forums.)

Another thing is that lights have two types: point and spot.

But needs to check how it affects the game, if causes any problems to the graphic and if the memory address is correct.

This can be low priority, but its a amazing feature that mta needs.

I just have this screenshot as example: (Flashlight created by SCM, using the 095C opcode). (The red effect).


2011-06-12 12:48

reporter   ~~0013657

Please add a feature.


2011-06-16 06:02

viewer   ~~0013686

You can do this if you add a 2D FX in the DFF, but with script you can do more things of course, but its possible , I made maps with this :


2011-11-26 12:47

viewer   ~~0015280

This gonna be added? :)


2012-02-29 13:15

viewer   ~~0016180

Please add.


2012-03-01 10:12

viewer   ~~0016185

yes, its very important


2012-03-04 00:38

viewer   ~~0016224

Yo , Lets talk ! Dudes ! This is already possible in DFF and there is no huge difference between a gta light and a corona marker -.-

The big difference is the gta light have a light effect on vehicles and peds and some small objects, but this light effect is really poorly made, I find it only good on vehicles, I tested it !

  • corona marker can be scripted to flash or other animation, gta light have limited animation.

So I think the best is to look if this Per-pixel lighting or other good lighting is possible using shaders Element.


2012-03-04 02:34

reporter   ~~0016225

the question is not whether its poorly made or not. the question is why would you want to deny people access to this, if its a feature of gta.


2012-03-04 02:40

viewer   ~~0016226

If someone gets a .patch file for MTA, then perhaps they'll look into it. Why should the devs bother wasting time adding this themselves ?


2012-03-05 15:24

updater   ~~0016239

Please add a feature.


2012-03-05 16:38

reporter   ~~0016240

LeetWoovie: [...] Why should the devs bother wasting time adding this themselves ?

Adding new functions aren't waste of time


2012-03-27 18:10

viewer   ~~0016380

Last edited: 2012-03-27 18:10

These functions are quite esscencial for MTA:SA.

Cleo3 can perfectly handle these functions, so why LUA cannot?

We should totally add these functions to the library and make it an MTA Element.

This could be really helpful in the creating of many good resources. In my opinion i've been waiting for a function like this to appear. It is indeed a good idea to add them.

Coronas aren't light elements, they are objects which only have a flashing effect on itself, and it doesn't produce any reflection effect on any object nor world.


2012-03-29 17:44

viewer   ~~0016394

Adding new functions when you have a ton of bugs is. My point is, if you want this perhaps you should learn C++ and create your .patch for the team.


2012-04-01 15:31

viewer   ~~0016406

Agree with the feature. It's needed.


2012-04-04 05:45

viewer   ~~0016418

+1 LeetWoovie

You can also do this


2012-04-10 11:14

administrator   ~~0016448


Use RpWorldAddLight ( ... ) ---\/

struct RpLight
RwObjectFrame object;
float radius;
RwColorFloat color;
float unknown1;
RwList sectors;
RwListEntry globalLights;
unsigned short frame;
unsigned short unknown2;


2012-04-24 14:38

viewer   ~~0016530

This is the neon light from SA-MP,

I think you can do this with material colours and the .dff file, but I don't know how, I can't do it.


2012-07-07 15:14

viewer   ~~0016983

LeetWoovie, that's why i suggested to put this as a low priority change.


2013-11-01 14:36

reporter   ~~0019589

Last edited: 2013-11-01 14:37

is it alive?


2014-04-26 12:01

reporter   ~~0020768

Patch for light elements


2014-04-26 12:19

administrator   ~~0020769

Isn't this already in MTA:Eir?


2014-04-26 12:23

viewer   ~~0020770

Last edited: 2014-04-26 12:24

Dynamic lighting already exists in MTA:Eir, indeed. I don't know exactly what types of light sources there are, though.


2014-04-26 15:58

reporter   ~~0020771

Dynamic lighting exists in MTA now too, but there is not functions for using it

Issue History

Date Modified Username Field Change