Quantcast
Channel: SA-MP Forums - Filterscripts
Viewing all articles
Browse latest Browse all 595

[FilterScript] Private Message System

$
0
0
Private Message System


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:PlayerBlockingPMMAX_PLAYERS ] [ MAX_PLAYERS ] = { false, ... }, bool:PMSblocked false;
new 
MySQL:sqlGameConnectionSelectedPMIDMAX_PLAYERS ] [ MAX_PLAYERS ];
new 
PMSenderMAX_PLAYERS ] [ MAX_PLAYERS ] [ 35 ], PMMessageMAX_PLAYERS ] [ MAX_PLAYERS ] [ 170 ];
new 
PMIDFinalMAX_PLAYERS ] = { -1, ... }, PMRecieverMAX_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 {
    
pPassword20 ]
};
new 
PlayerInfoMAX_PLAYERS ] [ pInfo ];
/*|========================================| ENUMATORS |=======================================|*/
/*|============================================================================================|*/
/*|========================================| CALLBACKS |=======================================|*/
public OnFilterScriptInit( ) {
    
sqlGameConnection mysql_connectHOSTUSERPASSWORDDATABASE );
    if( 
mysql_errno( ) != ) 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 
OnPlayerDisconnectplayeridreason ) {
    for( new 
iMAX_PLAYERSji++ ) {
        
PlayerBlockingPMplayerid ] [ ] = false;
        
PlayerBlockingPM] [ playerid ] = false;
        
SelectedPMIDplayerid ] [ ] = -1;
        
formatPMSenderplayerid ] [ ], 35"%s"EOS );
        
formatPMMessageplayerid ] [ ], 170"%s"EOS );
    }
        
formatPMRecieverplayerid ], 35"%s"EOS );
        
PMIDFinalplayerid ] = -1;
    
formatPlayerInfoplayerid ] [ pPassword ], 20"%s"EOS );
    return ( 
true );
}
public 
OnPlayerConnectplayerid ) {
    new 
query128 ];
    
formatquerysizeofquery ), "SELECT * FROM `players` WHERE `Name` = '%s'"PlayerNameplayerid ) );
    
mysql_tquerysqlGameConnectionquery"FetchAccount""d"playerid );
    return ( 
true );
}
public 
OnDialogResponseplayeriddialogidresponselistiteminputtext[ ] ) {
    switch( 
dialogid ) {
        case 
DIALOG_REGISTER: {
            if( 
response ) {
                if( 
strleninputtext ) > 20 || strleninputtext ) < ) {
                    
SendClientMessageplayerid, -1""RED"| WARNING: | "WHITE"Your password mustn't be above 20 or below 3 characters/numbers/symbols!" );
                    
ShowPlayerDialogplayeridDIALOG_REGISTERDIALOG_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 
query128 ];
                    
mysql_formatsqlGameConnectionquerysizeofquery ), "INSERT INTO `players`( `Name`, `Password` ) VALUES( '%e', '%e' )"PlayerNameplayerid ), inputtext );
                    
mysql_tquerysqlGameConnectionquery );
                    
SendClientMessageplayerid, -1"Registration "GREEN"successfully "WHITE"completed!" );
                }
            }
            else 
Kickplayerid );
        }
        case 
DIALOG_LOGIN: {
            if( 
response ) {
                if( 
equalinputtextPlayerInfoplayerid ] [ pPassword ] ) ) { 
                    new 
query128 ];
                    
SendClientMessageplayerid, -1"You've "GREEN"successfully "WHITE"logged in!" );
                    
formatquerysizeofquery ), "SELECT * FROM `opms` WHERE `Name` = '%s' AND `ReadMsg` = '0'"PlayerNameplayerid ) );
                    
mysql_tquerysqlGameConnectionquery"FetchOPMs""d"playerid );
                } else {
                    
SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"Wrong password!" );
                    
ShowPlayerDialogplayeridDIALOG_LOGINDIALOG_STYLE_PASSWORD"Loggin",\
                                                
"Your account was successfully found in the MySQL database!\n\
                                                 Please below type your correct password to proceed:"
"Proceed""Cancel" );
                }
            }
            else 
Kickplayerid );
        }
        case 
