SA-MP Forums Archive
[FilterScript] MySQL E-Mail system! - 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] MySQL E-Mail system! (/showthread.php?tid=199708)



MySQL E-Mail system! - wups - 16.12.2010

MySQL E-Mail system v1.0
I present you a MySQL E-Mail system i made.
Don't ask in this thread if you don't know how to use mysql! There are millions of guides for this. However, this filterscript creates the table by itself.

What is it meant for?
Players of your server can e-mail each other even if one of them is offline!
You can delete a message or reply to a message.


Installing


First, download the .pwn file below.
Second - place it in the filterscripts directory.
Then open it with PAWNO and change these defines:
pawn Код:
// You must configure these!
#define SQL_IP                        "YOUR IP HERE"
#define SQL_USER                      "YOUR USER HERE"
#define SQL_PASSWORD                  "YOUR PASS HERE"
#define SQL_DB                        "YOUR DB HERE"
And compile.
Finally, open server.cfg and add Email to the end of filterscripts. Example:
pawn Код:
filterscripts base anims Email
And of course start the server!
P.S. You must use a mysql plugin. Works fine with G-sTyLeZzZ

Credits


mktime - DracoBlue
sscanf - ******
RyDeR` - replaceChar function.
wups - Email system
Change Log

Код:
v1.0 
- Added line seperator.
- Fixed SQL Injection bugs.
- Removed @EMAIL_NAME.com (now you just have to input the players name).
- Some small fixes.
v0.9 
- Some minor bug fixes.
v0.8
- Initial release.
Screens


OTHER PICTURES: http://imageshack.us/g/705/samp171tt.png/

Last notes


The command for the system is /email
If you have any suggestions/complains - post them here. I'll try to help you.
Also, trading a cookie to a video!

Download


Pastebin v1.0
Pastebin v0.9




Re: MySQL E-Mail system! - Fool - 16.12.2010

First, wow, nice Work good job. i sure will be using this for some reason, now back to reading this topic.


Re: MySQL E-Mail system! - Flyfishes - 16.12.2010

Haha cool. I might use this


Re: MySQL E-Mail system! - wups - 16.12.2010

Please report if you find any bugs!


AW: MySQL E-Mail system! - Cody09 - 16.12.2010

what can I do with this System? Write a email, and someone else ingame can read it? or can I ingame send a real email to me or s.th


Re: MySQL E-Mail system! - wups - 16.12.2010

The reciever can read the message no mater if you are on or off. Also, messages don't disappear after server restart.
The system is only in game. Of course you can make a php version.


Re: MySQL E-Mail system! - Scenario - 16.12.2010

Do the messages store inside of the MySQL database for some sort of logging?


Re: MySQL E-Mail system! - wups - 16.12.2010

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Do the messages store inside of the MySQL database for some sort of logging?
I didn't quite catch that.

If you are asking if the messages have any sorting functions - yes, you can sort by the `MK` row.


Re: MySQL E-Mail system! - 666 - 16.12.2010

This is kind of nice, might use this for I dont know what :P


Re: MySQL E-Mail system! - DeathOnaStick - 16.12.2010

Pretty good idea! Not too complicated, but an awesome idea anyway! Never thought about storing messages in a mysql database. Good work!


Re: MySQL E-Mail system! - wups - 04.03.2011

Ok, so I updated it with a couple of bug fixes.


Re: MySQL E-Mail system! - Raimis_R - 04.03.2011

Cool.
I like it. : )


Re: MySQL E-Mail system! - AlternativeDC - 23.05.2011

Good work Man!


Re: MySQL E-Mail system! - BASITJALIL - 23.05.2011

Fantastic Work


Re: MySQL E-Mail system! - wups - 30.07.2011

Stable version 1.0 released!


Re: MySQL E-Mail system! - royal_king - 30.07.2011

Woot! it's cool nice share


AW: MySQL E-Mail system! - xX60CentXx - 12.10.2011

nice nice


Re: MySQL E-Mail system! - [MM]18240[FMB] - 17.07.2012

Hello, could you possible make this save to file instead of MySql for small servers, and the MySql'ly challenged?


Re: MySQL E-Mail system! - Zempist - 21.02.2013

i like it, looks great


Re: MySQL E-Mail system! - xDaidal0S - 21.02.2013

Great work and very useful.