· 6 years ago · Jun 25, 2019, 10:30 PM
1CREATE TABLE IF NOT EXISTS `PrivateCars` (
2`pcar_uid` int(11) NOT NULL,
3 `pcar_owner_uid` int(11) NOT NULL DEFAULT '0',
4 `pcar_owner_name` varchar(24) COLLATE cp1251_bin NOT NULL,
5 `pcar_class` int(11) NOT NULL,
6 `pcar_last_cost` int(11) NOT NULL,
7 `pcar_model` int(11) NOT NULL,
8 `pcar_pos_x` double NOT NULL,
9 `pcar_pos_y` double NOT NULL,
10 `pcar_pos_z` double NOT NULL,
11 `pcar_pos_a` double NOT NULL,
12 `pcar_color_1` int(11) NOT NULL,
13 `pcar_color_2` int(11) NOT NULL
14) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=cp1251 COLLATE=cp1251_bin COMMENT='Личные машины';
15
16
17
18
19CREATE TABLE IF NOT EXISTS `OtherCars` (
20`ocar_uid` int(11) NOT NULL,
21 `ocar_type` int(11) NOT NULL,
22 `ocar_type_id` int(11) NOT NULL,
23 `ocar_type_params` int(11) NOT NULL,
24 `ocar_dop_params` int(11) NOT NULL,
25 `ocar_model` int(11) NOT NULL,
26 `ocar_pos_x` double NOT NULL,
27 `ocar_pos_y` double NOT NULL,
28 `ocar_pos_z` double NOT NULL,
29 `ocar_pos_a` double NOT NULL,
30 `ocar_color_1` int(11) NOT NULL,
31 `ocar_color_2` int(11) NOT NULL
32) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=cp1251 COLLATE=cp1251_bin COMMENT='Остальные машины';
33
34
35
36enum EnumAutoInfo {
37 car_table_type, // 1 private, 2 other
38 car_uid,
39 // -------------- private
40 car_pr_owner_uid,
41 car_pr_owner_name[24],
42 car_pr_class,
43 car_pr_last_cost,
44 // -------------- other
45 car_oth_type,
46 // 1 - org
47 // 2 - job
48 // 3 - fam
49 // 4 - rent(biz BTYPE_RENTCAR)
50 car_oth_type_id,
51 // id faction
52 // id job
53 // id fam
54 // id biz
55 car_oth_type_params,
56 // rank faction
57 // -
58 // -
59 // -
60 car_oth_dop_params,
61 // (faction) 1 - это бусы мафий, фургоны медиков, фургоны инкассаторов
62 // ------------- private & other
63 car_model,
64 Float: car_pos[4],
65 car_color[2],
66
67 // ------------- not save:
68 Text3D: car_label_text, // | Text3D: -1
69 car_label_value, // замена CarMusorCount
70 bool: car_on_sale, // на продаже ли | false
71 car_pr_standart_park, // место в массиве стандартной парковки | -1
72 car_pr_playerid, // ид игрока - владельца | -1
73};
74new AutoInfo[MAX_VEHICLES][EnumAutoInfo];