thatziv
1
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
- Install the resource
- Move it to your resources folder
- 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
Dootar
4
Nice script! Could be nice if it was menu based 
qalle
5
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.
Jake1
6
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
thatziv
8
@Jake1 I’ll def. do something like that soon.
@qalle I don’t really understand what you mean.
@Dootar Def. in the future
GNG2017
9
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.
thatziv
10
I’ll look into it when I get back home.
ifne
11
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
thatziv
14
Yea go ahead. I think that a c# version will be great!
Modo
16
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?