SA-MP Forums Archive
[FilterScript] GPS System (kind of) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] GPS System (kind of) (/showthread.php?tid=404998)

Pages: 1 2


GPS System (kind of) - electrux - 05.01.2013

GPS SYSTEM
Hey all!!
I present you with my GPS System.
Well its not exactly GPS system as it doesnt give directions, but it can be used in RolePlay servers.
It has a dynamic dialog box which adds the locations as you make them. Each player has his own folder (Thanks to DFile include).

With this system you can add location (to your GPS) and then use them using the dialog.

COMMANDS:

Only 2 commands are currently available.

1. /newgpspos [NAME]
With this, you can add new gps positions to be added in dialog. The 'NAME' parameter specifies the name you want to use for it.

2. /gps
With this command, it shows the dialog of GPS. You can dynamically select the positions by the 'NAME' you entered with /newgpspos.

This system is good for RolePlay servers.
If you want, you can also use this for FreeRoam or stunt servers by directly teleporting. And the best part, the positions will never get lost as they are saved.

SCREENS:

1. When you type /newgpspos [NAME] (here test1 is 'NAME').


2. When you press enter.


3. When you type /gps.


4. Dialog box of GPS.


5. Checkpoint made with X,Y,Z coordinates on chat.


INCLUDES:
1. Dfile
2. ZCMD
3. DINI
4. SSCANF2

CREDITS:
Developers of samp for this awesome multiplayer system.
All the designers of the includes used.
Me for designing this script


DOWNLOAD:

Pastebin

Please dont be rude. If any bugs or problems, tell here .


Re: GPS System (kind of) - Vlad_Dredd - 05.01.2013

HELP!
HTML Code:
 85: if(!dfile_DirectoryExists(folder))
         86: {
         87: dfile_CreateDirectory(folder);
              }
Errors:
HTML Code:
(85) : error 017: undefined symbol "dir_exists"
(87) : error 017: undefined symbol "dfile_CreateDirectory"



Re: GPS System (kind of) - electrux - 05.01.2013

At the top of the dfile include file, type #define USE_PLUGIN_FUNCTIONS

OR

in the dfile include, find stock dir_exists .
Just above it, you will find #if defined blablabla.
Copy the part of same line after if defined, and at the top of include, write #define <the copied part>
. Dont use the <> brackets.

Then after following any of the above, go to server.cfg and add FileManager in plugins part. Like this:
Code:
plugins sscanf FileManager
That should do it.


Re: GPS System (kind of) - Vlad_Dredd - 05.01.2013

Thanks! Good Job!


Re: GPS System (kind of) - electrux - 05.01.2013

Quote:
Originally Posted by Vlad_Dredd
View Post
Thanks! Good Job!
Thanks!


Re: GPS System (kind of) - zSuYaNw - 05.01.2013

Simply.


You use
pawn Code:
#include <a_samp>
#include <sscanf2>
#include <dini>
#include <zcmd>
#include <dfile>
for make this ?


Re: GPS System (kind of) - electrux - 05.01.2013

means??
Well btw i used DFile just for directory stuff. Dini for reading and writing files.


Re: GPS System (kind of) - RedCrossER - 05.01.2013

Good job but try to make a unique one.


Re: GPS System (kind of) - Pro4hock - 05.01.2013

looks nice!


Re: GPS System (kind of) - electrux - 05.01.2013

Thanks all .


Re: GPS System (kind of) - DiGiTaL_AnGeL - 05.01.2013

Quite simple...


AW: GPS System (kind of) - PasMod - 19.03.2013

Great System for beginer (:


Re: GPS System (kind of) - Anak - 19.03.2013

nice .. i will use it in my server.


Re: GPS System (kind of) - Latisha - 09.05.2013

The dialog doesn't show up


Re: GPS System (kind of) - Nobi - 10.05.2013

how to fix



Re: GPS System (kind of) - EragonShadeslayer - 10.05.2013

Well Done.... Keep Up The Good Work


Re: GPS System (kind of) - electrux - 14.06.2013

well... dialog should show up... there aint any reason it wont... except that u may b using more dialogs in other FilterScripts or Gamemodes.. those dialogs MUST return 0 at the end..
for example:
Код:
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Weapons", "Desert Eagle\nAK-47\nCombat Shotgun", "Select", "Close");
 
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14); // Give them a desert eagle
            }
            if(listitem == 1) // They selected the second item - AK-47
            {
                GivePlayerWeapon(playerid, WEAPON_AK47, 120); // Give them an AK-47
            }
            if(listitem == 2) // They selected the third item - Desert Eagle
            {
                GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28); // Give them a Combat Shotgun
            }
        }
        return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
 
    return 0; // You MUST return 0 here! Just like OnPlayerCommandText.
}
Here at last second line, read the comment.


Re: GPS System (kind of) - Tuntun - 14.06.2013

D:\WORLD ATTACK\filterscripts\GPS.pwn(5) : fatal error 100: cannot read from file: "dfile"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Also dfile download link is not working.


Re: GPS System (kind of) - Vin Diesel - 14.06.2013

Awesome JOB!


AW: GPS System (kind of) - GermanfantasticReallife - 07.08.2014

GPSSYSTEM.pwn(85) : error 017: undefined symbol "dir_exists"
GPSSYSTEM.pwn(87) : error 017: undefined symbol "dfile_CreateDirectory"

Whats the Problem there?