Hallo, habe einen kleinen Fehler bei meinem "Neon System".
Wenn ich jetzt /neon Eingebe, erscheint ein Dialog, wenn ich dann eine Farbe auswähle, z.B Blau, kommt aber nur an der Rechten Seite eine Neon Röhre. Normal müssen bei nem Auto an beiden welche Kommen.
Hier mein Neon Script mal:
if(dialogid == neonmenu) //Neon Röhren
{
if(response)
{
if(listitem == 0) //Blau
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0,283));
SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0,283));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
}
if(listitem == 1) //Grün
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18649,0,0,0,0,0,0,283));
SetPVarInt(playerid, "neon1", CreateObject(18649,0,0,0,0,0,0,283));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
}
if(listitem == 2) //Rot
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0,283));
SetPVarInt(playerid, "neon1", CreateObject(18647,0,0,0,0,0,0,283));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
}
if(listitem == 3) //Weiß
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18652,0,0,0,0,0,0,283));
SetPVarInt(playerid, "neon1", CreateObject(18652,0,0,0,0,0,0,283));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
}
if(listitem == 4) //Gelb
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18650,0,0,0,0,0,0,283));
SetPVarInt(playerid, "neon1", CreateObject(18650,0,0,0,0,0,0,283));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
}
if(listitem == 5) //Pink
{
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18651,0,0,0,0,0,0,283));
SetPVarInt(playerid, "neon1", CreateObject(18651,0,0,0,0,0,0,283));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), 0.8,0,-0.70,0,0,0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), -0.8,0,-0.70,0,0,0);
}
if(listitem == 6) // Remove
DestroyObject(GetPVarInt(playerid, "neon"));
DestroyObject(GetPVarInt(playerid, "neon1"));
}
}
Das ist unter OnDialogReponse, und das hier unter OnPlayerCommandText
if(strcmp("/neon", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, neonmenu, DIALOG_STYLE_LIST, "Neonlichter Menu", "Blau\nGrün\nRot\nWeiß\nGelb\nPink\nNeon Löschen", "Auswählen", "Abbrechen");
SendClientMessage(playerid,COLOR_WHITE,"Bitte nur einen Neon ranmachen, da es sonst Buggen könnte!");
return 1;
}
Pls help. ._.
//Edit SetPVarInt war da i.wie drin
//Edit2 Vergessen //Edit zu schreiben.