Jump to content

Plugin Support


D.Johnson

Recommended Posts

Hello. 

I'm new to making plugins and would just like a little support.

I'm trying to make a plugin so when you press a key the lights on the police vehicle will turn on with no sound.

I know you can already do this in game but this is the base of my plugin. Can anyone help me with making the code for this action.

If you are able to help me you will be placed on who made this plugin list to show my appreciation for your support.

Thank You For Reading.

Please comment or feel free to message me.

Hello

Link to comment
Share on other sites

Pretty simple to do really, set the siren on then set it to silent for the vehicle in question.

//Create or assign the vehicle
Vehicle myVehicle = new Vehicle("POLICE", SpawnPoint);

//Set the siren to on (lights and siren)
myVehicle.IsSirenOn = true;

//Mute the siren
myVehicle.IsSirenSilent = true;

Once you've done that just sit the code within a keybind check

if(Game.IsKeyDown(Key)){

//Mute siren here

}

Thats from an old copy of RPH. These methods may or may not still exist, check the documentation.

Live Streaming daily from 8pm GMT (UK) at https://twitch.tv/OfficialLukeD - I play a variety of things 😄

Join my official discord server for support, general chat and my stream schedule! https://discord.gg/Mddj7PQ

Link to comment
Share on other sites

10 minutes ago, LukeD said:

Pretty simple to do really, set the siren on then set it to silent for the vehicle in question.


//Create or assign the vehicle
Vehicle myVehicle = new Vehicle("POLICE", SpawnPoint);

//Set the siren to on (lights and siren)
myVehicle.IsSirenOn = true;

//Mute the siren
myVehicle.IsSirenSilent = true;

Once you've done that just sit the code within a keybind check


if(Game.IsKeyDown(Key)){

//Mute siren here

}

Thats from an old copy of RPH. These methods may or may not still exist, check the documentation.

Thank you very much :) ill sure check the documents now!

Hello

Link to comment
Share on other sites

1 hour ago, khorio said:

Precisely! :thumbsup:

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

1 hour ago, OfficerJammy said:

Just a quick question albo. Would you be interested in working on this plugin with me? If you are Ill let you know the details and things?

Currently really busy, sorry!

My YouTube: Click here. 

My Discord Server - https://discord.gg/0taiZvBSiw5qGAXU

Useful post? Let me and others know by clicking the Like button.
Check out my many script modifications! 
Having issues? LSPDFR Troubleshooter by Albo1125.

Link to comment
Share on other sites

  • 4 years later...

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.



×
×
  • Create New...