Private Message System
Features: ( v0.0.1 ): https://imgur.com/a/8LwlHyu
DOWNLOAD V0.0.1 -> https://pastebin.com/44HNsvw4
DOWNLOAD V0.0.1( SQL ) -> https://pastebin.com/SA0LjRPH
Required files:
SSCANF( WINDOWS ) : https://github.com/maddinat0r/sscanf....8.3-win32.zip
SSCANF( LINUX ) : https://github.com/maddinat0r/sscanf...3-linux.tar.gz
ZCMD: https://pastebin.com/SbJc7iXa
MySQL( WINDOWS ) : https://github.com/pBlueG/SA-MP-MySQ...41-4-win32.zip
MySQL( CENTOS7 ) : https://github.com/pBlueG/SA-MP-MySQ...CentOS7.tar.gz
MySQL( DEBIAN ) : https://github.com/pBlueG/SA-MP-MySQ...-static.tar.gz
Features: ( v0.0.1 ): https://imgur.com/a/8LwlHyu
Code:
- Seven commands - two RCON admin commands.
- Abillity to send a private message.
- Abillity to send an extended private message.
- Abillity to block private messages from specified player.
- Abillity to send an offline private message.
- Abillity to tog private messages for everyone (RCON).
- Abillity to view deleted private messages (RCON).
- Abillity to view offline private messages.
- Abillity to view your private message history.
- Abillity to delete your private message.
- Warning you recieve upon login if you have an unread private message (/OPM FEATURE).
DOWNLOAD V0.0.1 -> https://pastebin.com/44HNsvw4
PHP Code:
/*
__ _ _ ___ _
/ _(_)_ __ ___ _ __ | | ___ / _ \/\/\ ___ _ _ ___| |_ ___ _ __ ___
\ \| | '_ ` _ \| '_ \| |/ _ \ / /_)/ \ / __| | | / __| __/ _ \ '_ ` _ \
_\ \ | | | | | | |_) | | __/ / ___/ /\/\ \ \__ \ |_| \__ \ || __/ | | | | |
\__/_|_| |_| |_| .__/|_|\___| \/ \/ \/ |___/\__, |___/\__\___|_| |_| |_|
|_| |___/
*/
/*|============================================================================================|*/
/*|========================================| INCLUDES |========================================|*/
#include < a_samp >
#include < sscanf2 >
#include < zcmd >
#include < a_mysql >
#define SPLIT ( 85 )
#define USAGE "{02B0F5}"
#define WHITE "{FFFFFF}"
#define RED "{E85656}"
#define ORANGE "{DBB300}"
#define ADMIN "{9E4141}"
#define GREEN "{17BF41}"
#define HOST "localhost"
#define USER "root"
#define PASSWORD ""
#define DATABASE "pmsys"
#define DEF_STRSIZE ( 800 ) // Increase if needed
#define equal(%0,%1) !strcmp(%0,%1,false) && strlen(%0) == strlen(%1)
/*|========================================| INCLUDES |========================================|*/
/*|============================================================================================|*/
/*|========================================| VARIABLES |=======================================|*/
new bool:PlayerBlockingPM[ MAX_PLAYERS ] [ MAX_PLAYERS ] = { false, ... }, bool:PMSblocked = false;
new MySQL:sqlGameConnection, SelectedPMID[ MAX_PLAYERS ] [ MAX_PLAYERS ];
new PMSender[ MAX_PLAYERS ] [ MAX_PLAYERS ] [ 35 ], PMMessage[ MAX_PLAYERS ] [ MAX_PLAYERS ] [ 170 ];
new PMIDFinal[ MAX_PLAYERS ] = { -1, ... }, PMReciever[ MAX_PLAYERS ] [ 35 ];
/*|========================================| VARIABLES |=======================================|*/
/*|============================================================================================|*/
/*|========================================| ENUMATORS |=======================================|*/
enum {
DIALOG_REGISTER = 1,
DIALOG_LOGIN,
DIALOG_OPMS,
DIALOG_OPMS_2,
DIALOG_PMHISTORY,
DIALOG_PMHISTORY_2,
DIALOG_SHOWDELETEDPMS,
DIALOG_SHOWDELETEDPMS_2
};
enum pInfo {
pPassword[ 20 ]
};
new PlayerInfo[ MAX_PLAYERS ] [ pInfo ];
/*|========================================| ENUMATORS |=======================================|*/
/*|============================================================================================|*/
/*|========================================| CALLBACKS |=======================================|*/
public OnFilterScriptInit( ) {
sqlGameConnection = mysql_connect( HOST, USER, PASSWORD, DATABASE );
if( mysql_errno( ) != 0 ) print( "Failed to establish the connection with the MySQL database!" );
else {
print( "|==========| PM SYSTEM |==========|" );
print( " By: Valentin Shadow" );
print( " Successfully loaded!" );
print( "|==========| PM SYSTEM |==========|" );
}
return ( true );
}
public OnPlayerDisconnect( playerid, reason ) {
for( new i, j = MAX_PLAYERS; i < j; i++ ) {
PlayerBlockingPM[ playerid ] [ i ] = false;
PlayerBlockingPM[ i ] [ playerid ] = false;
SelectedPMID[ playerid ] [ i ] = -1;
format( PMSender[ playerid ] [ i ], 35, "%s", EOS );
format( PMMessage[ playerid ] [ i ], 170, "%s", EOS );
}
format( PMReciever[ playerid ], 35, "%s", EOS );
PMIDFinal[ playerid ] = -1;
format( PlayerInfo[ playerid ] [ pPassword ], 20, "%s", EOS );
return ( true );
}
public OnPlayerConnect( playerid ) {
new query[ 128 ];
format( query, sizeof( query ), "SELECT * FROM `players` WHERE `Name` = '%s'", PlayerName( playerid ) );
mysql_tquery( sqlGameConnection, query, "FetchAccount", "d", playerid );
return ( true );
}
public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) {
switch( dialogid ) {
case DIALOG_REGISTER: {
if( response ) {
if( strlen( inputtext ) > 20 || strlen( inputtext ) < 3 ) {
SendClientMessage( playerid, -1, ""RED"| WARNING: | "WHITE"Your password mustn't be above 20 or below 3 characters/numbers/symbols!" );
ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration",\
"Your account was failed to be found in the MySQL database!\n\
Please below type your desired password to proceed:", "Select", "Cancel" );
} else {
new query[ 128 ];
mysql_format( sqlGameConnection, query, sizeof( query ), "INSERT INTO `players`( `Name`, `Password` ) VALUES( '%e', '%e' )", PlayerName( playerid ), inputtext );
mysql_tquery( sqlGameConnection, query );
SendClientMessage( playerid, -1, "Registration "GREEN"successfully "WHITE"completed!" );
}
}
else Kick( playerid );
}
case DIALOG_LOGIN: {
if( response ) {
if( equal( inputtext, PlayerInfo[ playerid ] [ pPassword ] ) ) {
new query[ 128 ];
SendClientMessage( playerid, -1, "You've "GREEN"successfully "WHITE"logged in!" );
format( query, sizeof( query ), "SELECT * FROM `opms` WHERE `Name` = '%s' AND `ReadMsg` = '0'", PlayerName( playerid ) );
mysql_tquery( sqlGameConnection, query, "FetchOPMs", "d", playerid );
} else {
SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"Wrong password!" );
ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Loggin",\
"Your account was successfully found in the MySQL database!\n\
Please below type your correct password to proceed:", "Proceed", "Cancel" );
}
}
else Kick( playerid );
}
case DIALOG_OPMS: {
if( response ) {
new tmp[ 200 ], str[ DEF_STRSIZE ], query[ 128 ];
new id = SelectedPMID[ playerid ] [ listitem ];
strcat( str, "|==========| PRIVATE MESSAGE |==========|\n" );
format( tmp, sizeof( tmp ), "Private message from: %s\n", PMSender[ playerid ] [ listitem ] );
strcat( str, tmp );
format( tmp, sizeof( tmp ), "Message: %s\n", PMMessage[ playerid ] [ listitem ] );
strcat( str, tmp );
strcat( str, "|==========| PRIVATE MESSAGE |==========|\n" );
ShowPlayerDialog( playerid, DIALOG_OPMS_2, DIALOG_STYLE_MSGBOX, "Offline Message", str, "Close", "" );
format( query, sizeof( query ), "UPDATE `opms` SET `ReadMsg` = '1' WHERE `ID` = '%d'", id );
mysql_tquery( sqlGameConnection, query );
}
}
case DIALOG_PMHISTORY: {
if( response ) {
new tmp[ 200 ], str[ DEF_STRSIZE ];
PMIDFinal[ playerid ] = SelectedPMID[ playerid ] [ listitem ];
strcat( str, "|==========| PRIVATE MESSAGE |==========|\n" );
format( tmp, sizeof( tmp ), "Private message from: %s\n", PMSender[ playerid ] [ listitem ] );
strcat( str, tmp );
format( tmp, sizeof( tmp ), "Message: %s\n", PMMessage[ playerid ] [ listitem ] );
strcat( str, tmp );
strcat( str, "|==========| PRIVATE MESSAGE |==========|\n" );
ShowPlayerDialog( playerid, DIALOG_PMHISTORY_2, DIALOG_STYLE_MSGBOX, "PM History", str, "Close", "Delete" );
}
}
case DIALOG_PMHISTORY_2: {
if( !response ) {
new query[ 128 ];
format( query, sizeof( query ), "UPDATE `opms` SET `Deleted` = '1' WHERE `ID` = '%d'", PMIDFinal[ playerid ] );
mysql_tquery( sqlGameConnection, query );
SendClientMessage( playerid, -1, "Private message has been "GREEN"successfully "WHITE"deleted!" );
}
}
case DIALOG_SHOWDELETEDPMS: {
if( response ) {
new tmp[ 200 ], str[ DEF_STRSIZE ];
strcat( str, "|==========| PRIVATE MESSAGE |==========|\n" );
format( tmp, sizeof( tmp ), "Reciever: %s\n", PMReciever[ playerid ] );
strcat( str, tmp );
format( tmp, sizeof( tmp ), "Private message from: %s\n", PMSender[ playerid ] [ listitem ] );
strcat( str, tmp );
format( tmp, sizeof( tmp ), "Message: %s\n", PMMessage[ playerid ] [ listitem ] );
strcat( str, tmp );
strcat( str, "|==========| PRIVATE MESSAGE |==========|\n" );
ShowPlayerDialog( playerid, DIALOG_SHOWDELETEDPMS_2, DIALOG_STYLE_MSGBOX, PMReciever[ playerid ], str, "Close", "" );
}
}
}
return ( true );
}
/*|========================================| CALLBACKS |=======================================|*/
/*|============================================================================================|*/
/*|========================================| FUNCTIONS |=======================================|*/
SendClientMessageEx( playerid, color, const text[ ], { Float, _ }:... ) {
static args, str[ 144 ];
if( ( args = numargs( ) ) == 3 ){
SendClientMessage( playerid, color, text );
} else {
while( --args >= 3 ) {
#emit LCTRL 5
#emit LOAD.alt args
#emit SHL.C.alt 2
#emit ADD.C 12
#emit ADD
#emit LOAD.I
#emit PUSH.pri
}
#emit PUSH.S text
#emit PUSH.C 144
#emit PUSH.C str
#emit PUSH.S 8
#emit SYSREQ.C format
#emit LCTRL 5
#emit SCTRL 4
SendClientMessage(playerid, color, str);
#emit RETN
}
return ( true );
}
PlayerName( playerid ) {
new name[ MAX_PLAYER_NAME+1 ];
GetPlayerName( playerid, name, sizeof( name ) );
return name;
}
PName( playerid ) {
new name[ 24 ];
strmid( name, str_replace( '_', ' ', PlayerName( playerid ) ), 0, MAX_PLAYER_NAME );
return name;
}
str_replace( sSearch, sReplace, const sSubject[ ] ) {
new sReturn[ 128 ];
format( sReturn, sizeof( sReturn ), sSubject );
for( new i, j = sizeof( sReturn ); i < j; i++ ) {
if( sReturn[ i ] == sSearch ) {
sReturn[ i ] = sReplace;
}
}
return sReturn;
}
forward FetchAccount( playerid );
public FetchAccount( playerid ) {
if( !cache_num_rows( ) ) ShowPlayerDialog( playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD, "Registration",\
"Your account was failed to be found in the MySQL database!\n\
Please below type your desired password to proceed:", "Select", "Cancel" );
else {
cache_get_value_name( 0, "Password", PlayerInfo[ playerid ] [ pPassword ], 20 );
ShowPlayerDialog( playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Loggin",\
"Your account was successfully found in the MySQL database!\n\
Please below type your correct password to proceed:", "Proceed", "Cancel" );
}
return ( true );
}
forward OfflinePrivateMsg( playerid, name[ ], text[ ] );
public OfflinePrivateMsg( playerid, name[ ], text[ ] ) {
if( cache_num_rows( ) ) {
new query[ 500 ];
mysql_format( sqlGameConnection, query, sizeof( query ), "INSERT INTO `opms`(`Name`, `Sender`, `Message`)VALUES('%e', '%e', '%e')", name, PlayerName( playerid ), text );
mysql_tquery( sqlGameConnection, query );
if( strlen( text ) > SPLIT ) {
SendClientMessageEx( playerid, -1, "Private message to %s has been "GREEN"successfully "WHITE"sent!", name );
SendClientMessageEx( playerid, -1, "-> %.*s ...", SPLIT, text );
SendClientMessageEx( playerid, -1, "..- %s", text[ SPLIT ] );
} else {
SendClientMessageEx( playerid, -1, "Private message to %s has been "GREEN"successfully "WHITE"sent!", name );
SendClientMessageEx( playerid, -1, "-> %s", text );
}
}
else SendClientMessageEx( playerid, -1, ""RED"| ERROR: | "WHITE"%s unsuccessfully found in the MySQL database!", name );
return ( true );
}
forward FetchOPMs( playerid );
public FetchOPMs( playerid ) {
if( cache_num_rows( ) ) return SendClientMessageEx( playerid, -1, ""RED"| WARNING: | "WHITE"You've %d unread private messages.", cache_num_rows( ) );
return ( true );
}
forward FetchOfflinePMS( playerid );
public FetchOfflinePMS( playerid ) {
new tmp[ 80 ], str[ DEF_STRSIZE ], count, id;
if( cache_num_rows( ) ) {
for( new i, j = cache_num_rows( ); i < j; i++ ) {
cache_get_value_name_int( i, "ID", id );
cache_get_value_name( i, "Sender", PMSender[ playerid ] [ count ], 35 );
cache_get_value_name( i, "Message", PMMessage[ playerid ] [ count ], 170 );
SelectedPMID[ playerid ] [ count ] = id;
format( tmp, sizeof( tmp ), "Private message from %s\n", PMSender[ playerid ] [ count ] );
strcat( str, tmp );
count ++;
}
ShowPlayerDialog( playerid, DIALOG_OPMS, DIALOG_STYLE_LIST, "Offline PMs", str, "Select", "Close" );
}
else SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"No offline private messages found!" );
return ( true );
}
forward FetchPMHistory( playerid );
public FetchPMHistory( playerid ) {
new count, id, tmp[ 80 ], str[ DEF_STRSIZE ];
if( cache_num_rows( ) ) {
for( new i, j = cache_num_rows( ); i < j; i++ ) {
cache_get_value_name_int( i, "ID", id );
cache_get_value_name( i, "Sender", PMSender[ playerid ] [ count ], 35 );
cache_get_value_name( i, "Message", PMMessage[ playerid ] [ count ], 170 );
SelectedPMID[ playerid ] [ count ] = id;
format( tmp , sizeof( tmp ), "Private message from %s\n", PMSender[ playerid ] [ count ] );
strcat( str, tmp );
count ++;
}
ShowPlayerDialog( playerid, DIALOG_PMHISTORY, DIALOG_STYLE_LIST, "PM History", str, "Done", "Close" );
}
else SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"PM history is empty!" );
return ( true );
}
forward FetchDeletedPMs( playerid, name[ ] );
public FetchDeletedPMs( playerid, name[ ] ) {
new id, count = 0, str[ DEF_STRSIZE ], tmp[ 80 ];
if( cache_num_rows( ) ) {
for( new i, j = cache_num_rows( ); i < j; i++ ) {
cache_get_value_name_int( i, "ID", id );
if( count == 0 ) cache_get_value_name( i, "Name", PMReciever[ playerid ], 35 );
cache_get_value_name( i, "Sender", PMSender[ playerid ] [ count ], 35 );
cache_get_value_name( i, "Message", PMMessage[ playerid ] [ count ], 170 );
SelectedPMID[ playerid ] [ count ] = id;
format( tmp, sizeof( tmp ), "Deleted message from %s\n", PMSender[ playerid ] [ count ] );
strcat( str, tmp );
count ++;
}
ShowPlayerDialog( playerid, DIALOG_SHOWDELETEDPMS, DIALOG_STYLE_LIST, PMReciever[ playerid ], str, "Select", "Cancel" );
}
return ( true );
}
/*|========================================| FUNCTIONS |=======================================|*/
/*|============================================================================================|*/
/*|========================================| COMMANDS |========================================|*/
CMD:pmhelp( playerid ) return SendClientMessageEx( playerid, -1, ""USAGE"| Commands: | "WHITE"/pm, /blockpm, /opm, /pmhistory, /opms%s", ( IsPlayerAdmin( playerid ) ) ? ( ", /togpms, /viewdeletedpms." ) : ( "." ) );
CMD:pm( playerid, params[ ] ) {
new giveplayerid, text[ 170 ];
if( sscanf( params, "us[170]", giveplayerid, text ) ) return SendClientMessage( playerid, -1, ""USAGE"| Usage: | "WHITE"/pm [Name_Surname/Player ID] [Text]" );
else if( !IsPlayerConnected( giveplayerid ) ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"The specified player id isn't connected!" );
else if( PlayerBlockingPM[ giveplayerid ] [ playerid ] ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"The specified player id is blocking private messages from you!" );
else if( giveplayerid == playerid ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"You can not private message yourself!" );
else if( PMSblocked ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"An admin has "RED"blocked "WHITE"the private messages hence you are unable to send it!" );
else if( strlen( text ) > SPLIT ) {
SendClientMessageEx( giveplayerid, -1, ""ORANGE"(( PM FROM: %s%s(%d)"ORANGE": %.*s ...", ( IsPlayerAdmin( playerid ) ) ? ( ADMIN ) : ( ORANGE ), PName( playerid ), playerid, SPLIT, text );
SendClientMessageEx( giveplayerid, -1, ""ORANGE"..- %s ))", text[ SPLIT ] );
SendClientMessageEx( playerid, -1, ""ORANGE"(( PM TO: %s%s(%d)"ORANGE": %.*s ...", ( IsPlayerAdmin( giveplayerid ) ) ? ( ADMIN ) : ( ORANGE ), PName( giveplayerid ), giveplayerid, SPLIT, text );
SendClientMessageEx( playerid, -1, ""ORANGE"..- %s ))", text[ SPLIT ] );
}
else {
SendClientMessageEx( giveplayerid, -1, ""ORANGE"(( PM FROM: %s%s(%d)"ORANGE": %s ))", ( IsPlayerAdmin( playerid ) ) ? ( ADMIN ) : ( ORANGE ), PName( playerid ), playerid, text );
SendClientMessageEx( playerid, -1, ""ORANGE"(( PM TO: %s%s(%d)"ORANGE": %s ))", ( IsPlayerAdmin( giveplayerid ) ) ? ( ADMIN ) : ( ORANGE ), PName( giveplayerid ), giveplayerid, text );
}
return ( true );
}
CMD:opm( playerid, params[ ] ) {
new name[ 35 ], text[ 170 ], query[ 500 ];
if( sscanf( params, "s[35]s[170]", name, text ) ) return SendClientMessage( playerid, -1, ""USAGE"| Usage: | "WHITE"/opm [Name_Surname] [Text]" );
else if( equal( name, PlayerName( playerid ) ) ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"You can not offline private message yourself!" );
format( query, sizeof( query ), "SELECT `Name` FROM `players` WHERE `Name` = '%s'", name );
mysql_tquery( sqlGameConnection, query, "OfflinePrivateMsg", "dss", playerid, name, text );
return ( true );
}
CMD:opms( playerid ) {
new query[ 128 ];
format( query, sizeof( query ), "SELECT * FROM `opms` WHERE `Name` = '%s' AND `ReadMsg` = '0'", PlayerName( playerid ) );
return mysql_tquery( sqlGameConnection, query, "FetchOfflinePMS", "d", playerid );
}
CMD:pmhistory( playerid ) {
new query[ 128 ];
format( query, sizeof( query ), "SELECT * FROM `opms` WHERE `Name` = '%s' AND `ReadMsg` = '1' AND `Deleted` = '0'", PlayerName( playerid ) );
return mysql_tquery( sqlGameConnection, query, "FetchPMHistory", "d", playerid );
}
CMD:blockpm( playerid, params[ ] ) {
new giveplayerid;
if( sscanf( params, "u", giveplayerid ) ) return SendClientMessage( playerid, -1, ""USAGE"| Usage: | "WHITE"/blockpm [Name_Surname/Player ID]" );
else if( !IsPlayerConnected( giveplayerid ) ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"The specified player id isn't connected!" );
else if( giveplayerid == playerid ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"You can not block private messages from yourself!" );
PlayerBlockingPM[ playerid ] [ giveplayerid ] = ( PlayerBlockingPM[ playerid ] [ giveplayerid ] ) ? ( false ) : ( true );
SendClientMessageEx( playerid, -1, ""RED"| WARNING: | "WHITE"You %s private messages from %s(%d)", ( PlayerBlockingPM[ playerid ] [ giveplayerid ] ) ? ( ""RED"started blocking"WHITE"" ) :
( ""GREEN"stopped blocking"WHITE"" ), PName( giveplayerid ), giveplayerid );
return ( true );
}
CMD:togpms( playerid ) {
new str[ DEF_STRSIZE ];
if( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"You are not authorized to use this command as you're not logged in as an RCON administrator!" );
PMSblocked = ( PMSblocked ) ? ( false ) : ( true );
format( str, sizeof( str ), "An administrator has %s private messages for everyone!", ( PMSblocked ) ? ( ""RED"blocked"WHITE"" ) : ( ""GREEN"unblocked"WHITE"" ) );
SendClientMessageToAll( -1, str );
return ( true );
}
CMD:viewdeletedpms( playerid, params[ ] ) {
new name[ 35 ], query[ 128 ];
if( !IsPlayerAdmin( playerid ) ) return SendClientMessage( playerid, -1, ""RED"| ERROR: | "WHITE"You are not authorized to use this command as you're not logged in as an RCON administrator!" );
else if( sscanf( params, "s[35]", name ) ) return SendClientMessage( playerid, -1, ""USAGE"| Usage: | "WHITE"/viewdeletedpms [Name_Surname]" );
format( query, sizeof( query ), "SELECT * FROM `opms` WHERE `Deleted` = '1' AND `Name` = '%s'", name );
mysql_tquery( sqlGameConnection, query, "FetchDeletedPMs", "ds", playerid, name );
return ( true );
}
/*|========================================| COMMANDS |========================================|*/
/*|============================================================================================|*/
PHP Code:
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 18, 2020 at 03:12 PM
-- Server version: 10.4.10-MariaDB
-- PHP Version: 7.3.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `pmsys`
--
-- --------------------------------------------------------
--
-- Table structure for table `opms`
--
CREATE TABLE `opms` (
`ID` int(11) NOT NULL,
`Name` varchar(35) NOT NULL,
`Sender` varchar(35) NOT NULL,
`Message` varchar(170) NOT NULL,
`ReadMsg` tinyint(1) NOT NULL DEFAULT 0,
`Deleted` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `players`
--
CREATE TABLE `players` (
`Name` varchar(35) NOT NULL,
`Password` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `opms`
--
ALTER TABLE `opms`
ADD PRIMARY KEY (`ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `opms`
--
ALTER TABLE `opms`
MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=0;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Required files:
Code:
- Latest SSCANF version.
- ZCMD.
- Latest MySQL version.
SSCANF( LINUX ) : https://github.com/maddinat0r/sscanf...3-linux.tar.gz
ZCMD: https://pastebin.com/SbJc7iXa
MySQL( WINDOWS ) : https://github.com/pBlueG/SA-MP-MySQ...41-4-win32.zip
MySQL( CENTOS7 ) : https://github.com/pBlueG/SA-MP-MySQ...CentOS7.tar.gz
MySQL( DEBIAN ) : https://github.com/pBlueG/SA-MP-MySQ...-static.tar.gz