#include <a_samp>
#define FILTERSCRIFT
#define neondialog 5656
new neon[MAX_PLAYERS][2];
main(){print("NeonFixed By infernus a.k.a BURN");}
forward NoNeon(carid);
public NoNeon(carid)
{
	new model = GetVehicleModel(carid);
 	if(model==592||model==577||model==511||model==512||model==568||
  	   model==593||model==520||model==553||model==476||model==519||
  	   model==460||model==513||model==548||model==425||model==417||
	   model==487||model==488||model==497||model==563||model==447||
	   model==469||model==509||model==481||model==510||model==462||
	   model==448||model==581||model==522||model==461||model==521||
	   model==523||model==463||model==586||model==468||model==471||
	   model==472||model==473||model==493||model==595||model==484||
	   model==430||model==453||model==452||model==446||model==454||
	   model==435||model==450||model==591||model==606||model==607||
	   model==610||model==569||model==590||model==584||model==570||
	   model==608||model==611||model==485||model==538||model==457||
	   model==532||model==486||model==406||model==530||model==537||
	   model==588||model==571||model==572||model==574||model==449||
	   model==525||model==583||model==539||model==441||model==464||
	   model==465||model==501||model==564||model==594||model==531||
	   model==444||model==556||model==557||model==523||model==432)
	{
		return true;
	}
	return false;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	new carid = GetPlayerVehicleID(playerid);
	if(strcmp("/neon", cmdtext, true) == 0)
	{
 		if(GetPlayerState(playerid) != 2)
    	{
        	SendClientMessage(playerid,0xF6CB00AA,"Вы должны находится за рулем.");
			return 1;
    	}
		if(NoNeon(carid))
		{
		    SendClientMessage(playerid, 0xF6CB00AA, "На этот транспорт неон не предусмотрен");
			return true;
		}
		ShowPlayerDialog(playerid,neondialog,DIALOG_STYLE_LIST,"Установка неона",
		"{FF3300}Красный\n\
		{0033CC}Синий\n\
		{33FF00}Зелёный\n\
		{FFFF00}Желтый\n\
		{FEBFEF}Розовый\n\
		Белый\n\
		Удалить Неон",
		"Этот","Отмена");
		return true;
    }
	return 0;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	if(dialogid == neondialog)
	{
		if(response)
		{
			if(listitem == 0)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				neon[playerid][0] = CreateObject(18647,0,0,0,0,0,0,100.0);
				neon[playerid][1] = CreateObject(18647,0,0,0,0,0,0,100.0);
				AttachObjectToVehicle(neon[playerid][0],
				GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				AttachObjectToVehicle(neon[playerid][1],
				GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			}
			else if(listitem == 1)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				neon[playerid][0] = CreateObject(18648,0,0,0,0,0,0,100.0);
				neon[playerid][1] = CreateObject(18648,0,0,0,0,0,0,100.0);
				AttachObjectToVehicle(neon[playerid][0],
				GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				AttachObjectToVehicle(neon[playerid][1],
				GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			}
			else if(listitem == 2)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				neon[playerid][0] = CreateObject(18649,0,0,0,0,0,0,100.0);
				neon[playerid][1] = CreateObject(18649,0,0,0,0,0,0,100.0);
				AttachObjectToVehicle(neon[playerid][0],
				GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				AttachObjectToVehicle(neon[playerid][1],
				GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			}
			else if(listitem==3)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				neon[playerid][0] = CreateObject(18650,0,0,0,0,0,0,100.0);
				neon[playerid][1] = CreateObject(18650,0,0,0,0,0,0,100.0);
				AttachObjectToVehicle(neon[playerid][0],
				GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				AttachObjectToVehicle(neon[playerid][1],
				GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			}
			else if(listitem==4)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				neon[playerid][0] = CreateObject(18651,0,0,0,0,0,0,100.0);
				neon[playerid][1] = CreateObject(18651,0,0,0,0,0,0,100.0);
				AttachObjectToVehicle(neon[playerid][0],
				GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				AttachObjectToVehicle(neon[playerid][1],
				GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			}
			else if(listitem==5)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				neon[playerid][0] = CreateObject(18652,0,0,0,0,0,0,100.0);
				neon[playerid][1] = CreateObject(18652,0,0,0,0,0,0,100.0);
				AttachObjectToVehicle(neon[playerid][0],
				GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
				AttachObjectToVehicle(neon[playerid][1],
				GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
			}
			else if(listitem==6)
			{
				DestroyObject(neon[playerid][0]);
				DestroyObject(neon[playerid][1]);
				SendClientMessage(playerid, 0xF6CB00AA, "Вы удалили неон!");
			}
		}
	}
	return 1;
}
