traffic lights?

Started by MEGAMIND, Oct 11, 2024, 04:45 PM

Previous topic - Next topic

MEGAMIND

Well its one of my codes from tune vehicle
        player.Vehicle.SetHandlingData(29, -3); //geen front
        player.Vehicle.SetHandlingData(29, -2); //orange front
        player.Vehicle.SetHandlingData(30, -7); //green rear
        player.Vehicle.SetHandlingData(30, -6); //orange rear
        player.Vehicle.SetHandlingData(30, -5); //red     
that changes headlights and rear lights, but i have a feeling that these are trafic lights in gta vc that are somehow hard coded in server.exe for vehicles front and back lights

tell me im wrong, these lights are real and can be seen in some mission, if yes pls refer me the mission too, otherwise i request the devs or scripters that is there a way to add neons to a car too? below it? or play with cars shadow or add a sprite or something below it? also add custom objects too it like spoiler bumper etc? as in samp

@Sebastian @habi2

vitovc

car neon is possible with client side script sprite but it will have 1 frame lag delay. for moving car its too much even at 60fps (and lag compensation will make it not smooth)
...::: vice city :::...
Useful things for vcmp: Relative position and finding an angle (in 3d), 3d line (like laser)

Sebastian

#2
They are totally traffic lights. First time I've discovered them I was hoping to find even more haha... but nah, that's pretty much it.
There is one more small black sphere which we can use, but idk exactly what would be the use for it in Vice City.

As for the neon object.. well.. you need to attach it to the vehicle so they will get synced together.
There is no such function yet, so all you can do is set a timer to be called 500ms maybe; but that looks bad.
(I've already tried it)

The neon object is all about the 2dfx lighting and shadowing. Nothing hard to do.
We just need a function like attachObjectToVehicle.

PS: These lights can also be bought in #TomorrowLand in the tuning garage :D

Sebastian

Though, I just got an idea of how to attach a neon to the car, for good.
It might work.

But, by the 'design' of the approach, it's not something u can use in a public server. It's just an insane idea and most probably buggy xd
Maybe I will try it this wk, just for the lol, and record a video of it.

habi2

#4
I understand first three pictures. But what is that black picture in the fourth section?



Well, nothing seems to be hardcoded in server.exe, since :



i.e. whatever value you give to server, it directly passes to client. To my surprise, it is 4 bytes instead of 1 byte. If you pass -1, it will pass as ff ff ff ff

So it is the client which is doing it. As others have told, try client side.


Offtopic: I just found that you can paste image directly into imgur !!

MEGAMIND

#5
Quote from: habi2 on Oct 12, 2024, 06:20 AMI understand first three pictures. But what is that black picture in the fourth section?



Well, nothing seems to be hardcoded in server.exe, since :



i.e. whatever value you give to server, it directly passes to client. To my surprise, it is 4 bytes instead of 1 byte. If you pass -1, it will pass as ff ff ff ff

So it is the client which is doing it. As others have told, try client side.


Offtopic: I just found that you can paste image directly into imgur !!
the black picture is nothing, also is there an example òf how to attach anything to something, i used attach system but thats also not as expected as it shoukd work

i habe made a neone system that also goes back when vehicle moves forward also a made a gamemode example ctf and gtb the flag pickup and breifcase pickups gets attached to player but when u run forward the pickups stay with player but a step behind

video with vehicle https://imgur.com/dAbkrSI

Edit: So the questiom remains how are the traffic lights so perfectly attached?

also one did by stormeus also perfectly attached

vitovc

QuoteSo the questiom remains how are the traffic lights so perfectly attached?
obviously - not by game's scripts. best that game script can provide is 1 frame delay sprite.
...::: vice city :::...
Useful things for vcmp: Relative position and finding an angle (in 3d), 3d line (like laser)

MEGAMIND

Quote from: vitovc on Oct 12, 2024, 10:51 AM
QuoteSo the questiom remains how are the traffic lights so perfectly attached?
obviously - not by game's scripts. best that game script can provide is 1 frame delay sprite.
this means it is done by the devs them selves? i mean the traffix lights positioning to the car is done by devs somehow?

Sebastian

The traffic lights on cars were not introduced by VC:MP or something.
This must be the Vice City engine itself.

MEGAMIND

Quote from: Sebastian on Oct 13, 2024, 09:49 AMThe traffic lights on cars were not introduced by VC:MP or something.
This must be the Vice City engine itself.
ever saw in normal gta vc ? if yes pls do share me the evidence any mission or video

MEGAMIND

Quote from: Sebastian on Oct 13, 2024, 09:49 AMThe traffic lights on cars were not introduced by VC:MP or something.
This must be the Vice City engine itself.
player.Vehicle.SetHandlingData(29, -3); //geen front
        player.Vehicle.SetHandlingData(29, -2); //orange front
        player.Vehicle.SetHandlingData(30, -7); //green rear
        player.Vehicle.SetHandlingData(30, -6); //orange rear
        player.Vehicle.SetHandlingData(30, -5); //red     
@Sebastian were these codes were a random findings? or can we add something else to it too?

Sebastian

random findings; back in the day, I was testing random things on a daily basis