[FilterScript] Simple Dynamic Vehicle Repair Point [MySQL]
#1

Dynamic Repair Point System

This is a simple repair point system I created that allows RCON admins to create/delete/goto repair points in game and players to repair vehicles for a specified fee, it requires MySQL (or y_ini), sscanf & streamer plugins as well as the ZCMD include.

Note: If using y_ini create a directory/folder in the scriptfiles called "repairpoints" & ignore the MySQL details.
Downloads are at the bottom.


Features:
  • Ability to create/delete dynamic repair points in game (If RCON admin).
  • Ability to teleport to repair points (If RCON admin).
  • Ability to repair your vehicle using the repair points for a fee.

How to use:
  • Download the .amx & .pwn files.
  • Edit the MySQL connection details in the 'RepairPoints.pwn' filterscript and compile, then place the .amx into your filterscript folder
  • Add 'RepairPoints' to your 'server.cfg' under 'Filterscripts'
  • Finally, insert the query (listed below) into MySQL.
Edit the MySQL connection details in the filterscript:
pawn Код:
#define                     MYSQL_HOST                          ("localhost")
#define                     MYSQL_USER                          ("root")
#define                     MYSQL_DATABASE                      ("samp")
#define                     MYSQL_PASS                          ("")
What you need:Credits to the individuals who created these includes/plugins.

MySQL Query:
Код:
CREATE TABLE IF NOT EXISTS `repairpoints` (
  `repairpointID` int(10) NOT NULL,
  `repairpointPosX` varchar(128) NOT NULL default '0.0',
  `repairpointPosY` varchar(128) NOT NULL default '0.0',
  `repairpointPosZ` varchar(128) NOT NULL default '0.0',
  `repairpointInterior` int(10) NOT NULL default '0',
  `repairpointVirtualWorld` int(10) NOT NULL default '0',
  `repairpointFee` int(10) NOT NULL default '5',
  PRIMARY KEY  (`repairpointID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;

INSERT INTO `repairpoints` (`repairpointID`, `repairpointPosX`, `repairpointPosY`, `repairpointPosZ`, `repairpointInterior`, `repairpointVirtualWorld`, `repairpointFee`) VALUES
(1, '0.0', '0.0', '0.0', 0, 0, 5),
(2, '0.0', '0.0', '0.0', 0, 0, 5),
(3, '0.0', '0.0', '0.0', 0, 0, 5),
(4, '0.0', '0.0', '0.0', 0, 0, 5),
(5, '0.0', '0.0', '0.0', 0, 0, 5),
(6, '0.0', '0.0', '0.0', 0, 0, 5),
(7, '0.0', '0.0', '0.0', 0, 0, 5),
(8, '0.0', '0.0', '0.0', 0, 0, 5),
(9, '0.0', '0.0', '0.0', 0, 0, 5),
(10, '0.0', '0.0', '0.0', 0, 0, 5),
(11, '0.0', '0.0', '0.0', 0, 0, 5),
(12, '0.0', '0.0', '0.0', 0, 0, 5),
(13, '0.0', '0.0', '0.0', 0, 0, 5),
(14, '0.0', '0.0', '0.0', 0, 0, 5),
(15, '0.0', '0.0', '0.0', 0, 0, 5),
(16, '0.0', '0.0', '0.0', 0, 0, 5),
(17, '0.0', '0.0', '0.0', 0, 0, 5),
(18, '0.0', '0.0', '0.0', 0, 0, 5),
(19, '0.0', '0.0', '0.0', 0, 0, 5),
(20, '0.0', '0.0', '0.0', 0, 0, 5),
(21, '0.0', '0.0', '0.0', 0, 0, 5),
(22, '0.0', '0.0', '0.0', 0, 0, 5),
(23, '0.0', '0.0', '0.0', 0, 0, 5),
(24, '0.0', '0.0', '0.0', 0, 0, 5),
(25, '0.0', '0.0', '0.0', 0, 0, 5);
Commands:
  • '/repairpointhelp' (Lists all the RCON commands).
  • '/createrepairpoint [fee]'.
  • '/deleterepairpoint [repairpointid]'.
  • '/gotorepairpoint [repairpointid]'.
  • '/repairvehicle'
Screen Shots:





Downloads:
.pwn (mysql): http://www.mediafire.com/?akcdwx7vbfgcgpg
.amx (mysql): http://www.mediafire.com/?oi5a2p69byl0fc6

.pwn (yini): http://www.2shared.com/file/DtCoPWZj/RepairPoints.html
(I'm kinda new to y_ini!)

I don't think I've missed anything, enjoy.
PS. This is my first filterscript/release.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)