How to detect the luminosity level ?
#1

Hello everyone,

Do you know if it is possible to detect the luminosity level at a specific point (or for a player) ?
GTA SA detects that (when a car is in the dark, the lights are switched on automatically), but is it possible with samp ?


Tanks a lot
Reply
#2

Not that i know of.

But you could implement your own function using GetPlayerTime quite easily. Also if you set the weather you would need to take that into account.

You would need to look how dark it is (once per in-game hour) and make your own luminosity rating, it's doable.
IIRC the darkness only changes on the hour. (may be wrong about that)
Reply
#3

Hi,

Tanks for your reply.

In fact, I want to detect if a player is in the shadow (of a bridge, in the subway, ...). I don't want to know the global luminosity of a weather.

I can develop workaround (specify dark zones manually), but I try to find a better way.


++
Reply
#4

An idea ?
Reply
#5

There are no functions to detect it.
Reply
#6

You mean when the player icon on the radar turns blue? Not possible.
Reply
#7

Quote:
Originally Posted by C0b0ll
Посмотреть сообщение
Hi,

Tanks for your reply.

In fact, I want to detect if a player is in the shadow (of a bridge, in the subway, ...). I don't want to know the global luminosity of a weather.

I can develop workaround (specify dark zones manually), but I try to find a better way.


++
There's no better way than getting all the dark zones. And even that would require too much work IMO, if you want it to be perfect.
Reply
#8

+Using Shadow enhancing mods like enb or colormod on client side will have those players be hidden not only in the specified zones, but also in dark shadows outside.
This could result in dumb modders wondering why the things you want to do with hidden players don't work when they are actually hidden.
So they will spam you with bug-reports at 4am in the morning, and you'll wake up and get out of the bed to check the messages, stumble over your shoes and fall on the edge of your desk with your head and die.
So... better not implement it :3
Reply
#9

Weather 2 allows sirens at any day time. I'm not sure about car lights but it should probably allow them.
Reply
#10

I don't want to know the global luminosity of a weather.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)