Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Add Vehicles/Peds to duty menu

Featured Replies

Hey there :)

I'm new in coding with the LCPDFR API. 

Is there a way to add Vehicles or peds to the menu when I go onDuty, so for example, when I choose a vehicle that I can add there a helicopter or something like that?

 

greetings,

Steve

  • Author
vor 7 Minuten schrieb firebuff101:

No, there isn't a way.

Hmm okay thank you, but is there a way to start a callout when I am in a specific vehicle? So that my "sampleCallout" only appears if I am sitting in an e.g. Jet?

17 minutes ago, Stvxv.g said:

Hmm okay thank you, but is there a way to start a callout when I am in a specific vehicle? So that my "sampleCallout" only appears if I am sitting in an e.g. Jet?

No

I don't understand the point of signatures on this site. What the fuck is the point?

  • Author
vor 8 Minuten schrieb firebuff101:

I don't know what you're trying to ask

Look. When I go onDuty, I can choose between LSPD, LSSD etc. and between Vehicles.

 

My question is, if I can code my callout that it will only appear if I am for example LSPD, but when I am LSSD the callout will not appear.

 

Perfectly it would be, if I can code callouts that they only appear if I am inside of an specific vehicle, but you said there is no way.

  • Author
vor 8 Minuten schrieb firebuff101:

Agency Callouts sort of does that, but only with its included callouts. @Stvxv.g. You could also try getting EUP and forcing duty.

I also want that only with my callouts. How can I implement that into my code? Is there somthing like "getPedOccupiedVehicle" what I can check for?

7 minutes ago, Stvxv.g said:

I also want that only with my callouts. How can I implement that into my code? Is there somthing like "getPedOccupiedVehicle" what I can check for?

I don't write code, so I don't know

I don't understand the point of signatures on this site. What the fuck is the point?

9 minutes ago, Stvxv.g said:

Brah. If you don't write code, then how you could have answered my first question?

Because I know how this works. You can't add shit to it because the mod wasn't written that way. Everyone knows that. That question has been answered over and over since LSPDFR was released.

Edited by firebuff101

I don't understand the point of signatures on this site. What the fuck is the point?

@Stvxv.g you can't add peds/vehicles to the go on duty menu but when making your callout you can override the OnBeforeCalloutDisplayed() method and there check whatever you want, for example

public override bool OnBeforeCalloutDisplayed()
{
	if (Game.LocalPlayer.Character.Model != new Model("your_model"))
      	return false;  // if the player isn't the specified model, abort the callout
  
	if (!Game.LocalPlayer.Character.IsInAnyVehicle(false) || Game.LocalPlayer.Character.CurrentVehicle.Model != new Model("vehiclemodel"))
      	return false; // if the player isn't in a vehicle or the current vehicle isn't the specified model, abort the callout
  
  
  	// if all checks passed, continue...
}

 

Edited by alexguirre

36 minutes ago, firebuff101 said:

Because I know how this works. You can't add shit to it because the mod wasn't written that way. Everyone knows that. That question has been answered over and over since LSPDFR was released.

 

I've told you time and time again, you don't have to be so angry when replying to topics. Tone it down, or don't reply at all.

Invenio, Investigatio, Imperium

1 hour ago, alexguirre said:

@Stvxv.g you can't add peds/vehicles to the go on duty menu but when making your callout you can override the OnBeforeCalloutDisplayed() method and there check whatever you want, for example


public override bool OnBeforeCalloutDisplayed()
{
	if (Game.LocalPlayer.Character.Model != new Model("your_model"))
      	return false;  // if the player isn't the specified model, abort the callout
  
	if (!Game.LocalPlayer.Character.IsInAnyVehicle(false) || Game.LocalPlayer.Character.CurrentVehicle.Model != new Model("vehiclemodel"))
      	return false; // if the player isn't in a vehicle or the current vehicle isn't the specified model, abort the callout
  
  
  	// if all checks passed, continue...
}

 

 

In addition to what alex said, you can also check the vehicle type:

 

public override bool OnBeforeCalloutDisplayed()
{
  	// Returns false (cancelling the callout) if the player is not in a vehicle or is not in a plane
  	// Note that you have to check isInAnyVehicle first, because CurrentVehicle will be null if 
	// the player isn't in a vehicle, which would crash the plugin. 
	if (!Game.LocalPlayer.Character.IsInAnyVehicle(false) || !Game.LocalPlayer.Character.CurrentVehicle.IsPlane)
      	return false; 
  
}

 

[REL] Coastal Callouts: An action-packed mod with new vehicles, maps, capabilities, and callouts in and around the waters of Los Santos

[REL] Police Tape: Make your scenes more realistic while stopping peds and traffic

[REL] Better EMS: Realistic and dynamic EMS response

Join the Parks Benefactor Program to support my work and get early beta access!

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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.