PDA

View Full Version : Neon Lights


cuemur
11/09/2013, 04:14 PM
stock LoadMyCar(playerid)
{
if(GetPlayerHouse(playerid) == 0) return 1;
if(GetPlayerCar(playerid) == 0) return 1;
new c = GetPVarInt(playerid, "PlayerCars");
new carid = CreateVehicle(CarInfo[c][cModel], CarInfo[c][cX], CarInfo[c][cY], CarInfo[c][cZ], CarInfo[c][cFa], CarInfo[c][cColor][0], CarInfo[c][cColor][1], 90000);
CarDoors(carid, CarInfo[c][cLock]);
Fuel[carid] = CarInfo[c][cFuel];
SetVehicleHealth(carid, CarInfo[c][cHeal]);
Engine[carid] = false;
Lights[carid] = false;
switch(CarInfo[c][cLock])
{
case 0: IsLocked[carid] = false;
case 1: IsLocked[carid] = true;
}
LoadCar[playerid] = 1;
SetPVarInt(playerid,"CREVEH",carid);
if(CarInfo[c][cVehcoms][0]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][0]);
if(CarInfo[c][cVehcoms][1]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][1]);
if(CarInfo[c][cVehcoms][2]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][2]);
if(CarInfo[c][cVehcoms][3]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][3]);
if(CarInfo[c][cVehcoms][4]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][4]);
if(CarInfo[c][cVehcoms][5]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][5]);
if(CarInfo[c][cVehcoms][6]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][6]);
if(CarInfo[c][cVehcoms][7]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][7]);
if(CarInfo[c][cVehcoms][8]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][8]);
if(CarInfo[c][cVehcoms][9]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][9]);
if(CarInfo[c][cVehcoms][10]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][10]);
if(CarInfo[c][cVehcoms][11]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][11]);
if(CarInfo[c][cVehcoms][12]!=0) AddVehicleComponent(carid, CarInfo[c][cVehcoms][12]);
if(CarInfo[c][cVehcoms][13]!=0) AddVehicleComponent(carid,CarInfo[c][cVehcoms][13]);
if(CarInfo[c][cVehcoms][14]!=0) AddVehicleComponent(carid,CarInfo[c][cVehcoms][14]);
if(CarInfo[c][cVehcoms][15]==1)
{
}
if(CarInfo[c][cPaintjob]!=0) ChangeVehiclePaintjob(carid, CarInfo[c][cPaintjob]);
return true;
}

I need if cVehcoms[15] is 1 than it adds neon
I tried these lines, but when my car was respawned it wasn't showing neon...

SetPVarInt(playerid, "blue", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "blue1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "blue"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "blue1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);