dcmd_neon(playerid, params[])
{
new vehicleid = GetPlayerVehicleID(playerid);
new Option[30];
if(sscanf(params,"s",Option))return SendClientMessage(playerid,Rot,"Befehl: /neon [neonfarbe]") && SendClientMessage(playerid, Weis, "Optionen: Rot,Blau,Gelb,Weis,Pink,Gruen");
if(strcmp(Option, "Rot", true) == 0){ Neonlichter[vehicleid] = 1 && DestroyObject(rot1[vehicleid]) && DestroyObject(rot2[vehicleid]); }
if(strcmp(Option, "Blau", true) == 0){ Neonlichter[vehicleid] = 2 && DestroyObject(blau1[vehicleid]) && DestroyObject(blau2[vehicleid]); }
if(strcmp(Option, "Gelb", true) == 0){ Neonlichter[vehicleid] = 3 && DestroyObject(gelb1[vehicleid]) && DestroyObject(gelb2[vehicleid]); }
if(strcmp(Option, "Weis", true) == 0){ Neonlichter[vehicleid] = 4 && DestroyObject(weis1[vehicleid]) && DestroyObject(weis2[vehicleid]); }
if(strcmp(Option, "Pink", true) == 0){ Neonlichter[vehicleid] = 5 && DestroyObject(pinke1[vehicleid]) && DestroyObject(pinke2[vehicleid]); }
if(strcmp(Option, "Gruen", true) == 0){ Neonlichter[vehicleid] = 6 && DestroyObject(grun1[vehicleid]) && DestroyObject(grun2[vehicleid]); }
if(Neonlichter[vehicleid] > 0)
{
if(Neonlichter[vehicleid] == 1)
{
rot1[vehicleid] = CreateObject(18647,0,0,0,0,0,0);
rot2[vehicleid] = CreateObject(18647,0,0,0,0,0,0);
AttachObjectToVehicle(rot1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(rot2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
Neonlichter[vehicleid] = 1;
}
if(Neonlichter[vehicleid] == 2)
{
blau1[vehicleid] = CreateObject(18648,0,0,0,0,0,0);
blau2[vehicleid] = CreateObject(18648,0,0,0,0,0,0);
AttachObjectToVehicle(blau1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(blau2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
Neonlichter[vehicleid] = 2;
}
if(Neonlichter[vehicleid] == 3)
{
gelb1[vehicleid] = CreateObject(18650,0,0,0,0,0,0);
gelb2[vehicleid] = CreateObject(18650,0,0,0,0,0,0);
AttachObjectToVehicle(gelb1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(gelb2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
Neonlichter[vehicleid] = 3;
}
if(Neonlichter[vehicleid] == 4)
{
weis1[vehicleid] = CreateObject(18652,0,0,0,0,0,0);
weis2[vehicleid] = CreateObject(18652,0,0,0,0,0,0);
AttachObjectToVehicle(weis1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(weis2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
Neonlichter[vehicleid] = 4;
}
if(Neonlichter[vehicleid] == 5)
{
pinke1[vehicleid] = CreateObject(18651,0,0,0,0,0,0);
pinke2[vehicleid] = CreateObject(18651,0,0,0,0,0,0);
AttachObjectToVehicle(pinke1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(pinke2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
Neonlichter[vehicleid] = 5;
}
if(Neonlichter[vehicleid] == 6)
{
grun1[vehicleid] = CreateObject(18649,0,0,0,0,0,0);
grun2[vehicleid] = CreateObject(18649,0,0,0,0,0,0);
AttachObjectToVehicle(grun1[vehicleid], vehicleid, -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(grun2[vehicleid], vehicleid, 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
Neonlichter[vehicleid] = 6;
}
}
return 1;
}
Das ist mein1. NeonSystem
Seit dem ich es oben versucht habe zu verhindern das mehrene röhren auf 1x erstellt werden , wird überhaupt keine mehr erstellt.