Jump to content

Getting location and setting correct vehicle


Fiskey111

Recommended Posts

Hi all,

I was just curious to know how you can detect the location of the player and apply that to what units should spawn?  Basically - if the player is in Blaine County I want to recognize that and spawn a sheriff car in my callouts.  It doesn't need to be exact.  Any ideas?

Thanks!

 

 

Link to comment
Share on other sites

In the LSPDFR API, use Functions.GetWorldZone (or something like that). Then you can get the county property of the worldzone object, and check if it's Los Santos (city), Los Santos County, or Blaine County.  

[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!

Link to comment
Share on other sites

On 3/7/2016 at 6:10 PM, fiskey111 said:

Hi all,

I was just curious to know how you can detect the location of the player and apply that to what units should spawn?  Basically - if the player is in Blaine County I want to recognize that and spawn a sheriff car in my callouts.  It doesn't need to be exact.  Any ideas?

Thanks!

 

Stealth22
LSPDFR Tester | Plugin Developer
My Plugins: Code 3 Callouts | Traffic Control | Keep Calm | ALPR+

Please do not PM me for any kind of technical support.
I unfortunately do not have enough free time to answer every PM that I get. For issues with my plugins, please post in the comments section of the file, or it's forum thread. You'll get a much quicker response from me there than if you send me a PM; I do my best to respond to every question in the comments sections. For API/programming questions, please post them in the API Development forum, so all developers can benefit from the answer as well. Thanks!

Link to comment
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.



×
×
  • Create New...