01.02.2011, 17:28
(
Last edited by Fj0rtizFredde; 14/02/2017 at 07:41 AM.
)
Quote:
Hey guys. I'm currently quite inactive here so thats why I haven't responded to your messages. If I ever get more active again I will make a new better version with less bugs and more functions but for now use something else. There is a lot more GPS systems that is way better than this.
|
Here is my new GPS system. It has one of those arrows at the top of the vehicle. It uses a dynamic dialog and it save's everything with SQLite.
Note: This is my first time using SQLite so please the code might look bad at some places but I will work on it
Features:
* Arrow on top of your vehicle that shows will show you where to drive.
* Dynamic list. If there is no data in the database you will not see the dialog.
* You can create places in game but you cant delete them beacuse everything is based on ID's so in that case if you delete number 2 then number 3 should be 2 and 4 be 3 etc.. So I just put a simple software that you can use to change the ID's and delete locations (It must go from 0-MAX_LOCATIONS)
* You can edit names ingame with /Fedit. The old and the new name are separated by a , and no space! Example: /fedit My Old Name,New Name Goes Here!
* Plug & Play. Just put the FGPS in your filterscripts folder and add it to your server.cfg and you are done. If it is the first time you use the filterscript your server needs to restart. (Thats only to make sure everything loads to 100%)
* Textdraw that shows the distance left to your destination. You can disable this in the script
The commands:
To show the gps just type /gps
To turn it off just type /turnoff
To add a location to the database: Login as RCON admin and type /fsave NAME OF PLACE
To edit a location: Login as RCON admin and type /Fedit [OldName] [NewName] (old name = the place you want to edit and new name = the new name of the place
Config:
pawn Code:
#define GPSFile ("Positions.db") //The file where everything should be saved!
#define MAX_LOCATIONS 50 //How many locations you want to have!
#define UseTd //Comment This if you dont want to use the TextDraw! (To comment put // at the begining of this line)
#define GPSDialogID 1111 //The DialogID of the GPS!
Add a place:
Now look at the dialog:
Lets add some more:
And now we look at the gps agian:
The car with arrow:
Distance Meter:
Download:
http://www.speedyshare.com/files/27452646/FGPS.rar (New!)
http://trueserve.info/dl/FGPS.rar Mirror by TruServe <3 (Old!)
Credits:
Fj0rtizFredde = Creator of this script!
Whoever made the GetDistanceBetweenPoints, PointAngle & Split function!
Sacky = Fcreate function
DracoBlue = Dcmd
Ryan = Help me to test this script
If I forgot anyone please tell me
Changelog:
Code:
Version 1.5: Removed the sscanf code! Fixed the /fedit code (Read the features list to see how it works!) Fixed a bug when you had a lot of locations! Made some small changes in the script! Version 1.1: Made some small changes in the code Added /Fedit [OldName] [NewName] so you can edit the names ingame Version 1.0: Release of the script