Guten Abend! Ich komme mal gleich zur Sache.
Oben:
#define neondialog //Neon ListBox
Dann unter OnDialogResponse:
if(dialogid == neondialog)
{
if(listitem == 0)
{
//Blau
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon", CreateObject(18648,0,0,0,0,0,0));
SetPVarInt(playerid, "neon1", CreateObject(18648,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon eingeschaltet");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
if(listitem == 1)
{
//Rot
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon2", CreateObject(18647,0,0,0,0,0,0));
SetPVarInt(playerid, "neon3", CreateObject(18647,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon eingeschaltet");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
if(listitem == 2)
{
//Gruen
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon4", CreateObject(18649,0,0,0,0,0,0));
SetPVarInt(playerid, "neon5", CreateObject(18649,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon eingeschaltet");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
if(listitem == 3)
{
//Weis
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon6", CreateObject(18652,0,0,0,0,0,0));
SetPVarInt(playerid, "neon7", CreateObject(18652,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon eingeschaltet");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
if(listitem == 4)
{
//pink
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon8", CreateObject(18651,0,0,0,0,0,0));
SetPVarInt(playerid, "neon9", CreateObject(18651,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon eingeschaltet");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
if(listitem == 5)
{
//Gelb
SetPVarInt(playerid, "Status", 1);
SetPVarInt(playerid, "neon10", CreateObject(18650,0,0,0,0,0,0));
SetPVarInt(playerid, "neon11", CreateObject(18650,0,0,0,0,0,0));
AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
SendClientMessage(playerid, 0xFFFFFFAA, "Neon eingeschaltet");
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 10.0);
}
if(listitem == 6)
{
//remove neon
DestroyObject(GetPVarInt(playerid, "neon"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon1"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon2"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon3"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon4"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon5"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon6"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon7"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon8"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon9"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon10"));
DeletePVar(playerid, "Status");
DestroyObject(GetPVarInt(playerid, "neon11"));
DeletePVar(playerid, "Status");
}
}
Und unter OnPlayerCommandText:
if (strcmp(cmdtext, "/neon", true) == 0)
{
if (!IsPlayerInAnyVehicle(playerid))
{
ShowPlayerDialog(playerid, neondialog, DIALOG_STYLE_LIST, "Neonfarben", "Blau\nRot\nGruen\nWeis\nPink\nGelb\nNeonfarbe löschen!", "OK", "Abbrechen");
}
return 1;
}
Ich bekomme folgende Errors!
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12341) : error 029: invalid expression, assumed zero
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : error 029: invalid expression, assumed zero
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : warning 215: expression has no effect
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : warning 215: expression has no effect
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : warning 215: expression has no effect
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : warning 215: expression has no effect
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : warning 215: expression has no effect
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : error 001: expected token: ";", but found ")"
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : error 029: invalid expression, assumed zero
G:\Dokumente und Einstellungen\BigPump\Desktop\Minijob respawn\Minijob respawn\123\gamemodes\Bing.pwn(12539) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
Ich hoffe, jemand weiß woran das liegt oder kann mir vielleicht einen Tipp geben. Bin total am Verzweifeln.
Mfg Big_Pump2