Vehicle headlight flashing
#1

Hello guys.
Recently I made a small script that allows the player to control emergency lights on emergency vehicles.
There is a small issue though. Every time the headlights flashes, the hoos will start shaking if it is broken.
Take a look at this video:
http://www.youtube.com/watch?v=_49vb...ature=*********
I have seen other servers with the flashing headlights, without the shaking hood.

Hope you can help me. Thanks.
Reply
#2

LOL never seen that before nice video XD
but i think its because there are 2 ways of scripting these vehicle headlightsflashing

1 = using GetVehicleDamageStatus and UpdateVehicleDamageStatus. In this case the lights
are not set off but actually broken and repaired again. (this might be causing the problem but i could be wrong)

2 = a much better way using
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,toggle,lights,alarm,d oors,bonnet,boot,objective);

this way the lights are realy on and off..in this case when a front light breaks..it wont go on again if you flash your lights...with example 1 it repairs itselfs wich its obviously shouldnt...
anyway... i cant say if thats the problem but it might give you something to think about..try to use both ways and see if the problem is still there.
Reply
#3

Quote:
Originally Posted by AIped
Посмотреть сообщение
LOL never seen that before nice video XD
but i think its because there are 2 ways of scripting these vehicle headlightsflashing

1 = using GetVehicleDamageStatus and UpdateVehicleDamageStatus. In this case the lights
are not set off but actually broken and repaired again. (this might be causing the problem but i could be wrong)

2 = a much better way using
GetVehicleParamsEx(vehicleid,engine,lights,alarm,d oors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,toggle,lights,alarm,d oors,bonnet,boot,objective);

this way the lights are realy on and off..in this case when a front light breaks..it wont go on again if you flash your lights...with example 1 it repairs itselfs wich its obviously shouldnt...
anyway... i cant say if thats the problem but it might give you something to think about..try to use both ways and see if the problem is still there.
Okay thanks. I will try
Reply
#4

tellme if it worked or found anything else odd
Reply
#5

I don't know how to do it then. SetVehicleParamsEx can only have lights 1 or 0. It seems like the lights can not be controlled individually with this function.
Reply
#6

Quote:
Originally Posted by sim_sima
Посмотреть сообщение
I don't know how to do it then. SetVehicleParamsEx can only have lights 1 or 0. It seems like the lights can not be controlled individually with this function.
Correct, using the above method the lights would only flash on and off. Not in a specific pattern that you'd like to have them through the method that you originally created it with. Although this is a weird bug, I guess you'll just have to deal with it until fixed.
Reply
#7

Quote:
Originally Posted by Steven82
Посмотреть сообщение
Correct, using the above method the lights would only flash on and off. Not in a specific pattern that you'd like to have them through the method that you originally created it with. Although this is a weird bug, I guess you'll just have to deal with it until fixed.
But I have seen it working on other servers, I believe
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)