Jump to content

Callout within a Certain Distance?


ToastinYou

Recommended Posts

How do I make it so someone must be within a certain spawnpoint or a certain distance from a point or spawnpoint or wherever the callout spawns or else it will just cancel itself?

I have 

ShowCalloutAreaBlipBeforeAccepting(new Vector3(-1758.445f, 125.273f, 64.774f), 30f);
            AddMinimumDistanceCheck(100f, new Vector3(-1758.445f, 125.273f, 64.774f));

but it doesn't seem to work as I can be anywhere on the map and it'll still be called and can be accepted.

My callout is basically in the school, which is where the coords are, and I just want to make sure you have to be within like a towns/districs distance or else it dispatch won't call you for it or it'll disregard itself.

Link to comment
Share on other sites

if (Game.LocalPlayer.Character.DistanceTo(vector3)>minimumDistance) { return false; }

Semi-pseudocode as I'm not on my dev pc atm for proper syntax etc, but hopefully it should make enough sense.

My YouTube Channel: Darkmyre Gaming (Australian LSPDFR patrols, plugins in development, and other games)

My Discord Server | AusGamer Network

 

Please do not PM me for technical support or bug reports, use the appropriate forum or plugin's comments instead.

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