[RELEASE] Paradise Area

This is a development library and does nothing on it’s own. In the hands of a somewhat capable developer it can become the borders of a prison, the edge of a safe zone, the delivery zone for stolen vehicles or whatever else you might want.

It is a relatively simple and easy way to define an area, and then determine if something is in that area.
I grew frustrated with the limitations of the built-in stuff in GTA and was prepared to sacrifice a little performance to get what I wanted.
This is the result.

During normal operations, these borders shouldn’t be visible, but they are great for debugging those “WTF, I thought I was inside the border now?!” moments. There were a lot of those during development.

In an attempt to avoid documentation rot, I won’t be keeping this thread updated at all. No change log, no nothing. Everything will be documented on github. This thread will only be used for discussion about the resource and my feeble attempts to render any assistance needed.

Visit Paradise Area on Github for all of that.

Enjoy to the extent possible.

Again: This resource is intended for developer use only, and does exactly nothing on it’s own!

37 Likes

Great but how to make ut visible ?

The GitHub repository README contains everything you want to know, what you’re looking for is most likely this:

1 Like

You .draw() it.

There are a bunch of examples in the area.lua file. I suggest you look at them :smiley:

1 Like

Thanks )

Not sure how I missed this resource but very cool. Much better than everything being within a radius. This will come in very helpful.

Enjoy to the extent possible.

That’s a great release, thanks

1 Like

Hi,
I feel like a fool, but I’m biting the bullet and asking for help. :smile:
I’m attempting to use this dependency, but with no luck.

Steps

  1. Created a new folder called solprison
  2. Create my _resource.lua file
    dependency 'paradise-area'
    client_scripts{@paradise-area/area.lua,'cl_prison.lua'}
  3. Copied the included demo code
  4. Created a new cl_prison.lua file & pasted demo code
    with and without 'if true do'

I spent 2 hours plotting points for a couple areas (confidently ignorant) and realized afterwards that I couldn’t get the resource to link properly. I also revisited the FiveM Scripting Documentation to see if I missed anything. Calling ‘paradise-area’ seems to be alluding me.

Any assistance/clarity would be greatly appreciated! :nerd_face:

I’d be happy to help you out, but you’re not giving me a lot to work with here.

What errors are you seeing? What does your code look like?

Well…I think you just offering to help was enough. :smile:

I was in the process of responding, happened to restart the server so I can test the resource again, and it worked. Of course. :stuck_out_tongue:

To clarify: For testing purposes, all I did was extract the ‘demo’ code and create a new (separate) resource to test out how to link resources properly.

I did have a Q about vector amounts. Is there a max number to stay under for one area?

This is a wonderful resource btw, thank you! :smile:

I’m glad you like it!

I’ve had areas made up of ~80 points without much of an issue, but it really starts to show some performance difficulties around that point. It depends on your hardware, obviously.
As a general rule, I’ve tried to stay below 20 points. Since it’s not supposed to be drawn and visible anyway, corners can be cut.

Okay, cool. 80 is nice, but I’ll definitely work around the 20 point limit. A lot less than the 150+ I think I had for my border haha. :grin:

Thanks again for the assistance! :+1:

1 Like