[FilterScript] SAMPDictionary - English Dictionary for SA-MP
#1

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

It would be great to add synonyms as well.
Reply
#3

Awesome
Reply
#4

Clever. A translator would be nice.
Reply
#5

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

Good to see you made a Good script again.
Reply
#7

GoodJob dude
Reply
#8

Awesome work mate.
Reply
#9

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)