Here is a little script M.Asquith#6157 on discord told me to make…

PlaceToGps

the title says it all

Make any place have your way-point set by your declaration

Usage

Chat: /gps <any place you declared in config.lua> -> Will set your x,y for the waypoint you declared.

Here is some laggy footage of what it does.

Installation

  1. Install the resource
  2. Move it to your resources folder
  3. Add start PlaceToGps to your server.cfg

Configuration (Adding Entries)

  • Go to config.lua
  • Follow the syntax by declaring the variables (inside var main).

TEMPLATE:

main = {
    ["Place"] = {x, y},
    ["You can even have spaces"] = {x, y},
    ["dashes-too"] = {x, y}
}

EXAMPLE:

main = {
    ["Strip Club"] = {126.135, -1278.583},
    ["Place 2"] = {127, -1000.23}
}

In-game: /gps Strip Club will set the coords to the set declared (to x,y)

Those strings will act as arguments for when you do /gps <place>


NOTE: Make sure to add a comma after a new 'entry' EXCEPT for the last one. You will break syntax if you don't do that.

5 Likes

Neat, this could be useful.

cool im gonna use this for my server thanks m8

Nice script! Could be nice if it was menu based :slight_smile:

Feature:

Make it if you type /gps strip cl it will loop through and see if someone close matches. And take that for ex i got one [“Helicopter”] and i do /gps heli and it will match it with that.

Nice! Another possible feature of just /gps or a separate command to show you all places you can go to.
Ex: /gps or /places
Avaialble waypoints: Strip club, Sheriff station, sandy gas station, etc

@Jake1 I’ll def. do something like that soon.
@qalle I don’t really understand what you mean.
@Dootar Def. in the future

I think @qalle mean, that it can understand the places by short names too. Example: if there is “Helicopter” in the database, you don’t need to type the whole word, just the first 4-5 letters(“Heli”)
And also you can use string.lower conversation to work without high letters.

I’ll look into it when I get back home.

there must be a webpage that has all the locations and cords pre-done?

yes learn to use github and subit a PR to the original repo please

or fork it to your own github apply your changes and post a link to that

@thatziv Mind if I post a fork in here of a C# version using commands & NativeUI with all the streets and some additional locations?

1 Like

Yea go ahead. I think that a c# version will be great!

Work with customchat ?

This is wicked, people asked me for a way to waypoint to streets and I’ve got 100+ street names and co-ords and all they have to do is /gps Atlee St and it waypoints there, thanks!

Hey how can I have it so the script is not case sensitive. Because at the moment if I capitalize it and it isn’t capitalized in the config it isn’t remembered?

Has anyone got the full array of street names to hand?