SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 07/11/2018, 03:50 PM   #1
CaptainBoi
Huge Clucker
 
CaptainBoi's Avatar
 
Join Date: May 2018
Location: Inside Game
Posts: 235
Reputation: 25
Default Dynamic MySQL GPS System

Introduction
I am working for a community, the developer gave me the work to make gps system, with my ideas i made the dynamic gps sytem in which you can create or delete the locations and more.

Pictures








Commands
/agps
/gps
/gpsoff

Bugs
Code:
There are no bugs found yet, if you found please report here.
Credits
Code:
/**********************************
 *                                *
  *   Scripter:    CaptainBoi    *
  *   Version:     1.0           *
  *   Released:    07-11-2018    *
 *                                *
 **********************************/
-a_mysql - BlueG
-streamer - Incognito
-sscanf2 - maddinat0r
-zcmd - Zeex & Yashas
Download
Pastebin - Dynamic MySQL GPS System (1.0)
Pastebin - Dynamic MySQL GPS System (2.0)
Pastebin [Recommended] - Dynamic MySQL GPS System (3.0)
Github Releases [Recommended] - Dynamic MySQL GPS System
__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer

Last edited by CaptainBoi; 11/01/2019 at 02:16 PM.
CaptainBoi is offline   Reply With Quote
Old 07/11/2018, 09:07 PM   #2
Vizi10
Big Clucker
 
Join Date: May 2017
Location: IraN
Posts: 126
Reputation: 1
Default Re: Dynamic MySQL GPS System

that's great
Vizi10 is offline   Reply With Quote
Old 07/11/2018, 09:10 PM   #3
KinderClans
Banned
 
Join Date: May 2018
Location: Italy
Posts: 728
Reputation: 43
Default Re: Dynamic MySQL GPS System

Finally a human readable code, good job!

Would be good also a dynamic MySQL faction system.
KinderClans is offline   Reply With Quote
Old 07/11/2018, 11:14 PM   #4
Deadpoop
Big Clucker
 
Deadpoop's Avatar
 
Join Date: Jul 2016
Posts: 136
Reputation: 5
Default Re: Dynamic MySQL GPS System

ZCMD is by zeex not yashas
__________________
Deadpoop is offline   Reply With Quote
Old 08/11/2018, 05:58 AM   #5
CaptainBoi
Huge Clucker
 
CaptainBoi's Avatar
 
Join Date: May 2018
Location: Inside Game
Posts: 235
Reputation: 25
Default Re: Dynamic MySQL GPS System

Quote:
Originally Posted by Vizi10 View Post
that's great
Thanks

Quote:
Originally Posted by KinderClans View Post
Finally a human readable code, good job!

Would be good also a dynamic MySQL faction system.
Thanks and thanks for the next idea of faction system i will make one and release.

Quote:
Originally Posted by Deadpoop View Post
ZCMD is by zeex not yashas
Well thanks for informing me but i found that ZCMD - IMPROVED version
is made by Yashas so i gave his name but i added Zeex too as he is
real creator of the ZCMD.
__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer
CaptainBoi is offline   Reply With Quote
Old 08/11/2018, 06:04 AM   #6
jmembrey
Little Clucker
 
Join Date: Apr 2018
Posts: 1
Reputation: 0
Default Re: Dynamic MySQL GPS System

wow man thats a good gps system

for some they may say others is better but i think yours is good

regards - Sweet_Johnson.
jmembrey is offline   Reply With Quote
Old 08/11/2018, 06:24 AM   #7
CaptainBoi
Huge Clucker
 
CaptainBoi's Avatar
 
Join Date: May 2018
Location: Inside Game
Posts: 235
Reputation: 25
Default Re: Dynamic MySQL GPS System

New Updates
Code:
-Changed /gps into 2 menu options (Show Locations, Turn Off GPS).
-Removed /gpsoff and added into /gps and /agps.
-Added information in /agps.
-Added information in /gps.
Quote:
Originally Posted by jmembrey View Post
wow man thats a good gps system

for some they may say others is better but i think yours is good

regards - Sweet_Johnson.
Thanks.
__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer
CaptainBoi is offline   Reply With Quote
Old 08/11/2018, 07:50 AM   #8
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 551
Reputation: 90
Default Re: Dynamic MySQL GPS System

First and foremost, escape any input given by players.

https://github.com/CaptainBoi/Dynami...system1.1#L205
Only column `LocationName` is selected but you try to retrieve position:
https://github.com/CaptainBoi/Dynami...1.1#L216-#L218
when these three columns are not in select expression.

pawn Code:
WHERE `S.No` > -1 LIMIT 10
LIMIT without ORDER BY selects random rows if there are more than 10 locations. Option says "You can see all the available GPS locations." but you still limit it to only 10 results. Also group it by `S.No` column.

You forgot to delete cache: https://github.com/CaptainBoi/Dynami...system1.1#L155

Another problem is that you do not rely on affected rows and these can fail:
https://github.com/CaptainBoi/Dynami...1.1#L156-#L160
https://github.com/CaptainBoi/Dynami...1.1#L169-#L173

It will send a message that I have added location in my gps even if I input anything greater than 100 characters which results in Error in query (1406): Data too long for column.
It will send a message that I have removed gps location even if the location name does not exist.

Since you select based on location name, set it as INDEX.

Good to see the global option DUPLICATE_CONNECTIONS in use.
Calisthenics is offline   Reply With Quote
Old 08/11/2018, 08:39 AM   #9
CaptainBoi
Huge Clucker
 
CaptainBoi's Avatar
 
Join Date: May 2018
Location: Inside Game
Posts: 235
Reputation: 25
Default Re: Dynamic MySQL GPS System

Thanks for the report.
New Updates
Code:
- Many changes as per the post
- Limit Changed
__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer
CaptainBoi is offline   Reply With Quote
Old 08/11/2018, 09:12 AM   #10
CaptainBoi
Huge Clucker
 
CaptainBoi's Avatar
 
Join Date: May 2018
Location: Inside Game
Posts: 235
Reputation: 25
Default Re: Dynamic MySQL GPS System

New Updates
Code:
- Some script changes
- Bug fixed in /gps
__________________
Code:
Releases
[FilterScript] Dynamic MySQL GPS System
[Tutorial] How to make TDM Team Selection.
[Include] moneybar.inc || Coloured Moneybar || Released
[Tutorial] PAWN Compiler In Notepad++
[FilterScript] Perks System (v: [On Update]) [DINI, ZCMD]
[FilterScript] Realistic Transmission Speedometer
CaptainBoi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] Dynamic Actors System [MySQL R41-4] KinderClans Filterscripts 5 23/10/2018 06:58 PM
[FilterScript] Group System (2). [MySQL\Dynamic Rank and permission system] verlaj Filterscripts 11 26/08/2017 07:53 PM
[FilterScript] Dynamic Bus System [MySQL-ZCMD] Skyrise Filterscripts 15 16/05/2013 04:26 AM
[Help] Mysql Dynamic System. tony_fitto Scripting Help 4 07/07/2012 03:10 AM


All times are GMT. The time now is 12:41 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.