Hi there, mates.
This release might be useful for RP servers and whatever-genre, who using interiors.
Original idea by: @Antoine
MySql module taken from: [Essentials mode base] ([Release] EssentialMode base) by @Kanersps
Description
This resource creates two checkpoints at coords which stored in mysql db.
There is draw distance (50 meters by default).
When player enter at checkpoint, he will be teleported to related point.
Interior (teleport) name is available. After teleporting, in right corner of the screen you can see it.
You have 5 seconds by default to leave checkpoint, otherwise you will be teleported back to the related checkpoint.
How to install
You need mysql server installed on your host or somewhere.
Place this resource in resources folder.
Change mysql login-pass in settings.lua.
Load game.sql db to your mysql server or create db and table manually.
If you going to use other db or table names, do not forget to change that names in settings.lua.
And then add this resource in your autoloadresources, of course.
How to add new interiors
For now, you have to add them manually.
Use json format like this {x,y,z,heading} in row enter and exit. Do not forget to set interior name.
yo i almost got all interior loaded, i will release the full package soon after im done whit all those tp.
And can you make a exemple of what the file look like in the ressource and in the db plz @MarkViolla
yes. add game.sql in your MySql and type in your login and password in settings.lua
game.sql is included. Also, you can use this code to make table with first “test” interior.
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
CREATE TABLE IF NOT EXISTS `interiors` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'key id',
`enter` text NOT NULL COMMENT 'enter coords',
`exit` text NOT NULL COMMENT 'destination coords',
`iname` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
INSERT INTO `interiors` (`id`, `enter`, `exit`, `iname`) VALUES
(1, '{-1045.888,-2751.017,21.3634,321.7075}', '{-1055.37,-2698.47,13.82,234.62}', 'first int');