Vehicle headlight flashing -
sim_sima - 07.01.2014
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.
Re: Vehicle headlight flashing -
AIped - 07.01.2014
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.
Re: Vehicle headlight flashing -
sim_sima - 08.01.2014
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
Re: Vehicle headlight flashing -
AIped - 08.01.2014
tellme if it worked or found anything else odd
Re: Vehicle headlight flashing -
sim_sima - 08.01.2014
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.
Re: Vehicle headlight flashing -
Steven82 - 08.01.2014
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.
Re: Vehicle headlight flashing -
sim_sima - 08.01.2014
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