Im currently having a small issue with the altislife.sql
My altislife.sql:
Code
This is the place to stay! SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00: 00";
-
- Compatible with newer MySQL versions. (After MySQL 5.5)
- This SQL uses utf8mb4 and has CURRENT_TIMESTAMP function.
-
/ *! 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: `altislife`
- Default scheme
-
CREATE DATABASE IF NOT EXISTS `altislife` DEFAULT CHARACTER SET utf8mb4;
USE `altislife`;
-
- Drop procedures to ensure no conflicts
-
DROP PROCEDURE IF EXISTS `resetLifeVehicles`;
DROP PROCEDURE IF EXISTS `deleteDeadVehicles`;
DROP PROCEDURE IF EXISTS `deleteOldHouses`;
DROP PROCEDURE IF EXISTS `deleteOldGangs`;
DROP PROCEDURE IF EXISTS `deleteOldContainers`;
DELIMITER $$
-
- Procedures
- Edit arma3 to match a user in MySQL
- For external databases: Edit localhost to match arma3server IP
-
CREATE DEFINER = `altislife` @` localhost` PROCEDURE `resetLifeVehicles` ()
BEGIN
UPDATE `vehicles` SET` active` = 0;
END $$
CREATE DEFINER = `altislife` @` localhost` PROCEDURE `deleteDeadVehicles` ()
BEGIN
DELETE FROM `vehicles` WHERE` alive` = 0;
END $$
CREATE DEFINER = `altislife` @` localhost` PROCEDURE `deleteOldHouses` ()
BEGIN
DELETE FROM `houses` WHERE` owned` = 0;
END $$
CREATE DEFINER = `altislife` @` localhost` PROCEDURE `deleteOldGangs` ()
BEGIN
DELETE FROM `begin 'WHERE` active` = 0;
END $$
CREATE DEFINER = `altislife` @` localhost` PROCEDURE `deleteOldContainers` ()
BEGIN
DELETE FROM `containers` WHERE` owned` = 0;
END $$
DELIMITER;
------------------------------------------------ - As shown in Fig.
-
- Table structure for table `players`
-
CREATE TABLE IF NOT EXISTS `players` (
`Uid` int (12) NOT NULL AUTO_INCREMENT,
`Name` varchar (32) NOT NULL,
`Aliases` text NOT NULL,
`Playerid` varchar (64) NOT NULL,
`Cash` int (100) NOT NULL DEFAULT '0',
`Bankacc` int (100) NOT NULL DEFAULT '0',
`Coplevel` enum ('0', '1', '2', '3', '4', '5', '6', '7') NOT NULL DEFAULT '0'
`MEDICLEVEL` ENUM ('0', '1', '2', '3', '4', '5') NOT NULL DEFAULT '0'
`Civ_licenses` text NOT NULL,
`Cop_licenses` text NOT NULL,
`Med_licenses` text NOT NULL,
`Civ_gear` text NOT NULL,
`Cop_gear` text NOT NULL,
`Med_gear` text NOT NULL,
`Civ_stats` varchar (32) NOT NULL DEFAULT '" [100,100,0] "',
`Cop_stats` varchar (32) NOT NULL DEFAULT '" [100,100,0] "',
`Med_stats` varchar (32) NOT NULL DEFAULT '" [100,100,0] "',
`Arrested` tinyint (1) NOT NULL DEFAULT '0',
`Adminlevel` enum ('0', '1', '2', '3', '4', '5') NOT NULL DEFAULT '0'
(0 ',' 1 ',' 2 ',' 3 ',' 4 ',' 5 ') NOT NULL DEFAULT' 0 '
`Blacklist` tinyint (1) NOT NULL DEFAULT '0',
`Civ_alive` tinyint (1) NOT NULL DEFAULT '0',
`Civ_position` varchar (64) NOT NULL DEFAULT '" [] "',
`Playtime` varchar (32) NOT NULL DEFAULT '" [0,0,0] "',
`Insert_time` timestamp DEFAULT CURRENT_TIMESTAMP,
`Last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`uid`),
UNIQUE KEY `playerid` (` playerid`),
KEY `name` (` name`),
KEY `blacklist` (` blacklist`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 AUTO_INCREMENT = 12;
------------------------------------------------ - As shown in Fig.
-
- Table structure for table `vehicles`
-
CREATE TABLE IF NOT EXISTS `vehicles` (
`Id` int (12) NOT NULL AUTO_INCREMENT,
`Side` varchar (16) NOT NULL,
`Classname` varchar (64) NOT NULL,
`Type` varchar (16) NOT NULL,
`Pid` varchar (32) NOT NULL,
`Alive` tinyint (1) NOT NULL DEFAULT '1',
`Blacklist` tinyint (1) NOT NULL DEFAULT '0',
`Active` tinyint (1) NOT NULL DEFAULT '0',
`Plate` int (20) NOT NULL,
`Color` int (20) NOT NULL,
`Inventory` text NOT NULL,
`Gear` text NOT NULL,
`Fuel` double NOT NULL DEFAULT '1',
`Damage` varchar (256) NOT NULL,
`Insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `side` (` side`),
KEY `pid` (` pid`),
KEY `type` (` type`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 AUTO_INCREMENT = 2;
------------------------------------------------ - As shown in Fig.
-
- Table structure for table `houses`
- Needed for extDB latest update on git
-
CREATE TABLE IF NOT EXISTS `houses` (
`Id` int (11) NOT NULL AUTO_INCREMENT,
`Pid` varchar (32) NOT NULL,
`Pos` varchar (64) DEFAULT NULL,
`Owned` tinyint (1) DEFAULT '0',
`Insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`,` pid`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 AUTO_INCREMENT = 4;
------------------------------------------------ - As shown in Fig.
-
- Table structure for table `gangs`
- Needed for extDB latest update on git
-
CREATE TABLE IF NOT EXISTS `gangs` (
`Id` int (11) NOT NULL AUTO_INCREMENT,
`Owner` varchar (32) DEFAULT NULL,
`Name` varchar (32) DEFAULT NULL,
`Members` text,
`Maxmembers` int (3) DEFAULT '8',
`Bank` int (100) DEFAULT '0',
`Active` tinyint (1) DEFAULT '1',
`Insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (` name`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
------------------------------------------------ - As shown in Fig.
-
- Table structure for table `containers`
- Needed for extDB latest update on git
-
CREATE TABLE IF NOT EXISTS `containers` (
`Id` int (11) NOT NULL AUTO_INCREMENT,
`Pid` varchar (32) NOT NULL,
`Classname` varchar (32) NOT NULL,
`Pos` varchar (64) DEFAULT NULL,
`Inventory` text NOT NULL,
`Gear` text NOT NULL,
`Dir` varchar (128) DEFAULT NULL,
`Active` tinyint (1) NOT NULL DEFAULT '0',
`Owned` tinyint (1) DEFAULT '0',
`Insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`,` pid`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 AUTO_INCREMENT = 4;
------------------------------------------------ - As shown in Fig.
-
- Table structure for table `wanted`
- Needed for extDB latest update on git
-
CREATE TABLE IF NOT EXISTS `wanted` (
`WantedID` varchar (64) NOT NULL,
`WantedName` varchar (32) NOT NULL,
`WantedCrimes` text NOT NULL,
`WantedBounty` int (100) NOT NULL,
`Active` tinyint (1) NOT NULL DEFAULT '0',
`Insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`wantedID`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4;
------------------------------------------------ - As shown in Fig.
/ *! 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 * /;
Alles anzeigen