Introduction
I wanted to make a music system which allows players to enter a link from youtube
and be able to play the song and save it into a file to play at their hearts content.
Features:
Bugs:
Download:http://pastebin.com/RU5U2pKH
Include to convert youtube to mp3: http://forum.sa-mp.com/showthread.php?t=518119
MySQL code:
and be able to play the song and save it into a file to play at their hearts content.
Features:
- /music shows the music dialog allows players to play a song, add a song and remove a song.
- MySQL Saving into a database for songs to load for players and play.
Bugs:
- Sometimes a song doesn't play, just keep playing it intill it does
- High ping makes it so song doesn't play don't know why.
- Song can take anywhere from 0 to 30 seconds to play.
Download:http://pastebin.com/RU5U2pKH
Include to convert youtube to mp3: http://forum.sa-mp.com/showthread.php?t=518119
MySQL code:
PHP Code:
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 16, 2017 at 06:54 PM
-- Server version: 10.1.9-MariaDB
-- PHP Version: 5.5.30
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `sa-mp`
--
-- --------------------------------------------------------
--
-- Table structure for table `music`
--
CREATE TABLE `music` (
`ID` int(10) NOT NULL,
`SongUsed` int(10) NOT NULL,
`Name` varchar(24) NOT NULL,
`SongName` varchar(256) NOT NULL,
`SongLink` varchar(256) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `music`
--
ALTER TABLE `music`
ADD PRIMARY KEY (`ID`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `music`
--
ALTER TABLE `music`
MODIFY `ID` int(10) NOT NULL AUTO_INCREMENT;
/*!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 */;
Screen shots and video coming soon :)