SA-MP Forums Archive
[FilterScript] SAMPDictionary - English Dictionary for SA-MP - 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] SAMPDictionary - English Dictionary for SA-MP (/showthread.php?tid=590001)



SAMPDictionary - English Dictionary for SA-MP - Lordzy - 24.09.2015

SAMPDictionary
Version - 1.0
Introduction

SAMPDictionary is a simple dictionary system that allows you to get definitions of English words in-game. This works on MySQL using the English dictionary database file by x16bkkamz6rkb78 (AKA) "john smith" of sourceforge.net. This filterscript has got only one command currently - /dictionary which displays all the available definitions in a dialog.

Some of the definitions are big, so only 4 definitions are shown at a time for a word. To display more, you can click "Next" button. Note that there won't be a "Next" button if the asked word doesn't have more than four definitions.


Download

GitHub - https://github.com/Lordzy/SAMPDictionary
Release - https://github.com/Lordzy/SAMPDictionary/releases


Installation


- After downloading, extract all the contents to your server directory.
- Open "dictionary.pwn", edit the SQL configuration defines and compile. (You will require zcmd and latest MySQL versions)
- Open phpMyAdmin and login if necessary.
- Select a database.
- Click on import tab and select the "dictionaryStudyTool.sql" from the database folder and upload.

Pictures


http://imgur.com/a/6gIOW (Due to higher resolution, I'm providing the link only).

Thanks to

x16bkkamz6rkb78 (AKA) "john smith" for MySQL English Dictionary database file.
BlueG & maddinat0r for MySQL Plugin.
Zeex for zcmd.

There are no issues found yet, report them if you find any.


Re: SAMPDictionary - English Dictionary for SA-MP - Pottus - 24.09.2015

It would be great to add synonyms as well.


Re: SAMPDictionary - English Dictionary for SA-MP - X337 - 25.09.2015

Awesome


Re: SAMPDictionary - English Dictionary for SA-MP - Crayder - 25.09.2015

Clever. A translator would be nice.


Re: SAMPDictionary - English Dictionary for SA-MP - Abagail - 25.09.2015

I recommend making a version that utilizes SQLite(or just having a define to switch between the two).

Also, Crayder:
pawn Код:
format(temp_Definition, sizeof(temp_Definition), "http://translate.******.com/translate_tts?tl=en&q=%s",
                word);
            PlayAudioStreamForPlayer(playerid, temp_Definition);
The language is easily changable unless you mean translating the original text and not playing it as audio(the above snippet is from the filterscript). Though I believe an API is also available for translating the text.


Re: SAMPDictionary - English Dictionary for SA-MP - Team_PRO - 25.09.2015

Good to see you made a Good script again.


Re: SAMPDictionary - English Dictionary for SA-MP - Younes44 - 25.09.2015

GoodJob dude


Re: SAMPDictionary - English Dictionary for SA-MP - SpikY_ - 25.09.2015

Awesome work mate.


Re: SAMPDictionary - English Dictionary for SA-MP - Lordzy - 26.09.2015

Quote:
Originally Posted by Pottus
Посмотреть сообщение
It would be great to add synonyms as well.
I got a database containing English synonyms, but it takes ALOT of time to be imported which will probably be a pain for most of the users. I'll either find a simple synonyms database or try to parse them when I got time.

Minor Update (Optional) - Changed the size of "temp_Definition" from 500 to 260 and "temp_dString" from 2000 -> 1500. I just realized now that the maximum length of definition is 256.


Re: SAMPDictionary - English Dictionary for SA-MP - Lordzy - 06.10.2015

I realize now that ****** uses it's captcha verification for it's translator sometimes, so you might not receive the audio while searching for a word. Just set PRONOUNCE_WORD define to 0 to disable streaming the word's pronunciation.