[Release] Draw graphs

Draw graphs in FiveM.

Installation

  • Download the resource ;
  • Drag and drop it in your resources folder ;
  • Add start plot to you server.cfg ;
  • Add client_script '@plot/plot.lua' in the resource.lua of the resource that will use the script.

Download

GitHub

Direct

V1 : plot.rar (2.9 KB)

How to use

Commands

Commands can be used don’t need a new script to work, need to be run in game.

/plot create [ID] -- Creates a new plot.

/plot show [ID] -- Shows the plot (needs coordinates).

/plot graph [ID] [x's] and [y's] end -- Changes the x and y coordinates of the dots.

/plot size [ID] [x] [y] -- Changes the size of the plot.

/plot coords [ID] [x] [y] [z] -- Changes the coordinates of the plot (relative to your position).

/plot color [ID] [r] [g] [b] [a] -- Changes the color of the plot

/plot nbraxis [ID] [nbr] -- Changes the amount of values wrote on the axis.

Functions

Functions need to be in an other resource.

Plot.Create(id) -- Creates a new plot.

Plot.Show(id) -- Shows the plot (needs coordinates).

Plot.Graph(id, _x, _y) -- Changes the x and y coordinates of the dots.

Plot.Size(id, _x, _y) -- Changes the size of the plot.

Plot.Coords(id, _x, _y, _z) -- Changes the coordinates of the plot (relative to your position).

Plot.Color(id, _r, _g, _b, _a) -- Changes the color of the plot

Plot.NbrAxis(id, _nbrOfAxis) -- Changes the amount of values wrote on the axis.

Plot.Remove(id) -- Removes the plot.

Plot.Destroy(id) -- Destroys the plot.

Examples

Screenshots

https://imgur.com/a/neJHclD

Video

https://www.youtube.com/watch?v=m45WCj3YckI

Update

No update yet.

Note

  • This is laggy when you draw around 3000 lines.
  • Probably a bit buggy, I tried to make this the most user friendly as possible.
  • I will probably write better documentation in a few days if needed.
1 Like

Honestly I don’t get this. What can it be used for in FiveM?

1 Like

Who knows, but it’s pretty cool none the less.

Neat release.

You’re right. Maybe someone will do something useful out of it ?

hmm im gonna test this :slight_smile:

Could this be used to make something like a crime heat map people can use to see what the most dangerous parts of the map are?

Shit, I could use this as a visible barrier for blocking a part of the map off. I use blips to do so now. But having a 3d wire frame wall might also help enforce. With the plot size command, Does that intern affect the thickness of the line?

Maybe you could do a hear beat monitor ui with it? That’s the first thing I think of when I see it. Great work!

@TrundleTheGreat You could show the evolution of the crime rate for a certain area and compare it with other area.
@davewazere You can’t increase the thickness of the lines.
@DevBear Thanks ! :star_struck:

1 Like

Very nice release!