DIALOG_OPMS: {
            if( 
response ) {
                new 
tmp200 ], strDEF_STRSIZE ], query128 ];
                new 
id SelectedPMIDplayerid ] [ listitem ];
                
strcatstr"|==========| PRIVATE MESSAGE |==========|\n" );
                
formattmpsizeoftmp ), "Private message from: %s\n"PMSenderplayerid ] [ listitem ] );
                
strcatstrtmp );
                
formattmpsizeoftmp ), "Message: %s\n"PMMessageplayerid ] [ listitem ] );
                
strcatstrtmp );
                
strcatstr"|==========| PRIVATE MESSAGE |==========|\n" );
                
ShowPlayerDialogplayeridDIALOG_OPMS_2DIALOG_STYLE_MSGBOX"Offline Message"str"Close""" );
                
formatquerysizeofquery ), "UPDATE `opms` SET `ReadMsg` = '1' WHERE `ID` = '%d'"id );
                
mysql_tquerysqlGameConnectionquery );
            }
        }
        case 
DIALOG_PMHISTORY: {
            if( 
response ) {
                new 
tmp200 ], strDEF_STRSIZE ];
                
PMIDFinalplayerid ] = SelectedPMIDplayerid ] [ listitem ];
                
strcatstr"|==========| PRIVATE MESSAGE |==========|\n" );
                
formattmpsizeoftmp ), "Private message from: %s\n"PMSenderplayerid ] [ listitem ] );
                
strcatstrtmp );
                
formattmpsizeoftmp ), "Message: %s\n"PMMessageplayerid ] [ listitem ] );
                
strcatstrtmp );
                
strcatstr"|==========| PRIVATE MESSAGE |==========|\n" );
                
ShowPlayerDialogplayeridDIALOG_PMHISTORY_2DIALOG_STYLE_MSGBOX"PM History"str"Close""Delete" );
            }
        }
        case 
DIALOG_PMHISTORY_2: {
            if( !
response ) {
                new 
query128 ];
                
formatquerysizeofquery ), "UPDATE `opms` SET `Deleted` = '1' WHERE `ID` = '%d'"PMIDFinalplayerid ] );
                
mysql_tquerysqlGameConnectionquery );
                
SendClientMessageplayerid, -1"Private message has been "GREEN"successfully "WHITE"deleted!" );
            }
        }
        case 
DIALOG_SHOWDELETEDPMS: {
            if( 
response ) {
                new 
tmp200 ], strDEF_STRSIZE ];
                
strcatstr"|==========| PRIVATE MESSAGE |==========|\n" );
                
formattmpsizeoftmp ), "Reciever: %s\n"PMRecieverplayerid ] );
                
strcatstrtmp );
                
formattmpsizeoftmp ), "Private message from: %s\n"PMSenderplayerid ] [ listitem ] );
                
strcatstrtmp );
                
formattmpsizeoftmp ), "Message: %s\n"PMMessageplayerid ] [ listitem ] );
                
strcatstrtmp );
                
strcatstr"|==========| PRIVATE MESSAGE |==========|\n" );
                
ShowPlayerDialogplayeridDIALOG_SHOWDELETEDPMS_2DIALOG_STYLE_MSGBOXPMRecieverplayerid ], str"Close""" );
            }
        }
    }
    return ( 
true );
}
/*|========================================| CALLBACKS |=======================================|*/
/*|============================================================================================|*/
/*|========================================| FUNCTIONS |=======================================|*/
SendClientMessageExplayeridcolor, const text[ ], { Float}:... ) {
    static 
argsstr144 ];  
    if( ( 
args numargs( ) ) == ){
        
SendClientMessageplayeridcolortext );
    } else {
        while( --
args >= ) {
            
#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(playeridcolorstr);
        
#emit RETN
    
}
    return ( 
true );
}
PlayerNameplayerid ) {
    new 
nameMAX_PLAYER_NAME+];
    
GetPlayerNameplayeridnamesizeofname ) );
    return 
name;
}
PNameplayerid ) {
    new 
name24 ];
    
strmidnamestr_replace'_'' 'PlayerNameplayerid ) ), 0MAX_PLAYER_NAME );
    return 
name;
}
str_replacesSearchsReplace, const sSubject[ ] ) {
    new 
sReturn128 ];
    
