SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 16/12/2010, 01:31 PM   #1
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Exclamation MySQL E-Mail system!

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 Code:
// 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 Code:
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 - Y_Less
RyDeR` - replaceChar function.
wups - Email system
Change Log

Code:
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


Last edited by wups; 30/07/2011 at 01:08 PM.
wups is offline   Reply With Quote
Old 16/12/2010, 01:42 PM   #2
Fool
Gangsta
 
Fool's Avatar
 
Join Date: Jul 2010
Location: the middle east
Posts: 711
Reputation: 155
Default Re: MySQL E-Mail system!

First, wow, nice Work good job. i sure will be using this for some reason, now back to reading this topic.
Fool is offline   Reply With Quote
Old 16/12/2010, 01:52 PM   #3
Flyfishes
Huge Clucker
 
Flyfishes's Avatar
 
Join Date: Jul 2010
Location: Stockholm, Sweden
Posts: 357
Reputation: 4
Default Re: MySQL E-Mail system!

Haha cool. I might use this
__________________
Flyfishes is offline   Reply With Quote
Old 16/12/2010, 02:04 PM   #4
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Default Re: MySQL E-Mail system!

Please report if you find any bugs!
wups is offline   Reply With Quote
Old 16/12/2010, 02:39 PM   #5
Cody09
Little Clucker
 
Join Date: Jul 2010
Posts: 41
Reputation: 0
Default AW: MySQL E-Mail system!

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
__________________
Sorry for my bad english, speak german^^
Cody09 is offline   Reply With Quote
Old 16/12/2010, 02:46 PM   #6
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Default Re: MySQL E-Mail system!

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.
wups is offline   Reply With Quote
Old 16/12/2010, 02:48 PM   #7
RealCop228
Godfather
 
Join Date: Feb 2010
Location: Springboro, OH
Posts: 8,269
Reputation: 670
Default Re: MySQL E-Mail system!

Do the messages store inside of the MySQL database for some sort of logging?
__________________
Putting [URGENT] in the thread title stops me from opening the thread. Nobody else's problem on this forum is more important that another person's. Try not to be self-centered!
RealCop228 is offline   Reply With Quote
Old 16/12/2010, 02:50 PM   #8
wups
High-roller
 
wups's Avatar
 
Join Date: Apr 2010
Location: Lithuania
Posts: 1,369
Reputation: 132
Default Re: MySQL E-Mail system!

Quote:
Originally Posted by RealCop228 View Post
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.
wups is offline   Reply With Quote
Old 16/12/2010, 03:09 PM   #9
666
Big Clucker
 
666's Avatar
 
Join Date: Aug 2010
Posts: 73
Reputation: 25
Default Re: MySQL E-Mail system!

This is kind of nice, might use this for I dont know what :P
666 is offline   Reply With Quote
Old 16/12/2010, 03:17 PM   #10
DeathOnaStick
High-roller
 
DeathOnaStick's Avatar
 
Join Date: May 2009
Location: 127.0.0.1
Posts: 1,081
Reputation: 25
Default Re: MySQL E-Mail system!

Pretty good idea! Not too complicated, but an awesome idea anyway! Never thought about storing messages in a mysql database. Good work!
__________________
If this helps you, please thank me by giving me reputation points
DeathOnaStick 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
[Plugin] PWN Mail Exploder 0.3 Romanius Релизы/Releases 35 21/09/2013 01:11 PM
[FilterScript] [FS][MAIL] Newsletter system 0.1 Striker_Moe Filterscripts 10 07/08/2010 08:49 AM
e-mail plugin denis1999 Help Archive 3 05/03/2010 06:26 AM
[HELP] mail roleplay501 Help Archive 5 02/06/2009 02:34 PM


All times are GMT. The time now is 07:02 AM.


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