[FilterScript] Dynamic MySQL GPS System
#1

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

that's great
Reply
#3

Finally a human readable code, good job!

Would be good also a dynamic MySQL faction system.
Reply
#4

ZCMD is by zeex not yashas
Reply
#5

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

wow man thats a good gps system

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

regards - Sweet_Johnson.
Reply
#7

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

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

Thanks for the report.
New Updates
Code:
- Many changes as per the post
- Limit Changed
Reply
#10

New Updates
Code:
- Some script changes
- Bug fixed in /gps
Reply
#11

I am sorry to say but I see no 'many changes'. You only fixed the unknown columns in line 216, everything else remained the same:

- no escaping input
- not deleting cache in one place
- no affected rows = success message anyway
- no index

Changing LIMIT 10 to LIMIT 100 does not change anything. You do not need LIMIT in the first place, just GROUP BY `S.No` and remove WHERE clause as well.

You also removed global option DUPLICATE_CONNECTIONS for no reason. Now any gamemode connecting to the same database and server will result in warning in mysql logs.
Reply
#12

Wow Epic
Reply
#13

Quote:
Originally Posted by Calisthenics
Посмотреть сообщение
I am sorry to say but I see no 'many changes'. You only fixed the unknown columns in line 216, everything else remained the same:

- no escaping input
- not deleting cache in one place
- no affected rows = success message anyway
- no index

Changing LIMIT 10 to LIMIT 100 does not change anything. You do not need LIMIT in the first place, just GROUP BY `S.No` and remove WHERE clause as well.

You also removed global option DUPLICATE_CONNECTIONS for no reason. Now any gamemode connecting to the same database and server will result in warning in mysql logs.
Hey dude, can i know the lines?
and i wanna talk about index and affected rows.
What are the problems in them?

Quote:
Originally Posted by ZigGamerx
Посмотреть сообщение
Wow Epic
Thanks
Reply
#14

Updates
Код:
-Dialog ids are now in Enum.
-if(dialogid) changed to switch(dialogid);
-if(listitem) changed to switch(listitem);
-Minor bugs fixed and code improved.
-Script final version released.
Thanks to Sys for helping me in improving the codes.
Reply
#15

nice
Reply
#16

Quote:
Originally Posted by Venom546
Посмотреть сообщение
nice
thanks
Reply
#17

That's nice bro, I like it +Rep
Reply
#18

Quote:
Originally Posted by Wherethescripters
Посмотреть сообщение
That's nice bro, I like it +Rep
Thanks.
Reply
#19

More Pics Added
Reply
#20

Good job i like it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)