/*
--------------------------------------------------------------------------------
---------------------[FS]Vehicle Menu by =a.k.a=Sprunk--------------------------
--------------------------------------------------------------------------------
*/
#include <a_samp>
#include <a_players>
#include <a_objects>
#if defined FILTERSCRIPT
}

#else
#define COLOR_BLUE10 0x0000BBAA
#define VEHICLE_PARAMS_OFF 0 
#define VEHICLE_PARAMS_ON 1

#endif

#pragma tabsize 0

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp(cmdtext, "/авто", true) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        ShowPlayerDialog(playerid, 12348, DIALOG_STYLE_LIST, "Выберите функцию", "Включить фары \nВыключить фары \nВключить сигнализацию \nВыключить сигнализацию \nОткрыть капот \nЗакрыть капот \nОткрыть багажник \nЗакрыть багажник", "Выбор", "Отмена");
		}
		}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new engine,lights,alarm,doors,bonnet,boot,objective;
    if(dialogid == 12348)
	{
		if(response)
		{
if(listitem == 0)
		    {
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid) ,engine,VEHICLE_PARAMS_ON,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы включи фары");
            }
      }
else if(listitem == 1)
		    {
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid) ,engine,VEHICLE_PARAMS_OFF,alarm,doors,bonnet,boot,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы выключи фары");
            }
else if(listitem == 2)
			{
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,VEHICLE_PARAMS_ON,doors,bonnet,boot,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы включили сигнализацию");
			}
else if(listitem == 3)
				{
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,VEHICLE_PARAMS_OFF,doors,bonnet,boot,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы выключили сигнализацию");
	        }
         }
else if(listitem == 4)
			{
			GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,VEHICLE_PARAMS_ON,boot,objective);
			SendClientMessage(playerid, COLOR_BLUE10, "Вы открыли капот");
			}
else if(listitem == 5)
			{
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,VEHICLE_PARAMS_OFF,boot,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы закрыли капот");
            }
else if(listitem == 6)
			{
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_ON,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы открыли багажник");
            }
else if(listitem == 7)
			{
            GetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,boot,objective);
            SetVehicleParamsEx(GetPlayerVehicleID(playerid),engine,lights,alarm,doors,bonnet,VEHICLE_PARAMS_OFF,objective);
            SendClientMessage(playerid, COLOR_BLUE10, "Вы закрыли багажник");
            }
		return 1;
	 }