formatsReturnsizeofsReturn ), sSubject );
    for( new 
isizeofsReturn ); ji++ ) {
        if( 
sReturn] == sSearch ) {
            
sReturn] = sReplace;
        }
    }
    return 
sReturn;
}
forward FetchAccountplayerid );
public 
FetchAccountplayerid ) {
    if( !
cache_num_rows( ) ) ShowPlayerDialogplayeridDIALOG_REGISTERDIALOG_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_name0"Password"PlayerInfoplayerid ] [ pPassword ], 20 );
        
ShowPlayerDialogplayeridDIALOG_LOGINDIALOG_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 OfflinePrivateMsgplayeridname[ ], text[ ] );
public 
OfflinePrivateMsgplayeridname[ ], text[ ] ) {
    if( 
cache_num_rows( ) ) {
        new 
query500 ];
        
mysql_formatsqlGameConnectionquerysizeofquery ), "INSERT INTO `opms`(`Name`, `Sender`, `Message`)VALUES('%e', '%e', '%e')"namePlayerNameplayerid ), text );
        
mysql_tquerysqlGameConnectionquery );
        if( 
strlentext ) > SPLIT ) {
            
SendClientMessageExplayerid, -1"Private message to %s has been "GREEN"successfully "WHITE"sent!"name );
            
SendClientMessageExplayerid, -1"-> %.*s ..."SPLITtext );
            
SendClientMessageExplayerid, -1"..- %s"textSPLIT ] );
        } else {
            
SendClientMessageExplayerid, -1"Private message to %s has been "GREEN"successfully "WHITE"sent!"name );
            
SendClientMessageExplayerid, -1"-> %s"text );
        }
    }
    else 
SendClientMessageExplayerid, -1""RED"| ERROR: | "WHITE"%s unsuccessfully found in the MySQL database!"name );
    return ( 
true );
}
forward FetchOPMsplayerid );
public 
FetchOPMsplayerid ) {
    if( 
cache_num_rows( ) ) return SendClientMessageExplayerid, -1""RED"| WARNING: | "WHITE"You've %d unread private messages."cache_num_rows( ) );
    return ( 
true );
}
forward FetchOfflinePMSplayerid );
public 
FetchOfflinePMSplayerid ) {
    new 
tmp80 ], strDEF_STRSIZE ], countid;
    if( 
cache_num_rows( ) ) {
        for( new 
icache_num_rows( ); ji++ ) {
            
cache_get_value_name_inti"ID"id );
            
cache_get_value_namei"Sender"PMSenderplayerid ] [ count ], 35 );
            
cache_get_value_namei"Message"PMMessageplayerid ] [ count ], 170 );
            
SelectedPMIDplayerid ] [ count ] = id;
            
formattmpsizeoftmp ), "Private message from %s\n"PMSenderplayerid ] [ count ] );
            
strcatstrtmp );
            
count ++;
        }
        
ShowPlayerDialogplayeridDIALOG_OPMSDIALOG_STYLE_LIST"Offline PMs"str"Select""Close" );
    }
    else 
SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"No offline private messages found!" );
    return ( 
true );
}
forward FetchPMHistoryplayerid );
public 
FetchPMHistoryplayerid ) {
    new 
countidtmp80 ], strDEF_STRSIZE ];
    if( 
cache_num_rows( ) ) {
        for( new 
icache_num_rows( ); ji++ ) {
            
cache_get_value_name_inti"ID"id );
            
cache_get_value_namei"Sender"PMSenderplayerid ] [ count ], 35 );
            
cache_get_value_namei"Message"PMMessageplayerid ] [ count ], 170 );
            
SelectedPMIDplayerid ] [ count ] = id;
            
formattmp sizeoftmp ), "Private message from %s\n"PMSenderplayerid ] [ count ] );
            
strcatstrtmp );
            
count ++;
        }
        
ShowPlayerDialogplayeridDIALOG_PMHISTORYDIALOG_STYLE_LIST"PM History"str"Done""Close" );
    }
    else 
SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"PM history is empty!" );
    return ( 
true );
}
forward FetchDeletedPMsplayeridname[ ] );
public 
FetchDeletedPMsplayeridname[ ] ) {
    new 
idcount 0strDEF_STRSIZE ], tmp80 ];
    if( 
cache_num_rows( ) ) {
        for( new 
icache_num_rows( ); ji++ ) {
            
cache_get_value_name_inti"ID"id );
            if( 
count == cache_get_value_namei"Name"PMRecieverplayerid ], 35 );
            
cache_get_value_namei"Sender"PMSenderplayerid ] [ count ], 35 );
            
cache_get_value_namei"Message"PMMessageplayerid ] [ count ], 170 );
            
SelectedPMIDplayerid ] [ count ] = id;
            
formattmpsizeoftmp ), "Deleted message from %s\n"PMSenderplayerid ] [ count ] );
            
strcatstrtmp );
            
count ++;
        }
        
ShowPlayerDialogplayeridDIALOG_SHOWDELETEDPMSDIALOG_STYLE_LISTPMRecieverplayerid ], str"Select""Cancel" );
    }
    return ( 
true );
}
/*|========================================| FUNCTIONS |=======================================|*/
/*|============================================================================================|*/
/*|========================================| COMMANDS |========================================|*/
CMD:pmhelpplayerid ) return SendClientMessageExplayerid, -1""USAGE"| Commands: | "WHITE"/pm, /blockpm, /opm, /pmhistory, /opms%s", ( IsPlayerAdminplayerid ) ) ? ( ", /togpms, /viewdeletedpms." ) : ( "." ) );
CMD:pmplayeridparams[ ] ) {
    new 
giveplayeridtext170 ];
    if( 
sscanfparams"us[170]"giveplayeridtext ) ) return SendClientMessageplayerid, -1""USAGE"| Usage: | "WHITE"/pm [Name_Surname/Player ID] [Text]" );
    else if( !
IsPlayerConnectedgiveplayerid ) ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"The specified player id isn't connected!" );
    else if( 
PlayerBlockingPMgiveplayerid ] [ playerid ] ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"The specified player id is blocking private messages from you!" );
    else if( 
giveplayerid == playerid ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"You can not private message yourself!" );
    else if( 
PMSblocked ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"An admin has "RED"blocked "WHITE"the private messages hence you are unable to send it!" );
    else if( 
strlentext ) > SPLIT ) {
        
SendClientMessageExgiveplayerid, -1""ORANGE"(( PM FROM: %s%s(%d)"ORANGE": %.*s ...", ( IsPlayerAdminplayerid ) ) ? ( ADMIN ) : ( ORANGE ), PNameplayerid ), playeridSPLITtext );
        
SendClientMessageExgiveplayerid, -1""ORANGE"..- %s ))"textSPLIT ] );
        
SendClientMessageExplayerid, -1""ORANGE"(( PM TO: %s%s(%d)"ORANGE": %.*s ...", ( IsPlayerAdmingiveplayerid ) ) ? ( ADMIN ) : ( ORANGE ), PNamegiveplayerid ), giveplayeridSPLITtext );
        
SendClientMessageExplayerid, -1""ORANGE"..- %s ))"textSPLIT ] );
    }
    else {
        
SendClientMessageExgiveplayerid, -1""ORANGE"(( PM FROM: %s%s(%d)"ORANGE": %s ))", ( IsPlayerAdminplayerid ) ) ? ( ADMIN ) : ( ORANGE ), PNameplayerid ), playeridtext );
        
SendClientMessageExplayerid, -1""ORANGE"(( PM TO: %s%s(%d)"ORANGE": %s ))", ( IsPlayerAdmingiveplayerid ) ) ? ( ADMIN ) : ( ORANGE ), PNamegiveplayerid ), giveplayeridtext );
    }
    return ( 
true );
}
CMD:opmplayeridparams[ ] ) {
    new 
name35 ], text170 ], query500 ];
    if( 
sscanfparams"s[35]s[170]"nametext ) ) return SendClientMessageplayerid, -1""USAGE"| Usage: | "WHITE"/opm [Name_Surname] [Text]" );
    else if( 
equalnamePlayerNameplayerid ) ) ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"You can not offline private message yourself!" );
    
formatquerysizeofquery ), "SELECT `Name` FROM `players` WHERE `Name` = '%s'"name );
    
