Jump to content

[REZOLVAT] Problema /createbiz


SpriteTv
 Share

Recommended Posts

problema legata de /createbiz problema este in felu urmator pun baza de date biz originala a sv nu mai merge comanda pun baza lui de date originala merge comanda.

Baza de date + Originala a sv 

--
-- Table structure for table `bizz`
--

CREATE TABLE `bizz` (
  `ID` int(11) NOT NULL,
  `Owned` int(2) NOT NULL,
  `Owner` varchar(25) NOT NULL DEFAULT 'The State',
  `Message` varchar(50) NOT NULL,
  `EntranceX` float NOT NULL,
  `EntranceY` float NOT NULL,
  `EntranceZ` float NOT NULL,
  `ExitX` float NOT NULL,
  `ExitY` float NOT NULL,
  `ExitZ` float NOT NULL,
  `LevelNeeded` int(11) NOT NULL DEFAULT '15',
  `BuyPrice` int(11) NOT NULL DEFAULT '40000000',
  `EntranceCost` int(11) NOT NULL DEFAULT '5',
  `Till` int(11) NOT NULL,
  `Sbiz` int(2) NOT NULL,
  `Type` int(3) NOT NULL,
  `Locked` int(11) NOT NULL,
  `Interior` int(11) NOT NULL,
  `Virtual` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `bizz`
--

INSERT INTO `bizz` (`ID`, `Owned`, `Owner`, `Message`, `EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `EntranceCost`, `Till`, `Sbiz`, `Type`, `Locked`, `Interior`, `Virtual`) VALUES
(1, 1, 'LegendSK', 'Banca LS', 1462.49, -1012.63, 26.8438, 2306, -16, 27, 15, 40000000, 500, 3702000, 0, 1, 0, 0, 0),
(2, 1, 'MIRCESCU', 'Gun Shop LS', 1367.99, -1279.75, 13.5469, 316, -142, 1000, 15, 40000000, 2500, 127500, 0, 2, 0, 7, 0),
(3, 0, 'The State', 'Alhambra', 1836.09, -1682.5, 13.3624, 493.46, -24.0736, 1000.68, 15, 60000000, 500, 0, 0, 3, 0, 17, 0),
(4, 0, 'The State', 'Cluckin Bell', 2102.38, 2228.72, 11.0234, 364.942, -11.0787, 1001.85, 15, 40000000, 500, 1000, 0, 14, 0, 9, 0),
(5, 0, 'The State', 'Bar ', 2421.41, -1220.3, 25.4937, 1204.83, -13.4011, 1000.92, 15, 40000000, 500, 0, 0, 3, 0, 2, 0),
(6, 0, 'The State', 'CLUB ', 2309.85, -1643.54, 14.827, -794.942, 490.782, 1376.2, 15, 50000000, 500, 0, 0, 3, 0, 1, 0),
(7, 0, 'The State', 'Sex Shop', 1087.63, -923.003, 43.3906, -100.403, -24.3921, 1000.72, 15, 40000000, 500, 500, 0, 4, 0, 3, 0),
(8, 1, 'BoyManN_', 'Casino LV', 2019.6, 1007.68, 10.8203, 2015.45, 1017.09, 996.875, 15, 40000000, 500, 1000, 0, 5, 0, 10, 1),
(9, 0, 'The State', 'GunShop LS', 1791.71, -1163.6, 23.8281, 316, -142, 1000, 15, 40000000, 500, 9400, 0, 2, 0, 7, 1),
(10, 0, 'The State', '24/7', 1352.16, -1759.17, 13.5078, -31.0246, -91.3283, 1003.55, 15, 40000000, 500, 9550, 0, 6, 0, 18, 0),
(11, 0, 'The State', '24/7', 999.932, -919.889, 42.3281, -31.0246, -91.3283, 1003.55, 15, 57000000, 500, 500, 0, 6, 0, 18, 1),
(12, 0, 'The State', '24/7', 1833.14, -1842.5, 13.5781, -31.0246, -91.3283, 1003.55, 15, 40000000, 500, 53450, 0, 6, 0, 18, 2),
(13, 0, 'The State', '24/7', 1929.37, -1776.14, 13.5469, -31.0246, -91.3283, 1003.55, 15, 40000000, 500, 0, 0, 6, 0, 18, 3),
(14, 0, 'The State', '24/7', 1315.7, -898.097, 39.5781, -31.0246, -91.3283, 1003.55, 15, 40000000, 500, 8650, 0, 6, 0, 18, 4),
(15, 0, 'The State', 'Burger Shot', 1199.38, -919.098, 43.1152, 363.134, -74.8469, 1001.51, 15, 45000000, 500, 800, 0, 7, 0, 10, 0),
(16, 0, 'The State', 'Burger Shot', 810.737, -1616.19, 13.5469, 363.134, -74.8469, 1001.51, 15, 40000000, 500, 500, 0, 7, 0, 10, 1),
(17, 0, 'The State', 'Burger Shot', 2472.79, 2034.26, 11.0625, 363.134, -74.8469, 1001.51, 15, 40000000, 500, 0, 0, 7, 0, 10, 2),
(18, 0, 'The State', 'Burger Shot', 1158.14, 2072.27, 11.0625, 363.134, -74.8469, 1001.51, 15, 40000000, 500, 0, 0, 7, 0, 10, 3),
(19, 0, 'The State', 'Burger Shot', 2170.06, 2795.64, 10.8203, 363.134, -74.8469, 1001.51, 15, 40000000, 500, 0, 0, 7, 0, 10, 4),
(20, 0, 'The State', 'Burger Shot', 1872.71, 2071.67, 11.0625, 363.134, -74.8469, 1001.51, 15, 40000000, 500, 0, 0, 7, 0, 10, 5),
(21, 0, 'The State', 'Banca LV', 2194.99, 1676.89, 12.3672, 2306, -16, 27, 15, 40000000, 500, 0, 0, 1, 0, 0, 1),
(22, 0, 'The State', 'GunShop LV', 2556.62, 2063.98, 11.0995, 316, -142, 1000, 15, 40000000, 500, 0, 0, 2, 0, 7, 2),
(23, 0, 'The State', 'Sex Shop LV', 2515.95, 2297.69, 10.8203, -100.403, -24.3921, 1000.72, 15, 40000000, 500, 0, 0, 4, 0, 3, 1),
(24, 0, 'The State', '24/7', 2637.61, 1129.28, 11.1797, -31.0246, -91.3283, 1003.55, 15, 40000000, 500, 500, 0, 6, 0, 18, 5),
(25, 0, 'The State', 'Gym LS', 2229.22, -1721.89, 13.5671, 772.112, -3.89865, 1000.73, 15, 40600000, 500, 0, 0, 8, 0, 5, 0),
(26, 0, 'The State', 'Pizza', 2104.57, -1806.67, 13.5547, 372.54, -133.009, 1001.49, 15, 45000000, 500, 0, 0, 9, 0, 5, 6),
(27, 0, 'The State', 'Banca LS', 1102.91, -1440.13, 15.7969, 2306, -16, 27, 15, 55000000, 500, 1000, 0, 1, 0, 0, 2),
(28, 0, 'The State', 'Tasteaza [/ad] LvL 5', 1168.43, -1489.36, 22.757, 0, 0, 0, 15, 40000000, 500, 0, 1, 15, 1, 0, 0),
(29, 0, 'The State', 'Binco', 2102.56, 2257.37, 11.0234, 207.738, -109.02, 1005.13, 15, 45000000, 500, 2500, 0, 11, 0, 15, 2),
(30, 0, 'The State', 'Zip', 499.936, -1359.74, 16.2911, 161.391, -93.1592, 1001.8, 15, 40000000, 500, 120000, 0, 11, 0, 18, 0),
(31, 0, 'The State', 'Rent Car', 563.145, -1289.79, 17.2482, 0, 0, 0, 15, 40000000, 500, 1400, 1, 10, 1, 0, 0),
(32, 0, 'The State', 'Zip', 1456.98, -1138.04, 23.9778, 161.391, -93.1592, 1001.8, 15, 40000000, 500, 1000, 0, 11, 0, 18, 1),
(33, 0, 'The State', 'Gas Station', 1941.6, -1764.74, 13.6406, 0, 0, 0, 15, 40000000, 500, 0, 1, 12, 1, 0, 0),
(34, 0, 'The State', 'PNS', 723.409, -463.627, 16.3359, 0, 0, 0, 15, 57000000, 500, 0, 1, 13, 1, 0, 0),
(35, 0, 'The State', 'PNS', 2072.57, -1828.03, 13.5469, 0, 0, 0, 15, 50000000, 500, 1500, 1, 13, 1, 0, 0),
(36, 1, 'Fiv3$eveN.)', 'PNS', 1034.7, -1028.1, 32.1016, 0, 0, 0, 15, 40000000, 500, 9000, 1, 13, 1, 0, 0),
(37, 1, 'SpriteTv', 'PNS', 485.37, -1733.32, 11.094, 0, 0, 0, 15, 40000000, 500, 6500, 1, 13, 1, 0, 0),
(38, 0, 'The State', 'Mod Shop', 1037.11, -1025.04, 32.1016, 0, 0, 0, 15, 68000000, 500, 3500, 1, 16, 1, 0, 0),
(39, 0, 'The State', 'Mod Shop', 2650.33, -2021.76, 14.1766, 0, 0, 0, 15, 40000000, 500, 0, 1, 16, 1, 0, 0),
(40, 0, 'The State', 'PNS', 1966.45, 2156.36, 10.8203, 0, 0, 0, 15, 40000000, 500, 1000, 1, 13, 1, 0, 0),
(41, 0, 'The State', 'PNS', -94.1097, 1109.86, 19.7422, 0, 0, 0, 15, 40000000, 500, 0, 1, 13, 1, 0, 0),
(42, 0, 'The State', 'Gas Station', 1012.9, -935.545, 42.1797, 0, 0, 0, 15, 40000000, 500, 2300, 1, 12, 1, 0, 0),
(43, 0, 'The State', 'Gas Station', 701.554, -567.347, 16.1459, 0, 0, 0, 15, 40000000, 500, 0, 1, 12, 1, 0, 0),
(44, 0, 'The State', 'Gas Station', -78.6301, -1169.16, 2.1491, 0, 0, 0, 15, 60000000, 500, 0, 1, 12, 1, 0, 0),
(45, 0, 'The State', 'Gas Station', 2646.33, 1101.31, 10.9609, 0, 0, 0, 15, 40000000, 500, 0, 1, 12, 1, 0, 0),
(46, 0, 'The State', 'Gas Station', 2139.81, 2753.5, 10.8203, 0, 0, 0, 15, 60000000, 500, 0, 1, 12, 1, 0, 0),
(47, 0, 'The State', 'Gas Station', 2207.51, 2482.56, 10.8203, 0, 0, 0, 15, 40000000, 500, 0, 1, 12, 1, 0, 0),
(48, 0, 'The State', 'Gas Station', 1604.09, 2204.47, 10.8203, 0, 0, 0, 15, 50000000, 500, 0, 1, 12, 1, 0, 0),
(49, 0, 'The State', 'Gas Station', 2122.56, 914.539, 10.8203, 0, 0, 0, 15, 40000000, 500, 1140, 1, 12, 1, 0, 0),
(50, 0, 'The State', 'Gas Station', 638.368, 1683.78, 7.1875, 0, 0, 0, 15, 40000000, 500, 0, 1, 12, 1, 0, 0),
(51, 0, 'The State', 'Mod Shop', 2392.17, 1042.01, 10.8203, 0, 0, 0, 15, 350000000, 500, 0, 1, 16, 1, 0, 0),
(52, 0, 'The State', 'CNN LV', 2079.2, 2045.07, 11.0579, 0, 0, 0, 15, 40000000, 500, 0, 1, 15, 0, 0, 0),
(53, 0, 'The State', 'Binco', 2244.38, -1665.16, 15.4766, 207.738, -109.02, 1005.13, 15, 40000000, 500, 11500, 0, 11, 0, 15, 1),
(54, 0, 'The State', 'Cluckin Bell', 172.527, 1176.09, 14.7645, 364.942, -11.0787, 1001.85, 15, 40000000, 500, 0, 0, 14, 0, 9, 1);

-- --------------------------------------------------------



Baza de date a comenzi din gm-ul nephrite.

-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 15, 2018 at 01:05 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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: `bazadedate`
--

-- --------------------------------------------------------

--
-- Table structure for table `bizz`
--

CREATE TABLE `bizz` (
  `ID` int(11) NOT NULL,
  `Owned` int(2) NOT NULL,
  `Owner` varchar(25) NOT NULL DEFAULT 'The State',
  `Message` varchar(50) NOT NULL,
  `EntranceX` float NOT NULL,
  `EntranceY` float NOT NULL,
  `EntranceZ` float NOT NULL,
  `ExitX` float NOT NULL,
  `ExitY` float NOT NULL,
  `ExitZ` float NOT NULL,
  `LevelNeeded` int(11) NOT NULL DEFAULT '15',
  `BuyPrice` int(11) NOT NULL DEFAULT '20000000',
  `EntranceCost` int(11) NOT NULL DEFAULT '5',
  `Till` int(11) NOT NULL,
  `Sbiz` int(2) NOT NULL,
  `Type` int(3) NOT NULL,
  `Locked` int(11) NOT NULL,
  `Interior` int(11) NOT NULL,
  `Virtual` int(11) NOT NULL,
  `Prices` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bizz`
--
ALTER TABLE `bizz`
  ADD PRIMARY KEY (`ID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bizz`
--
ALTER TABLE `bizz`
  MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;
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 */;


Comanda 

CMD:createbiz(playerid, params[]) {
	if(PlayerInfo[playerid][pAdmin] < 6) return 1;
	new type, value, level, idd = bussines+1, Float: Pos[3], query[256];
	if(sscanf(params, "iii", type, value, level)) {
		SCM(playerid, COLOR_GREY, "Syntax: {FFFFFF}/createbiz <type> <value> <level>");
		SCM(playerid, COLOR_GREY, "(1) Banca, (2) Gun Shop, (3) Club, (4) Sex Shop, (5) Casino, (6) 24/7, (7) Burger Shot, (8) Gym");
		SCM(playerid, COLOR_GREY, "(9) Pizza, (11) Binco, (12) Gas Station, (13) PNS*, (14) Cluckin Bell, (15) CNN, (16) Tuning*");
		return 1;
	}
	if(type == 10 || type < 1) return SCM(playerid, COLOR_GREY, "Invalid type!");
	GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
	switch(type) {
		case 1: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '2306', '-16', '27', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 2306; BizzInfo[idd][bExitY] = -16; BizzInfo[idd][bExitZ] = 27;
		}
		case 2: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '316', '-142', '1000', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 316; BizzInfo[idd][bExitY] = -142; BizzInfo[idd][bExitZ] = 1000;
		}
		case 3: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '-794.942', '490.782', '1376.2', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = -794.942; BizzInfo[idd][bExitY] = 490.782; BizzInfo[idd][bExitZ] = 1376.2;
		}
		case 4: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '-100.403', '-24.3921', '1000.72', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = -100.403; BizzInfo[idd][bExitY] = -24.3921; BizzInfo[idd][bExitZ] = 1000.72;
		}
		case 5: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '2015.45', '1017.09', '996.875', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 2015.45; BizzInfo[idd][bExitY] = 1017.09; BizzInfo[idd][bExitZ] = 996.875;
		}
		case 6: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '-31.0246', '-91.3283', '1003.55', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = -31.0246; BizzInfo[idd][bExitY] = -91.3283; BizzInfo[idd][bExitZ] = 1003.55;
		}
		case 7: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '363.134', '-74.8469', '1001.51', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 363.134; BizzInfo[idd][bExitY] = -74.8469; BizzInfo[idd][bExitZ] = 1001.51;
		}
		case 8: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '772.112', '-3.89865', '1000.73', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 772.112; BizzInfo[idd][bExitY] = -3.89865; BizzInfo[idd][bExitZ] = 1000.73;
		}
		case 9: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '372.54', '-133.009', '1001.49', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 372.54; BizzInfo[idd][bExitY] = -133.009; BizzInfo[idd][bExitZ] = 1001.49;
		}
		case 11: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '207.738', '-109.02', '1005.13', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 207.738; BizzInfo[idd][bExitY] = -109.02; BizzInfo[idd][bExitZ] = 1005.13;
		}
		case 12: format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Sbiz`) VALUES ('%f', '%f', '%f', '0', '0', '0', '%d', '%d', '%d', '1', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
		//case 13: format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Sbiz`) VALUES ('%f', '%f', '%f', '0', '0', '0', '%d', '%d', '%d', '1', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
		case 14: {
			format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Interior`) VALUES ('%f', '%f', '%f', '364.942', '-11.0787', '1001.85', '%d', '%d', '%d', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
			BizzInfo[idd][bExitX] = 364.942; BizzInfo[idd][bExitY] = -11.0787; BizzInfo[idd][bExitZ] = 1001.85;
		}
		case 15: format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Sbiz`) VALUES ('%f', '%f', '%f', '0', '0', '0', '%d', '%d', '%d', '1', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
		case 16: format(query, sizeof(query), "INSERT INTO `bizz` (`EntranceX`, `EntranceY`, `EntranceZ`, `ExitX`, `ExitY`, `ExitZ`, `LevelNeeded`, `BuyPrice`, `Type`, `Sbiz`) VALUES ('%f', '%f', '%f', '0', '0', '0', '%d', '%d', '%d', '1', '%d')", Pos[0], Pos[1], Pos[2], level, value, type, BizInteriorID(type));
	}
	mysql_tquery(SQL, query, "", "");
	format(query, sizeof(query), "UPDATE `bizz` SET `Virtual`='%d' WHERE `ID`='%d'", idd, idd);
	mysql_tquery(SQL, query, "", "");

	BizzInfo[idd][bEntranceX] = Pos[0];
	BizzInfo[idd][bEntranceY] = Pos[1];
	BizzInfo[idd][bEntranceZ] = Pos[2];
	BizzInfo[idd][bBuyPrice] = value;
	BizzInfo[idd][bLevelNeeded] = level;
	BizzInfo[idd][bVirtual] = idd;
	BizzInfo[idd][bType] = type;
	BizzInfo[idd][bInterior] = BizInteriorID(type);
	if(type >= 12 && type != 14) BizzInfo[idd][bSbiz] = 1;

	new PropertyString[256];
	DestroyDynamic3DTextLabel(BizzLabel[idd]);
	format(PropertyString, sizeof(PropertyString),"{023d00}%s \n{EEEEEE}Business {023d00}#%d \n{0068CF}This Business is for sale(/buybusiness) ! \n {EEEEEE}Price: {023d00}%s \n{EEEEEE}Level: {023d00}%d %s",BizzInfo[idd][bMessage],idd,FormatNumber(BizzInfo[idd][bBuyPrice]),BizzInfo[idd][bLevelNeeded]);
	BizzLabel[idd] = CreateDynamic3DTextLabel(PropertyString ,0x0066FFCC,BizzInfo[idd][bEntranceX], BizzInfo[idd][bEntranceY], BizzInfo[idd][bEntranceZ],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
	CreateDynamicPickup(1239, 1, BizzInfo[idd][bEntranceX], BizzInfo[idd][bEntranceY], BizzInfo[idd][bEntranceZ]);
	pickups++;
	bussines++;

	if(BizzInfo[idd][bType] == 1) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],52,0,-1,-1,-1,750.0); //Bank
	if(BizzInfo[idd][bType] == 2) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],18,0,-1,-1,-1,750.0); //GunShop
	if(BizzInfo[idd][bType] == 3) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],49,0,-1,-1,-1,750.0); //Bars
	if(BizzInfo[idd][bType] == 4) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],38,0,-1,-1,-1,750.0); //Sex Shop
	if(BizzInfo[idd][bType] == 5) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],25,0,-1,-1,-1,750.0); //Casino
	if(BizzInfo[idd][bType] == 6) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],17,0,-1,-1,-1,750.0); //24/7
	if(BizzInfo[idd][bType] == 7) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],10,0,-1,-1,-1,750.0); //Burger Shot
	if(BizzInfo[idd][bType] == 8) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],54,0,-1,-1,-1,750.0); //Gym
	if(BizzInfo[idd][bType] == 9) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],29,0,-1,-1,-1,750.0); //Pizza
	if(BizzInfo[idd][bType] == 10) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],51,0,-1,-1,-1,750.0); //Rent Car
	if(BizzInfo[idd][bType] == 11) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],45,0,-1,-1,-1,750.0); //Clothes
	if(BizzInfo[idd][bType] == 12) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],27,0,-1,-1,-1,750.0); //Gas Station
	if(BizzInfo[idd][bType] == 13) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],63,0,-1,-1,-1,750.0); //PNS
	if(BizzInfo[idd][bType] == 14) CreateDynamicMapIcon(BizzInfo[idd][bEntranceX],BizzInfo[idd][bEntranceY],BizzInfo[idd][bEntranceZ],14,0,-1,-1,-1,750.0); //Cluckin Bell

	new string[128];
	format(string, sizeof(string), "[@@ %d @@]%f, %f, %f, [$%s, %d lvl, %d int, %d type]", idd, Pos[0], Pos[1], Pos[2], FormatNumber(value), level, BizInteriorID(type), type);
	SCM(playerid, COLOR_YELLOW, string);
	return 1;
}

function BizInteriorID(type) {
	new x;
	switch(type) {
		case 1: x = 0;
		case 2: x = 7;
		case 3: x = 1;
		case 4: x = 3;
		case 5: x = 10;
		case 6: x = 18;
		case 7: x = 10;
		case 8: x = 5;
		case 9: x = 5;
		case 11: x = 15;
		case 12..13: x = 0;
		case 15..16: x = 0;
		case 14: x = 9;
	}
	return x;
}


Aveti si pentru mine o rezolvare va rog

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...