Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. Gameplay
      2. Missions
      3. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Arena War
      2. After Hours
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA Next

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
Ethenal

Emergency lights (police/ambulance/fire) without siren

Recommended Posts

Ethenal

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!

Share this post


Link to post
Share on other sites
Daaxter

It would be very interesting how to do it.I hope someone can help you ;)

Share this post


Link to post
Share on other sites
jordRiot

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!

Share this post


Link to post
Share on other sites
Fireboyd78

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?

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

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 :(

Share this post


Link to post
Share on other sites
Ethenal

Does anybody know how it was done in GTA IV? Was there a native used?

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

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. :/

Share this post


Link to post
Share on other sites
Skorpro

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 by Skorpro

Share this post


Link to post
Share on other sites
ClareXoBearrx3R9

 

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 :O

 

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. :D

Edited by ClareXoBearrx3

Share this post


Link to post
Share on other sites
Mr.Arrow

I thought GTA 5 ELS is already good for a vanilla game

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.