mysql_tquerysqlGameConnectionquery"OfflinePrivateMsg""dss"playeridnametext );
    return ( 
true );
}
CMD:opmsplayerid ) {
    new 
query128 ];
    
formatquerysizeofquery ), "SELECT * FROM `opms` WHERE `Name` = '%s' AND `ReadMsg` = '0'"PlayerNameplayerid ) );
    return 
mysql_tquerysqlGameConnectionquery"FetchOfflinePMS""d"playerid );
}
CMD:pmhistoryplayerid ) {
    new 
query128 ];
    
formatquerysizeofquery ), "SELECT * FROM `opms` WHERE `Name` = '%s' AND `ReadMsg` = '1' AND `Deleted` = '0'"PlayerNameplayerid ) );
    return 
mysql_tquerysqlGameConnectionquery"FetchPMHistory""d"playerid );
}
CMD:blockpmplayeridparams[ ] ) {
    new 
giveplayerid;
    if( 
sscanfparams"u"giveplayerid ) ) return SendClientMessageplayerid, -1""USAGE"| Usage: | "WHITE"/blockpm [Name_Surname/Player ID]" );
    else if( !
IsPlayerConnectedgiveplayerid ) ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"The specified player id isn't connected!" );
    else if( 
giveplayerid == playerid ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"You can not block private messages from yourself!" );
    
PlayerBlockingPMplayerid ] [ giveplayerid ] = ( PlayerBlockingPMplayerid ] [ giveplayerid ] ) ? ( false ) : ( true );
    
SendClientMessageExplayerid, -1""RED"| WARNING: | "WHITE"You %s private messages from %s(%d)", ( PlayerBlockingPMplayerid ] [ giveplayerid ] ) ? ( ""RED"started blocking"WHITE"" ) : 
        ( 
""GREEN"stopped blocking"WHITE"" ), PNamegiveplayerid ), giveplayerid );
    return ( 
true );
}
CMD:togpmsplayerid ) {
    new 
strDEF_STRSIZE ];
    if( !
IsPlayerAdminplayerid ) ) return SendClientMessageplayerid, -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 );
    
formatstrsizeofstr ), "An administrator has %s private messages for everyone!", ( PMSblocked ) ? ( ""RED"blocked"WHITE"" ) : ( ""GREEN"unblocked"WHITE"" ) );
    
SendClientMessageToAll( -1str );
    return ( 
true );
}
CMD:viewdeletedpmsplayeridparams[ ] ) {
    new 
name35 ], query128 ];
    if( !
IsPlayerAdminplayerid ) ) return SendClientMessageplayerid, -1""RED"| ERROR: | "WHITE"You are not authorized to use this command as you're not logged in as an RCON administrator!" );
    else if( 
sscanfparams"s[35]"name ) ) return SendClientMessageplayerid, -1""USAGE"| Usage: | "WHITE"/viewdeletedpms [Name_Surname]" );
    
formatquerysizeofquery ), "SELECT * FROM `opms` WHERE `Deleted` = '1' AND `Name` = '%s'"name );
    
mysql_tquerysqlGameConnectionquery"FetchDeletedPMs""ds"playeridname );
    return ( 
true );
}
/*|========================================| COMMANDS |========================================|*/
/*|============================================================================================|*/ 

DOWNLOAD V0.0.1( SQL ) -> https://pastebin.com/SA0LjRPH
PHP Code:

-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- 
Host127.0.0.1
-- Generation TimeJan 182020 at 03:12 PM
-- Server version10.4.10-MariaDB
-- PHP Version7.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` (
  `
IDint(11NOT NULL,
  `
Namevarchar(35NOT NULL,
  `
Sendervarchar(35NOT NULL,
  `
Messagevarchar(170NOT NULL,
  `
ReadMsgtinyint(1NOT NULL DEFAULT 0,
  `
Deletedtinyint(1NOT NULL DEFAULT 0
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

-- --------------------------------------------------------

--
-- 
Table structure for table `players`
--

CREATE TABLE `players` (
  `
Namevarchar(35NOT NULL,
  `
Passwordvarchar(20NOT 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 `IDint(11NOT NULL AUTO_INCREMENTAUTO_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( 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

Viewing all articles
Browse latest Browse all 595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>