[FilterScript] GPS System (kind of)
#1

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 .
Reply
#2

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"
Reply
#3

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.
Reply
#4

Thanks! Good Job!
Reply
#5

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

Simply.


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

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

Good job but try to make a unique one.
Reply
#9

looks nice!
Reply
#10

Thanks all .
Reply
#11

Quite simple...
Reply
#12

Great System for beginer (:
Reply
#13

nice .. i will use it in my server.
Reply
#14

The dialog doesn't show up
Reply
#15

how to fix
Reply
#16

Well Done.... Keep Up The Good Work
Reply
#17

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.
Reply
#18

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.
Reply
#19

Awesome JOB!
Reply
#20

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

Whats the Problem there?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)