Ethenal 41 Posted May 13, 2015 Share Posted May 13, 2015 Has anyone figured out how to do this yet? I'm specifically just trying to enable the lights on a police car without turning the siren on i.e. ELS for GTA IV. However, I think ELS has a implementation where it actually switches the textures on and off to make the lights function properly... it would likely have to be done differently in this game. I've tried SET_VEHICLE_LIGHTS and GET_VEHICLE_LIGHTS_STATE but for all my testing, both functions only seem to be related to headlights being on/off/bright (also seems to have a function related to whether the lights are supposed to be on because it's nighttime, or off during the day). I also tried SET_SIREN_WITH_NO_DRIVER but that doesn't seem to do anything (more accurately I don't know how to use it properly)... SET_VEHICLE_SIREN only does what it says, turns the lights AND siren on. I'm thinking it must be somewhat simple since the police lights stay on when you get out of the car... but maybe that's internal code where they stop playing the siren when you get out of the car. Either way, I really like this functionality from ELS and I'd like to implement it in GTA V. Thanks for your help guys! Link to post Share on other sites
Daaxter 0 Posted May 20, 2015 Share Posted May 20, 2015 It would be very interesting how to do it.I hope someone can help you Link to post Share on other sites
jordRiot 1 Posted May 20, 2015 Share Posted May 20, 2015 Fraid it doesn't look possible, even with a dirty looking hack to stop the sound... The VEHICLE::SET_VEHICLE_SIREN function allows for TRUE or FALSE... True being sirens and lights on, and False being no sirens and lights.In other words, they're not independent and work together. The sirens are turned off when the player exits due to AUDIO::SET_SIREN_WITH_NO_DRIVER being defaulted to FALSE. I would believe that an ELS type mod will need to create lights and strobe them manually in place of the in-game lights and overlay a siren which can be triggered independently! Link to post Share on other sites
Fireboyd78 383 Posted May 20, 2015 Share Posted May 20, 2015 There's still many unknown natives. Does anyone know of a time in the game where the siren lights are on, but no sounds are playing? Link to post Share on other sites
ClareXoBearrx3R9 250 Posted May 21, 2015 Share Posted May 21, 2015 Not that I'm aware of. I as well have been looking and similar to IV, haven't found anything. SET_SIREN_WITH_NO_DRIVER will control whether the sirens sound when no driver is in it. Further, in GTA IV, if one turned the engine off, the sirens would go off. If you turn the engine off in GTA V however, the sirens are still on (as long as someone is in the driver's seat). So I'm at a loss on this, I'm afraid Link to post Share on other sites
Ethenal 41 Posted May 22, 2015 Author Share Posted May 22, 2015 Does anybody know how it was done in GTA IV? Was there a native used? Link to post Share on other sites
ClareXoBearrx3R9 250 Posted May 22, 2015 Share Posted May 22, 2015 If I recall correctly, this was never in GTA IV either. Was it? I tried implementing such a feature back in IV with no success. The only mod that accompanied that was ELS which was primarily texture based, with light effects. Link to post Share on other sites
Skorpro 129 Posted May 23, 2015 Share Posted May 23, 2015 (edited) If I recall correctly, this was never in GTA IV either. Was it? I tried implementing such a feature back in IV with no success. The only mod that accompanied that was ELS which was primarily texture based, with light effects. Does anybody know how it was done in GTA IV? Was there a native used? No, there is a trick how to switch off the siren sound in GTA IV! I've used this method in my Undercover Mod. Solution (GTA 4 only): switch the siren on and off very fast (see my try for GTA V below...) Anyway! I checked this method with GTA V, but the sound is "faster" So it's useless... #define INTERVAL 2int iSiren = 0;int iSirenWait = 0;void main(){ // MAIN WAIT(2000); while (true) { // NoSirenSound if (skpk(116)) // <F5> { if (iSiren == 0) { if (IS_PED_IN_ANY_POLICE_VEHICLE(ich)) iSiren = 1; else skpp("Get a Police Car!"); } else iSiren = 0; } // LOOP if (iSiren == 1) { if (IS_PED_IN_ANY_POLICE_VEHICLE(ich)) { Vehicle polcar = GET_VEHICLE_PED_IS_USING(ich); if (iSirenWait == 0) SET_VEHICLE_SIREN(polcar, 1); iSirenWait++; if (iSirenWait >= INTERVAL) { SET_VEHICLE_SIREN(polcar, 0); iSirenWait = 0; } } else iSiren = 2; } else if ( (iSiren == 2) && (IS_PED_IN_ANY_POLICE_VEHICLE(ich)) ) iSiren = 1; WAIT(0); }} EDIT: Don't use skpk (key function) or skpp (print function)... Edited May 23, 2015 by Skorpro 1 Link to post Share on other sites
ClareXoBearrx3R9 250 Posted May 23, 2015 Share Posted May 23, 2015 (edited) If I recall correctly, this was never in GTA IV either. Was it? I tried implementing such a feature back in IV with no success. The only mod that accompanied that was ELS which was primarily texture based, with light effects. Does anybody know how it was done in GTA IV? Was there a native used? No, there is a trick how to switch off the siren sound in GTA IV! I've used this method in my Undercover Mod.Solution (GTA 4 only): switch the siren on and off very fast (see my try for GTA V below...) Anyway! I checked this method with GTA V, but the sound is "faster" So it's useless... #define INTERVAL 2int iSiren = 0;int iSirenWait = 0;void main(){ // MAIN WAIT(2000); while (true) { // NoSirenSound if (skpk(116)) // <F5> { if (iSiren == 0) { if (IS_PED_IN_ANY_POLICE_VEHICLE(ich)) iSiren = 1; else skpp("Get a Police Car!"); } else iSiren = 0; } // LOOP if (iSiren == 1) { if (IS_PED_IN_ANY_POLICE_VEHICLE(ich)) { Vehicle polcar = GET_VEHICLE_PED_IS_USING(ich); if (iSirenWait == 0) SET_VEHICLE_SIREN(polcar, 1); iSirenWait++; if (iSirenWait >= INTERVAL) { SET_VEHICLE_SIREN(polcar, 0); iSirenWait = 0; } } else iSiren = 2; } else if ( (iSiren == 2) && (IS_PED_IN_ANY_POLICE_VEHICLE(ich)) ) iSiren = 1; WAIT(0); }}EDIT: Don't use skpk (key function) or skpp (print function)... Oooh I'll have to try that sometime when I get home! I did not know about that, thanks for the info Shame it wouldn't work for GTA V but if I find a way, I'll surely post it. Edited May 23, 2015 by ClareXoBearrx3 Link to post Share on other sites
Mr.Arrow 761 Posted May 23, 2015 Share Posted May 23, 2015 I thought GTA 5 ELS is already good for a vanilla game Link to post Share on other sites