Доступ к готовым решениям

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

Мануал Интерьер для авто и система входа (Burito)

Статус
В этой теме нельзя размещать новые ответы.

Varios

Умник
Всем привет!
Вот выложил систему входа в интерьер авто!

Автор: Merlin
Автор вырезки: Varios(Я)

Создадим новую переменную
PHP:
new GetBuritoID[MAX_PLAYERS];
Добавим в public OnPlayerStateChange(playerid, newstate, oldstate)
PHP:
	if(newstate == PLAYER_STATE_PASSENGER)
    {
        if((GetPlayerVehicleSeat(playerid) == 2 || GetPlayerVehicleSeat(playerid) == 3) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 482)
        {
            SetPlayerVirtualWorld(playerid,GetPlayerVehicleID(playerid));
            SetPlayerInterior(playerid,GetPlayerVehicleID(playerid));
            GetBuritoID[playerid] = GetPlayerVehicleID(playerid);
            SetPlayerPos(playerid, 2008.3342,1032.2413,1012.1354);
            SetPlayerFacingAngle(playerid,275.7225);
        }
    }
Добавим в public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
PHP:
	if(newkeys == 16 && GetBuritoID[playerid] >-1)
    {
        new Float:X, Float:Y, Float:Z;
        GetVehiclePos(GetBuritoID[playerid], X, Y, Z);
        SetPlayerPos(playerid, X+4, Y, Z);
        SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid,0);
        GetBuritoID[playerid] = -1;
        return 1;
	}
Добавим в public OnPlayerConnect(playerid)
PHP:
    GetBuritoID[playerid] = -1;
Вот и сам интерьер
PHP:
	CreateObject(3055 ,2009.522827,1032.249511,1011.125610 ,90.000000 ,0.000000 ,0.000000 );
	CreateObject(5020 , 2010.337646 ,1034.442626 ,1012.135437 ,0.000000 ,0.000000 ,90.000000 );
	CreateObject(5020 , 2007.279418 ,1031.962524 ,1012.135437 ,0.000000 ,0.000000 ,180.000000 );
	CreateObject(5020 , 2010.238647 ,1029.958374 ,1012.135437 ,0.000000 ,0.000000 ,90.000000 );
	CreateObject(5020 , 2013.399169 ,1032.134277 ,1012.135437 ,0.000000 ,0.000000 ,0.000000 );
	CreateObject(9093 , 2010.060058 ,1031.674804 ,1013.735290 ,0.000000, 90.000000 ,90.000000 );
	CreateObject(9093 , 2010.644653 ,1032.626464 ,1013.745300 ,0.000000, 90.000000 ,90.000000 );
	CreateObject(2808 , 2011.243408 ,1030.406616 ,1011.535583 ,0.000000 ,0.000000 ,0.000000 );
	CreateObject(18652 , 2010.493774 ,1032.104125 ,1013.705261 ,0.000000 ,0.000000 ,90.000000 );
	CreateObject(2808 , 2009.149414 ,1030.409912 ,1011.535583 ,0.000000, 0.000000 ,0.000000 );
	CreateObject(2232 , 2012.840576 ,1030.560668 ,1011.735534 ,0.000000 ,0.000000 ,221.000000 );
	CreateObject(2808 , 2009.214355 ,1034.007202 ,1011.535583 ,0.000000 ,0.000000 ,180.000000 );
	CreateObject(2808 , 2011.258789 ,1034.006225 ,1011.535583 ,0.000000 ,0.000000 ,180.000000 );
	CreateObject(2232 , 2012.874755 ,1033.860839 ,1011.735534 ,0.000000 ,0.000000 ,-50.000000 );
	CreateObject(2297 , 2013.142700 ,1032.911621 ,1011.135681 ,0.000000 ,0.000000 ,225.000000 );
	CreateObject(1097 , 2012.857055 ,1030.527587 ,1012.835266 ,0.000000 ,1.000000 ,130.000000 );
	CreateObject(1085 , 2012.791381 ,1033.863159 ,1012.835266 ,0.000000 ,0.000000 ,214.000000 );
	CreateObject(2833 , 2009.826293 ,1031.760620 ,1011.135437 ,0.000000, 0.000000 ,0.000000 );
	CreateObject(14819 , 2007.165893 ,1032.280029 ,1012.135437 ,0.000000 ,0.000000 ,90.000000 );
	CreateObject(14819 , 2007.435913 ,1032.234985 ,1012.135437 ,0.000000 ,0.000000 ,270.000000 );
	CreateObject(2561 , 2008.222045 ,1033.966308 ,1012.135437 ,0.000000 ,0.000000 ,0.000000 );
	CreateObject(2561 , 2012.196899 ,1030.455322 ,1012.135437 ,0.000000 ,0.000000 ,180.000000 );
Вот и все, от +ика не откажусь!​
 
Последнее редактирование:
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу