Fehler behoben.
Aber wie kann ich nun machen dass genau die Sirene angeht?
Mein Code:
ocmd:sirene(playerid,params[]){ if(UCL[GetPlayerVehicleID(playerid)] == 0) { new tmpcar = GetPlayerVehicleID(playerid); if(GetVehicleModel(tmpcar) == 560) { sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100); sirene1[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100); sirene2[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100); sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100); sirene4[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,0,0,0,0,100); AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.0,0.0,0.85,0,0,0);//Dach sirene AttachObjectToVehicle(sirene2[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0.7,2.6,0,0,0,0);//Vorne Licht Beifahrerseite AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.7,2.6,0,0,0,0);//Vorne Licht Fahrerseite AttachObjectToVehicle(sirene4[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0.9,0.4,0,0,0);//Mittig im Fenster UCL[GetPlayerVehicleID(playerid)] = 1; SendClientMessage(playerid,0xFF0000,"Blaulicht eingeschalten!"); return 1; } } else if(UCL[GetPlayerVehicleID(playerid)] == 1) { DestroyObject(sirene[GetPlayerVehicleID(playerid)]); DestroyObject(sirene1[GetPlayerVehicleID(playerid)]); DestroyObject(sirene2[GetPlayerVehicleID(playerid)]); DestroyObject(sirene3[GetPlayerVehicleID(playerid)]); DestroyObject(sirene4[GetPlayerVehicleID(playerid)]); UCL[GetPlayerVehicleID(playerid)] = 0; SendClientMessage(playerid,0xFF0000,"Blaulicht ausgeschalten!"); return 1; } return 1;}