Толкин
Компетентный
Увидел как-то автосалону копии арп на 1.5к строк, я сразу упал в обморок.
Решил предложить свою версию на 100-200 строк максимум.
И так приступим:
Ко всем переменным(new) добавим:
Ко всем define:
К переменным аккаунта(pInfo, PlayerInfo) добавить:
Ко всем enums:
В OnGameModeInit:
В конец мода:
Ко всем вашим командам:
Ко всем диалогам:
Идем в паблик OnPlayerEnterVehicle:
Далее ищем паблик OnPlayerStateChange:
В OnPlayerDisconnect:
В паблик загрузки аккаунта:
Далее нам необходима сама БД:
Объявляем переменные аккаунта(car, ccolor[2], rcar).
Сначала делаем сохранение переменных:
У меня это выглядит вот так, т.к. моя система сохранения/авторизации взята отсюда
И загрузку данных:
Воот и готово!
Копия на 90% т.к. нет ТД машины при покупке, цвета не точные и салон в другом месте.
Код маппинга автосалона:
В OnPlayerConnect
Чтобы создать свой транспорт в автосалон, необходимо ввести команду /dynamic, что делать дальше видно на скринах.
Вроде сделал все, пользуйтесь)
Решил предложить свою версию на 100-200 строк максимум.
И так приступим:
Ко всем переменным(new) добавим:
PHP:
new PCAR, RCAR;
new Float:gRandomSpawns_Cars[][4] = {
{1743.1049,-1764.2069,13.6243,181.2386},
{1737.9614,-1764.2417,13.5468,181.1864},
{1732.9456,-1764.6221,13.5136,182.7162},
{1728.0669,-1764.6067,13.5136,179.4429},
{1722.8293,-1763.8351,13.5752,179.2734},
{1717.9758,-1764.2260,13.6456,179.4881},
{1712.8364,-1764.0588,13.7383,178.8755},
{1733.0039,-1773.5701,13.5136,359.9872},
{1728.0245,-1773.0076,13.5136,3.0241},
{1722.9591,-1773.0066,13.5442,0.1573},
{1718.0865,-1772.8252,13.6150,3.0313}
};
PHP:
#define MAX_CARS 1000
#define cACCEPT 4F94CD
PHP:
car,
ccolor[2], rcar,
PHP:
enum hills_cars
{
id, // Кол-во каров
mid, // Ид модели
typez, // Тип кара
prise, // Цена за аренду/покупку
Float: cord[4], // Координаты спавна
colors[2], // Цвет кара
lock, // Открыт или закрыт кар
typea[12], // Класс автомобиля
cname[12], // Название автомобиля
fuels
};
new cInfo[MAX_CARS][hills_cars];
new LoadAllCars;
PHP:
mysql_function_query(/* Ваша переменная mysql_connect */, "SELECT * FROM `cars`", true, "@_LoadCars","");
PHP:
@_LoadCars();
@_LoadCars()
{
new rows,fields;
cache_get_data(rows, fields);
LoadAllCars = 0;
for(new i = 1; i < rows; i++)
{
cInfo[i][mid] = cache_get_field_content_int(i, "mid", mysql_id);
cInfo[i][typez] = cache_get_field_content_int(i, "typez", mysql_id);
cInfo[i][prise] = cache_get_field_content_int(i, "prise", mysql_id);
cInfo[i][cord][0] = cache_get_field_content_float(i, "cordX", mysql_id);
cInfo[i][cord][1] = cache_get_field_content_float(i, "cordY", mysql_id);
cInfo[i][cord][2] = cache_get_field_content_float(i, "cordZ", mysql_id);
cInfo[i][cord][3] = cache_get_field_content_float(i, "angle", mysql_id);
cInfo[i][colors][0] = cache_get_field_content_int(i, "colors1", mysql_id);
cInfo[i][colors][1] = cache_get_field_content_int(i, "colors2", mysql_id);
cInfo[i][lock] = cache_get_field_content_int(i, "lock", mysql_id);
cache_get_field_content(i, "typea", cInfo[i][typea], mysql_id, 64);
cache_get_field_content(i, "cname", cInfo[i][cname], mysql_id, 64);
AddStaticVehicle(cInfo[i][mid], cInfo[i][cord][0], cInfo[i][cord][1], cInfo[i][cord][2], cInfo[i][cord][3], cInfo[i][colors][0], cInfo[i][colors][1]);
LoadAllCars++;
}
printf("Машин было загружено: %i",LoadAllCars);
return true;
}
SpawnPlayerCar(playerid)
{
if(pInfo[playerid][car] != 0)
{
new randSpawn = random(sizeof(gRandomSpawns_Cars));
SCM(playerid, -1, !"{"#cACCEPT"}Из-за отсутствия места проживания Ваш транспорт был доставлен к ближайшему Автосалону{ffb300}(/gps)");
PCAR = AddStaticVehicle(pInfo[playerid][car], gRandomSpawns_Cars[randSpawn][0], gRandomSpawns_Cars[randSpawn][1], gRandomSpawns_Cars[randSpawn][2], gRandomSpawns_Cars[randSpawn][3], pInfo[playerid][ccolor][0], pInfo[playerid][ccolor][1]);
}
return true;
}
PHP:
CMD:dynamic(playerid)
{
ShowPlayerDialog(playerid, 8876, DIALOG_STYLE_LIST, "{779A3F} Динамические функции", "{ffffff}1. Создать транспорт", "Выбрать", "Отмена");
return true;
}
CMD:rentcar(playerid)
{
if(cInfo[GetPVarInt(playerid, "CarID")][prise] > /* Ваша переменная денег */) return SCM(playerid, -1, !"{ffb300}У Вас не хватает денег для аренды данного транспорта!"), RemovePlayerFromVehicle(playerid);
pInfo[playerid][rcar] = cInfo[GetPVarInt(playerid, "CarID")][mid];
new randSpawn = random(sizeof(gRandomSpawns_Cars));
RCAR = AddStaticVehicle(pInfo[playerid][rcar], gRandomSpawns_Cars[randSpawn][0], gRandomSpawns_Cars[randSpawn][1], gRandomSpawns_Cars[randSpawn][2], gRandomSpawns_Cars[randSpawn][3], -1, -1);
/* Ваша переменная денег */-= GetPVarInt(playerid, "RENTCAR");
DeletePVar(playerid, "RENTCAR");
return SCM(playerid, -1, !"{ffb300}Вы успешно арендовали транспорт, он был доставлен на парковку у Автосалона!"), RemovePlayerFromVehicle(playerid);
}
PHP:
case 8876:
{
if(!response) return true;
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, 8877, DIALOG_STYLE_INPUT, "{"#cACCEPT"}Создание", "{ffffff}Введите все через запятую:{"#cACCEPT"}\n\n1. ID транспорта\n2. Тип транспорта(1 - Аренда, 2 - Автосалон, 3 - Простой)\n3. Цена транспорта\n4. Открыт или закрыт\n5. Название транспорта\n6. Класс", "Продолжить", "Отмена");
}
}
case 8877:
{
if(!response) return true;
///if(strlen(inputtext) > 3 || strlen(inputtext) < 1) return SCM(playerid, -1, !"{"#cACCEPT"}Ошибка при указании типа транспорта!");
new ccar[6], query[250], Float:cords[5], namecar[21], classa[21];
GetPlayerPos(playerid, cords[0], cords[1], cords[2]);
GetPlayerFacingAngle(playerid, cords[3]);
if(sscanf(inputtext, "p<,>dddds[20]s[20]", ccar[0], ccar[1], ccar[2], ccar[3], namecar, classa)) return SCM(playerid, -1, !"{"#cACCEPT"}Ошибка при указании синтаксиса транспорта!");
format(query, sizeof(query), "INSERT INTO `cars` (`mid`, `typez`, `prise`, `cordX`, `cordY`, `cordZ`, `angle`, `lock`, `typea`, `cname`) VALUES ('%d', '%d', '%d', '%f', '%f', '%f', '%f', '%d', '%s', '%s')", ccar[0], ccar[1], ccar[2], cords[0], cords[1], cords[2], cords[3], ccar[3], classa, namecar);
mysql_function_query(mysql_id, query, false, "", "");
for(new carv = 1; carv < GetVehiclePoolSize(); carv++) DestroyVehicle(carv);
mysql_function_query(mysql_id, "SELECT * FROM `cars`", true, "@_LoadCars","");
return 1;
}
case 8878:
{
if(!response) return RemovePlayerFromVehicle(playerid);
if(cInfo[GetPVarInt(playerid, "CarID")][prise] > /* Ваша переменная денег */) return SCM(playerid, -1, !"{ffb300}У Вас не хватает денег на данный транспорт!"), RemovePlayerFromVehicle(playerid);
pInfo[playerid][car] = cInfo[GetPVarInt(playerid, "CarID")][mid];
/* Ваша переменная денег */ -= cInfo[GetPVarInt(playerid, "CarID")][prise];
SCM(playerid, -1, !"{ffb300}Поздравляем с покупкой новой машины!");
SCM(playerid, -1, !"{"#cACCEPT"}Транспорт будет доставлен к дверям автосалона в течении нескольких минут.");
RemovePlayerFromVehicle(playerid), SpawnPlayerCar(playerid);
return SaveAccount(playerid);
}
PHP:
DeletePVar(playerid, "CarID");
SetPVarInt(playerid, "CarID", vehicleid);
PHP:
if(newstate == PLAYER_STATE_DRIVER)
{
if(cInfo[GetPVarInt(playerid, "CarID")][typez] == 2)
{
new str_frm[300];
SetPVarInt(playerid, "RENTCAR", random(6000)+2000);
format(str_frm, sizeof(str_frm), "%s {FFFFFF}Тип автомобиля:\t %s\n", str_frm, cInfo[GetPVarInt(playerid, "CarID")][typea]);
format(str_frm, sizeof(str_frm), "%s Название:\t\t %s\n", str_frm, cInfo[GetPVarInt(playerid, "CarID")][cname]);
format(str_frm, sizeof(str_frm), "%s Номер модели:\t\t %d\n", str_frm, cInfo[GetPVarInt(playerid, "CarID")][mid]);
format(str_frm, sizeof(str_frm), "%s Стоимость покупки:\t {ffb300}%d${00BF00}\n", str_frm, cInfo[GetPVarInt(playerid, "CarID")][prise]);
format(str_frm, sizeof(str_frm), "%s {FFFFFF}Стоимость аренды:\t {00ff00}%d${00BF00}\n\n", str_frm, GetPVarInt(playerid, "RENTCAR"));
format(str_frm, sizeof(str_frm), "%s {FFFFFF}Для покупки этой модели нажмите ""Купить""\n", str_frm);
format(str_frm, sizeof(str_frm), "%s {FFFFFF}Чтобы взять авто в аренду используйте /rentcar", str_frm);
ShowPlayerDialog(playerid, 8878, DIALOG_STYLE_MSGBOX, "{"#cACCEPT"}Автосалон LS", str_frm, "Купить", "Отмена");
}
}
PHP:
DestroyVehicle(PCAR);
DestroyVehicle(RCAR);
PHP:
SpawnPlayerCar(playerid);
PHP:
CREATE TABLE IF NOT EXISTS `cars` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`mid` int(11) NOT NULL,
`typez` int(11) NOT NULL,
`prise` int(11) NOT NULL,
`cordX` float NOT NULL,
`cordY` float NOT NULL,
`cordZ` float NOT NULL,
`angle` float NOT NULL,
`colors1` int(11) NOT NULL DEFAULT '-1',
`colors2` int(11) NOT NULL DEFAULT '-1',
`lock` int(11) NOT NULL,
`cname` varchar(64) NOT NULL,
`typea` varchar(64) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
--
-- Дамп данных таблицы `cars`
--
INSERT INTO `cars` (`id`, `mid`, `typez`, `prise`, `cordX`, `cordY`, `cordZ`, `angle`, `colors1`, `colors2`, `lock`, `cname`, `typea`) VALUES
(1, 560, 2, 10000, 1321.91, -927.378, 37.353, 126.804, 0, 0, 2, '', ''),
(2, 411, 2, 80000, 1766.27, -1787.31, 20.7865, 303.084, -1, -1, 1, 'Infernus', 'Спортивный'),
(3, 429, 2, 60000, 1771.86, -1788.33, 20.786, 330.886, -1, -1, 1, 'Banshee', 'Спортивный'),
(4, 451, 2, 70000, 1778.54, -1788.06, 20.7864, 12.6716, -1, -1, 1, 'Turismo', 'Спортивный'),
(5, 477, 2, 50000, 1785.45, -1787.53, 20.7859, 341.147, -1, -1, 1, 'ZR-350', 'Спортивный'),
(6, 480, 2, 40000, 1788.87, -1775.22, 20.7857, 331.484, -1, -1, 1, 'Comet', 'Спортивный'),
(7, 506, 2, 60000, 1788.66, -1766.44, 20.7855, 330.655, -1, -1, 1, 'Super GT', 'Спортивный'),
(8, 541, 2, 70000, 1786.14, -1752.96, 20.7865, 173.607, -1, -1, 1, 'Bullet', 'Спортивный'),
(9, 602, 2, 30000, 1779.25, -1752.94, 20.7863, 201.476, -1, -1, 1, 'Alpha', 'Спортивный'),
(10, 603, 2, 50000, 1769.09, -1752.48, 20.7856, 203.173, -1, -1, 1, 'Phoenix', 'Спортивный'),
(11, 522, 2, 40000, 1765.61, -1759.57, 20.7855, 281.667, -1, -1, 1, 'NRG-500', 'Спортивный'),
(12, 560, 2, 50000, 1765.77, -1766.73, 20.7857, 283.39, -1, -1, 1, 'Bullet', 'Спортивный'),
(13, 558, 2, 40000, 1765.58, -1773.45, 20.7859, 252.311, -1, -1, 1, 'Uranus', 'Спортивный'),
(14, 559, 2, 50000, 1765.78, -1781.58, 20.7858, 283.896, -1, -1, 1, 'Jester', 'Спортивный'),
(15, 565, 2, 30000, 1777.32, -1771.5, 20.7857, 293.438, -1, -1, 1, 'Flash', 'Спортивный'),
(16, 587, 2, 60000, 1776.19, -1763.67, 20.786, 250.61, -1, -1, 1, 'Euros', 'Спортивный'),
(17, 555, 2, 30000, 1778.63, -1778.85, 20.786, 291.84, -1, -1, 1, 'Windsor', 'Спортивный');
Сначала делаем сохранение переменных:
PHP:
format(query_string, sizeof(query_string), "%s `car` = '%d',", query_string, /* Ваша переменная аккаунта*/[playerid][car]);
format(query_string, sizeof(query_string), "%s `ccolor` = '%d',", query_string, /* Ваша переменная аккаунта*/[playerid][ccolor][0]);
format(query_string, sizeof(query_string), "%s `ccolor2` = '%d',", query_string, /* Ваша переменная аккаунта*/[playerid][ccolor][1]);
format(query_string, sizeof(query_string), "%s `rcar` = '%d'", query_string, /* Ваша переменная аккаунта*/[playerid][rcar]);
И загрузку данных:
PHP:
/* Ваша переменная аккаунта*/[playerid][car] = cache_get_field_content_int(0, "car", /* Ваша переменная mysql_connect*/);
/* Ваша переменная аккаунта*/[playerid][ccolor][0] = cache_get_field_content_int(0, "ccolor", /* Ваша переменная mysql_connect*/);
/* Ваша переменная аккаунта*/[playerid][ccolor][1] = cache_get_field_content_int(0, "ccolor2", /* Ваша переменная mysql_connect*/);
/* Ваша переменная аккаунта*/[playerid][rcar] = cache_get_field_content_int(0, "rcar", /* Ваша переменная mysql_connect*/);
Копия на 90% т.к. нет ТД машины при покупке, цвета не точные и салон в другом месте.
Код маппинга автосалона:
Ко всем переменным:
В OnGameModeInit
PHP:
new Pilastra[28];
new ChaoTerrio[8];
new VagaCarrosSalao[32];
new ChaoTeto[20];
new Rampa[4];
new TextoConce[4];
new ChaoExterno[2];
PHP:
ChaoTerrio[0] = CreateObject(3113, 1802.2002, -1758.7002, 12.1, 0, 284.996, 0, 200.0);
ChaoTerrio[1] = CreateObject(3113, 1802.2002, -1781.2998, 12.1, 0, 284.991, 0, 200.0);
ChaoTerrio[2] = CreateObject(3113, 1791, -1758.7002, 12.1, 0, 284.991, 0, 200.0);
ChaoTerrio[3] = CreateObject(3113, 1779.7998, -1758.7002, 12.1, 0, 284.991, 0, 200.0);
ChaoTerrio[4] = CreateObject(3113, 1791, -1781.2998, 12.1, 0, 284.991, 0, 200.0);
ChaoTerrio[5] = CreateObject(3113, 1779.7998, -1781.2998, 12.1, 0, 284.991, 0, 200.0);
ChaoTerrio[6] = CreateObject(3113, 1768.5996, -1758.7002, 12.1, 0, 284.991, 0, 200.0);
ChaoTerrio[7] = CreateObject(3113, 1768.5996, -1781.2998, 12.1, 0, 284.991, 0, 200.0);
for(new TexturizarID; TexturizarID < 8; TexturizarID++){SetObjectMaterial(ChaoTerrio[TexturizarID], 0, 2774, "airp_prop", "cj_white_wall2", 0xFFFFFFFF);}
Pilastra[0] = CreateObject(2774, 1790.7002, -1792.7002, 15.1, 0, 179.995, 0, 200.0);
Pilastra[1] = CreateObject(2774, 1805.9004, -1747.7998, 15.1, 0, 179.995, 0, 200.0);
Pilastra[2] = CreateObject(2774, 1774.7998, -1792.7002, 15.1, 0, 179.995, 0, 200.0);
Pilastra[3] = CreateObject(2774, 1761.4004, -1792.7002, 15.1, 0, 179.995, 0, 200.0);
Pilastra[4] = CreateObject(2774, 1761.4004, -1763.5, 15.1, 0, 179.995, 0, 200.0);
Pilastra[5] = CreateObject(2774, 1761.4004, -1778.0996, 15.1, 0, 179.995, 0, 200.0);
Pilastra[6] = CreateObject(2774, 1805.9004, -1792.7002, 15.1, 0, 179.995, 0, 200.0);
Pilastra[7] = CreateObject(2774, 1790.7002, -1747.7998, 15.1, 0, 179.995, 0, 200.0);
Pilastra[8] = CreateObject(2774, 1774.7998, -1747.7998, 15.1, 0, 179.995, 0, 200.0);
Pilastra[9] = CreateObject(2774, 1761.4, -1747.8, 15.1, 0, 179.995, 0, 200.0);
Pilastra[10] = CreateObject(2774, 1805.9004, -1763.5, 15.1, 0, 179.995, 0, 200.0);
Pilastra[11] = CreateObject(2774, 1805.9004, -1778.0996, 15.1, 0, 179.995, 0, 200.0);
Pilastra[12] = CreateObject(2774, 1773.7002, -1747.7998, 19.2, 0, 270, 179.995, 200.0);
Pilastra[13] = CreateObject(2774, 1793.5996, -1747.9004, 19.2, 0, 270, 359.995, 200.0);
Pilastra[14] = CreateObject(2774, 1793.5, -1792.5996, 19.2, 0, 270, 359.984, 200.0);
Pilastra[15] = CreateObject(2774, 1773.7002, -1792.5996, 19.2, 0, 270, 179.995, 200.0);
Pilastra[16] = CreateObject(2774, 1805.7998, -1780.2998, 19.2, 0, 270, 269.989, 200.0);
Pilastra[17] = CreateObject(2774, 1805.7998, -1760.0996, 19.2, 0, 270, 89.984, 200.0);
Pilastra[18] = CreateObject(2774, 1761.5, -1760.0996, 19.2, 0, 270, 89.984, 200.0);
Pilastra[19] = CreateObject(2774, 1761.4004, -1780.4004, 19.2, 0, 270, 269.989, 200.0);
Pilastra[20] = CreateObject(2774, 1761.5, -1760.1, 26.7, 0, 270, 89.984, 200.0);
Pilastra[21] = CreateObject(2774, 1761.4004, -1780.4004, 26.7, 0, 270, 269.989, 200.0);
Pilastra[22] = CreateObject(2774, 1773.7002, -1792.5996, 26.7, 0, 270, 179.995, 200.0);
Pilastra[23] = CreateObject(2774, 1793.5, -1792.5996, 26.7, 0, 270, 359.984, 200.0);
Pilastra[24] = CreateObject(2774, 1805.7998, -1780.2998, 26.7, 0, 270, 269.989, 200.0);
Pilastra[25] = CreateObject(2774, 1805.7998, -1760.0996, 26.7, 0, 270, 89.984, 200.0);
Pilastra[26] = CreateObject(2774, 1793.5996, -1747.9004, 26.7, 0, 270, 359.995, 200.0);
Pilastra[27] = CreateObject(2774, 1773.7002, -1747.7998, 26.7, 0, 270, 179.995, 200.0);
for(new TexturizarID; TexturizarID < 28; TexturizarID++){SetObjectMaterial(Pilastra[TexturizarID], 1, 2774, "airp_prop", "cj_white_wall2", 0xFF000080), SetObjectMaterial(Pilastra[TexturizarID], 2, 2774, "none", "none", 0xFF000080), SetObjectMaterial(Pilastra[TexturizarID], 0, 2774, "none", "none", 0xFF000080);}
ChaoTeto[0] = CreateObject(7191, 1764.2002, -1769.9004, 19.6, 0, 90, 0, 200.0);
ChaoTeto[1] = CreateObject(7191, 1768.1, -1769.9, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[2] = CreateObject(7191, 1772, -1769.9, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[3] = CreateObject(7191, 1775.9, -1769.9, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[4] = CreateObject(7191, 1779.8, -1769.9, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[5] = CreateObject(7191, 1783.7002, -1769.9004, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[6] = CreateObject(7191, 1787.5996, -1769.7998, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[7] = CreateObject(7191, 1791.5, -1769.7998, 19.6, 0, 89.995, 0, 200.0);
ChaoTeto[8] = CreateObject(7191, 1804.4, -1770.5, 19.6, 0, 89.995, 180, 200.0);
ChaoTeto[9] = CreateObject(7191, 1764.2, -1769.9, 26.6, 0, 90, 0, 200.0);
ChaoTeto[10] = CreateObject(7191, 1768.0996, -1769.9004, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[11] = CreateObject(7191, 1772, -1769.9004, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[12] = CreateObject(7191, 1775.9004, -1769.9004, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[13] = CreateObject(7191, 1779.7998, -1769.9004, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[14] = CreateObject(7191, 1783.7002, -1769.9004, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[15] = CreateObject(7191, 1787.5996, -1769.7998, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[16] = CreateObject(7191, 1791.5, -1769.7998, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[17] = CreateObject(7191, 1803.2, -1770.5, 26.6, 0, 89.995, 179.995, 200.0);
ChaoTeto[18] = CreateObject(7191, 1795.4, -1769.8, 26.6, 0, 89.995, 0, 200.0);
ChaoTeto[19] = CreateObject(7191, 1799.3, -1769.8, 26.6, 0, 89.995, 0, 200.0);
for(new TexturizarID; TexturizarID < 20; TexturizarID++){SetObjectMaterial(ChaoTeto[TexturizarID], 0, 2774, "airp_prop", "cj_white_wall2", 0xFFFFFFFF);}
Rampa[0] = CreateObject(3095, 1798, -1787.2998, 19.1, 0, 0, 0, 200.0);
Rampa[1] = CreateObject(3095, 1798, -1778.6, 18, 345.5, 0, 0, 200.0);
Rampa[2] = CreateObject(3095, 1798, -1769.9004, 15.75, 345.493, 0, 0, 200.0);
Rampa[3] = CreateObject(3095, 1798, -1761.2998, 13.25, 341.993, 0, 0, 200.0);
for(new TexturizarID; TexturizarID < 4; TexturizarID++){SetObjectMaterial(Rampa[TexturizarID], 0, 2774, "airp_prop", "cj_white_wall2", 0xFFFFFFFF), SetObjectMaterial(Rampa[TexturizarID], 1, 2774, "airp_prop", "cj_white_wall2", 0xFF000080);}
VagaCarrosSalao[0] = CreateObject(4084, 1767.5, -1752, 12.7, 0, 90.5, 310, 200.0);
VagaCarrosSalao[1] = CreateObject(4084, 1765.5, -1759.6, 12.7, 0, 90.5, 69.999, 200.0);
VagaCarrosSalao[2] = CreateObject(4084, 1777.8, -1752.7, 12.7, 0, 90.5, 339.999, 200.0);
VagaCarrosSalao[3] = CreateObject(4084, 1787, -1753.1, 12.7, 0, 90.494, 29.994, 200.0);
VagaCarrosSalao[4] = CreateObject(4084, 1766.2, -1782.6, 12.7, 0, 90.494, 119.995, 200.0);
VagaCarrosSalao[5] = CreateObject(4084, 1769.4, -1787.7, 12.7, 0, 90.489, 159.993, 200.0);
VagaCarrosSalao[6] = CreateObject(4084, 1778.6, -1788.2, 12.7, 0, 90.483, 199.988, 200.0);
VagaCarrosSalao[7] = CreateObject(4084, 1786.5, -1788.2, 12.7, 0, 90.478, 159.984, 200.0);
VagaCarrosSalao[8] = CreateObject(4084, 1793.7, -1788.5, 12.7, 0, 90.472, 199.983, 200.0);
VagaCarrosSalao[9] = CreateObject(4084, 1800.4, -1788.8, 12.7, 0, 90.467, 149.979, 200.0);
VagaCarrosSalao[10] = CreateObject(4084, 1802, -1781.7, 12.7, 0, 90.461, 79.977, 200.0);
VagaCarrosSalao[11] = CreateObject(4084, 1801.2, -1774, 12.7, 0, 90.461, 109.975, 200.0);
VagaCarrosSalao[12] = CreateObject(4084, 1766, -1759.6, 19.7, 0, 90.244, 101.994, 200.0);
VagaCarrosSalao[13] = CreateObject(4084, 1769.3, -1753.3, 19.7, 0, 90.242, 19.99, 200.0);
VagaCarrosSalao[14] = CreateObject(4084, 1779.5, -1753.4, 19.7, 0, 90.236, 19.984, 200.0);
VagaCarrosSalao[15] = CreateObject(4084, 1786.3, -1752.8, 19.7, 0, 90.236, 349.984, 200.0);
VagaCarrosSalao[16] = CreateObject(4084, 1766.2, -1766.7, 19.7, 0, 90.242, 101.992, 200.0);
VagaCarrosSalao[17] = CreateObject(4084, 1766.3, -1773.7, 19.7, 0, 90.242, 71.992, 200.0);
VagaCarrosSalao[18] = CreateObject(4084, 1766.3, -1781.5, 19.7, 0, 90.236, 101.988, 200.0);
VagaCarrosSalao[19] = CreateObject(4084, 1766.5, -1787, 19.7, 0, 90.231, 121.986, 200.0);
VagaCarrosSalao[20] = CreateObject(4084, 1771.9, -1788.2, 19.7, 0, 90.225, 151.981, 200.0);
VagaCarrosSalao[21] = CreateObject(4084, 1778.4, -1788, 19.7, 0, 90.22, 191.979, 200.0);
VagaCarrosSalao[22] = CreateObject(4084, 1785.4, -1787.7, 19.7, 0, 90.214, 161.975, 200.0);
VagaCarrosSalao[23] = CreateObject(4084, 1778.5, -1765.1, 12.7, 0, 90.494, 69.994, 200.0);
VagaCarrosSalao[24] = CreateObject(4084, 1789.2, -1772.7, 12.7, 0, 90.494, 111.994, 200.0);
VagaCarrosSalao[25] = CreateObject(4084, 1780.2, -1778.4, 12.7, 0, 90.489, 141.989, 200.0);
VagaCarrosSalao[26] = CreateObject(4084, 1771, -1771.2, 12.7, 0, 90.483, 71.987, 200.0);
VagaCarrosSalao[27] = CreateObject(4084, 1776.9, -1763.9, 19.7, 0, 90.242, 71.992, 200.0);
VagaCarrosSalao[28] = CreateObject(4084, 1777.7, -1771.4, 19.7, 0, 90.236, 111.988, 200.0);
VagaCarrosSalao[29] = CreateObject(4084, 1778.5, -1778.9, 19.7, 0, 90.231, 111.984, 200.0);
VagaCarrosSalao[30] = CreateObject(4084, 1788.9, -1766.2, 19.7, 0, 90.231, 151.984, 200.0);
VagaCarrosSalao[31] = CreateObject(4084, 1789, -1775.1, 19.7, 0, 90.225, 151.979, 200.0);
for(new TexturizarID; TexturizarID < 32; TexturizarID++){SetObjectMaterial(VagaCarrosSalao[TexturizarID], 0, 3113, "carrierxr", "ws_shipmetal1", 0xFFFF0000);}
TextoConce[0] = CreateObject(9527, 1761, -1770.7, 19.2, 0, 0, 270, 200.0);
TextoConce[1] = CreateObject(9527, 1783, -1793, 19.2, 0, 0, 0, 200.0);
TextoConce[2] = CreateObject(9527, 1806.2, -1770.5, 19.2, 0, 0, 90, 200.0);
TextoConce[3] = CreateObject(9527, 1782.1, -1747.3, 19.2, 0, 0, 180, 200.0);
for(new TexturizarID; TexturizarID < 4; TexturizarID++){SetObjectMaterialText(TextoConce[TexturizarID], "DEALERSHIP", 0, OBJECT_MATERIAL_SIZE_256x128, "Arial black", 35, 0, 0xFFFFFFFF, 0xFF0000FF, OBJECT_MATERIAL_TEXT_ALIGN_CENTER);}
ChaoExterno[0] = CreateObject(3983, 1722.40002, -1775.5, 14.5370, 0, 0, 0);
ChaoExterno[1] = CreateObject(4012, 1777.4343, -1782.3, 12.6499, 0, 0, 0);
SetObjectMaterial(ChaoExterno[0], 1, 10936, "stadiumground_sfse", "ws_shipmetal1", 0xFF1C1C1C);
SetObjectMaterial(ChaoExterno[1], 2, 10936, "stadiumground_sfse", "ws_shipmetal1", 0xFF1C1C1C);
CreateObject(3858, 1782.7002, -1792.7002, 23, 0, 0, 44.995, 200.0);
CreateObject(3858, 1798.5996, -1747.7998, 23, 0, 0, 44.995, 200.0);
CreateObject(3858, 1767.9004, -1792.7002, 23, 0, 0, 44.995, 200.0);
CreateObject(3858, 1806.0996, -1755.5, 23, 0, 0, 314.995, 200.0);
CreateObject(3858, 1806.0996, -1770.0996, 23, 0, 0, 314.995, 200.0);
CreateObject(3858, 1806.0996, -1785.2998, 23, 0, 0, 314.995, 200.0);
CreateObject(3858, 1798.5996, -1792.4004, 23, 0, 0, 44.995, 200.0);
CreateObject(3858, 1782.7002, -1747.7998, 23, 0, 0, 44.995, 200.0);
CreateObject(3858, 1767.9004, -1747.5996, 23, 0, 0, 44.995, 200.0);
CreateObject(3858, 1761.5996, -1785.2998, 23, 0, 0, 314.995, 200.0);
CreateObject(3858, 1761.6, -1755.5, 23, 0, 0, 314.995, 200.0);
CreateObject(3858, 1767.9004, -1747.5996, 15.6, 0, 0, 44.995, 200.0);
CreateObject(3858, 1782.7002, -1747.7998, 15.6, 0, 0, 44.995, 200.0);
CreateObject(3858, 1798.5996, -1747.7998, 15.6, 0, 0, 44.995, 200.0);
CreateObject(3858, 1806.0996, -1755.5, 15.6, 0, 0, 314.995, 200.0);
CreateObject(3858, 1806.0996, -1770.0996, 15.6, 0, 0, 314.995, 200.0);
CreateObject(3858, 1806.0996, -1785.2998, 15.6, 0, 0, 314.995, 200.0);
CreateObject(3858, 1798.5996, -1792.4004, 15.6, 0, 0, 44.995, 200.0);
CreateObject(3858, 1782.7002, -1792.7002, 15.6, 0, 0, 44.995, 200.0);
CreateObject(3858, 1767.9004, -1792.7002, 15.6, 0, 0, 44.995, 200.0);
CreateObject(3858, 1761.5996, -1785.2998, 15.6, 0, 0, 314.995, 200.0);
CreateObject(3858, 1761.5996, -1755.5, 15.6, 0, 0, 314.995, 200.0);
CreateObject(3858, 1761.5, -1770.3, 23, 0, 0, 314.995, 200.0);
CreateObject(996, 1793.2, -1749.4, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1793.2002, -1757.5996, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1793.2, -1765.8, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1793.2, -1774, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1802.6, -1749.4, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1802.6, -1757.6, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1802.6, -1765.8, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1802.6, -1774, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1802.6, -1782.2, 20.3, 0, 0, 270, 200.0);
CreateObject(996, 1793.7, -1775.3, 18.4, 0, 345.5, 270, 200.0);
CreateObject(996, 1802.3, -1775.3, 18.4, 0, 345.498, 270, 200.0);
CreateObject(996, 1802.3, -1767.3, 16.3, 0, 345.498, 270, 200.0);
CreateObject(996, 1793.7, -1767.4, 16.3, 0, 345.498, 270, 200.0);
CreateObject(996, 1793.7, -1759.5, 13.9, 0, 342.998, 270, 200.0);
CreateObject(996, 1802.3, -1759.4, 13.9, 0, 342.993, 270, 200.0);
CreateObject(1223, 1760.8, -1747.2, 12.5, 0, 0, 140.75, 200.0);
CreateObject(1223, 1760.8, -1763.5, 12.5, 0, 0, 179.995, 200.0);
CreateObject(1223, 1760.8, -1778.1, 12.5, 0, 0, 179.995, 200.0);
CreateObject(1223, 1760.8, -1793.4, 12.5, 0, 0, 217.995, 200.0);
CreateObject(1223, 1774.8, -1793.3, 12.5, 0, 0, 269.995, 200.0);
CreateObject(1223, 1790.8, -1793.3, 12.5, 0, 0, 269.989, 200.0);
CreateObject(1223, 1806.6, -1793.3, 12.5, 0, 0, 309.989, 200.0);
CreateObject(1223, 1806.5, -1778, 12.5, 0, 0, 359.989, 200.0);
CreateObject(1223, 1806.5, -1763.5, 12.5, 0, 0, 359.984, 200.0);
CreateObject(1223, 1806.5, -1747.1, 12.5, 0, 0, 39.984, 200.0);
CreateObject(1223, 1790.7, -1747.2, 12.5, 0, 0, 89.984, 200.0);
CreateObject(1223, 1774.8, -1747.2, 12.5, 0, 0, 89.984, 200.0);
CreateObject(10183, 1725.5, -1765, 12.7, 359.497, 359.995, 224.991, 200.0);
CreateObject(10183, 1725.5, -1772.8, 12.6, 359.995, 0.492, 44.989, 200.0);
CreateObject(10183, 1724.3, -1791.9, 12.6, 359.495, 0.234, 224.233, 200.0);
CreateObject(10183, 1787.1, -1808.9, 12.6, 359.495, 0.484, 224.235, 200.0);
CreateObject(1232, 1716, -1742.7998, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1726, -1742.7998, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1736.0996, -1742.7998, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1746.0996, -1742.7998, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1706.0996, -1742.7998, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1704.2, -1795.7, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1714.3, -1796, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1724.3, -1796.2, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1734.3, -1796.3, 15.2, 0, 0, 0, 200.0);
CreateObject(1232, 1744.2, -1796.5, 15.2, 0, 0, 0, 200.0);
CreateObject(1231, 1705.2002, -1768.7002, 15.5, 0, 0, 90, 200.0);
CreateObject(1231, 1715.4, -1768.8, 15.5, 0, 0, 90, 200.0);
CreateObject(1231, 1725.4, -1768.9, 15.5, 0, 0, 90, 200.0);
CreateObject(1231, 1735.4, -1769, 15.5, 0, 0, 90, 200.0);
CreateObject(1231, 1745.4, -1769.1, 15.5, 0, 0, 90, 200.0);
CreateObject(7662, 1709.3, -1743, 13.4, 0, 0, 270, 200.0);
CreateObject(7662, 1726.6, -1742.9, 13.4, 0, 0, 270, 200.0);
CreateObject(7662, 1702.8, -1786.3, 13.4, 0, 0, 0, 200.0);
CreateObject(7662, 1810.4, -1783.2, 13.4, 0, 0, 0, 200.0);
CreateObject(7662, 1810.3, -1799.8, 13.4, 0, 0, 0, 200.0);
CreateObject(620, 1795.2, -1742.6, 12.5, 0, 0, 30.234, 200.0);
CreateObject(620, 1784, -1742.5, 12.5, 0, 0, 30.234, 200.0);
CreateObject(620, 1773.5, -1742.6, 12.5, 0, 0, 30.234, 200.0);
CreateObject(620, 1806.5, -1742.5, 12.5, 0, 0, 30.234, 200.0);
CreateObject(1698, 1749.9, -1748, 13.5, 0, 0, 220, 150.0);
CreateObject(3440, 1747.7, -1748.4, 11.2, 0, 0, 0, 200.0);
CreateObject(1698, 1748.4, -1749.3, 13.5, 0, 0, 219.996, 200.0);
CreateObject(1698, 1750.4, -1751.7, 13, 339.995, 0, 219.996, 200.0);
CreateObject(3440, 1749.2, -1747, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1750.7, -1748.8, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1749.1, -1750, 11.2, 0, 0, 0, 200.0);
CreateObject(1698, 1751.9, -1750.4, 13, 339.994, 0, 219.99, 200.0);
CreateObject(1698, 1738.8, -1748, 13.5, 0, 0, 179.996, 200.0);
CreateObject(1698, 1736.8, -1748, 13.5, 0, 0, 179.995, 200.0);
CreateObject(1698, 1738.8, -1751.1, 13, 339.994, 0, 179.99, 200.0);
CreateObject(1698, 1736.8, -1751.1, 13, 339.988, 0, 179.989, 200.0);
CreateObject(3440, 1738.9, -1747, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1738.9, -1749, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1736.8, -1747, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1736.9, -1749.3, 11.2, 0, 0, 0, 200.0);
CreateObject(1698, 1728.6, -1748.4, 13.5, 0, 0, 179.995, 200.0);
CreateObject(1698, 1726.7, -1748.4, 13.5, 0, 0, 179.995, 200.0);
CreateObject(1698, 1726.7, -1751.5, 13, 339.988, 0, 179.989, 200.0);
CreateObject(1698, 1728.6, -1751.5, 13, 339.988, 0, 179.989, 200.0);
CreateObject(3440, 1728.8, -1747.4, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1726.7, -1747.3, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1726.7, -1749.6, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1728.6, -1749.5, 11.2, 0, 0, 0, 200.0);
CreateObject(1698, 1716.9, -1748.1, 13.5, 0, 0, 159.995, 200.0);
CreateObject(1698, 1718.8, -1748.8, 13.5, 0, 0, 159.994, 200.0);
CreateObject(1698, 1717.7, -1751.7, 13, 339.988, 0, 159.989, 200.0);
CreateObject(1698, 1715.8, -1751, 13, 339.988, 0, 159.988, 200.0);
CreateObject(3440, 1717.3, -1747.2, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1719.2, -1747.7, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1718.3, -1750.1, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1716.4, -1749.4, 11.2, 0, 0, 0, 200.0);
CreateObject(1698, 1706.2, -1749.1, 13.5, 0, 0, 229.994, 200.0);
CreateObject(1698, 1707.4, -1747.7, 13.5, 0, 0, 229.993, 200.0);
CreateObject(1698, 1708.6, -1751.2, 13, 339.988, 0, 229.988, 200.0);
CreateObject(1698, 1709.8, -1749.7, 13, 339.988, 0, 229.988, 200.0);
CreateObject(3440, 1706.6, -1747, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1705.2, -1748.3, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1707.1, -1750, 11.2, 0, 0, 0, 200.0);
CreateObject(3440, 1708.2, -1748.4, 11.2, 0, 0, 0, 200.0);
CreateObject(2185, 1789.1, -1779.7, 12.8, 0, 0, 270, 200.0);
CreateObject(2185, 1788.5, -1763.9, 12.8, 0, 0, 270, 200.0);
CreateObject(2185, 1788.2, -1759.4, 19.7, 0, 0, 270, 200.0);
CreateObject(1714, 1789.6, -1764.5, 12.8, 0, 0, 284, 200.0);
CreateObject(1714, 1789.5996, -1764.5, 12.8, 0, 0, 283.997, 200.0);
CreateObject(1714, 1787.3, -1765.1, 12.8, 0, 0, 103.997, 200.0);
CreateObject(1714, 1787.2, -1764.3, 12.8, 0, 0, 72.497, 200.0);
CreateObject(1714, 1787.9, -1780, 12.8, 0, 0, 72.493, 200.0);
CreateObject(1714, 1787.9004, -1781.0996, 12.8, 0, 0, 104.491, 200.0);
CreateObject(1714, 1789.5, -1760, 19.8, 0, 0, 270.491, 200.0);
CreateObject(1714, 1786.9, -1760.2, 19.8, 0, 0, 80.489, 200.0);
CreateObject(1714, 1786.8, -1759.4, 19.8, 0, 0, 80.486, 200.0);
CreateObject(1714, 1789.9, -1780.5, 12.8, 0, 0, 304.491, 200.0);
В OnPlayerConnect
PHP:
RemoveBuildingForPlayer(playerid, 4025, 1777.8359, -1773.9063, 12.5234, 0.25);
RemoveBuildingForPlayer(playerid, 4070, 1719.7422, -1770.7813, 23.4297, 0.25);
RemoveBuildingForPlayer(playerid, 1531, 1724.7344, -1741.5000, 14.1016, 0.25);
RemoveBuildingForPlayer(playerid, 4215, 1777.5547, -1775.0391, 36.7500, 0.25);
RemoveBuildingForPlayer(playerid, 3986, 1719.7422, -1770.7813, 23.4297, 0.25);
RemoveBuildingForPlayer(playerid, 4019, 1777.8359, -1773.9063, 12.5234, 0.25);
Чтобы создать свой транспорт в автосалон, необходимо ввести команду /dynamic, что делать дальше видно на скринах.
Вроде сделал все, пользуйтесь)
Последнее редактирование:
