Hi there , I created a script just for practice , and I created also a players table in mysql , and I created a connection.
So I created a row like this to get player cars , I know I know its not right to make vehicles for player in this way , but I said I want to learn about it
Here is my row with vehicles name in players table its default have this values
0:0,0:0,0:0
I think its like a table in mysql Im not sure , I just think it
Ok this is three slots for player vehicles
I wanna to import for it by a function and export too
For example , player bought 3 Infernus , I want to make the row to it after bought
411:3,0:0,0:0
and when slot number one is full going on slot number two
For example again , the player bought another vehicle likes two elegy car
411:3,562:2,0:0
and when player login with onPlayerLogin Event , server create that infernus's
also I put that database sql code for import to view better !
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 25, 2021 at 06:11 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `mta_server`
--
-- --------------------------------------------------------
--
-- Table structure for table `players`
--
CREATE TABLE `players` (
`id` int(11) NOT NULL,
`nick` varchar(32) NOT NULL,
`password` varchar(64) NOT NULL,
`money` int(11) NOT NULL DEFAULT 0,
`vehicles` text NOT NULL DEFAULT '0:0,0:0,0:0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `players`
--
INSERT INTO `players` (`id`, `nick`, `password`, `money`, `vehicles`) VALUES
(1, 'Amell', '46fa16h46e16e84f9e84g6a10e0e1a3s0f56i0jjg6', 26544, '0:0,0:0,0:0');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `players`
--
ALTER TABLE `players`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `players`
--
ALTER TABLE `players`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 */;
thanks in advance !