Hier bitte.
ocmd:blaulicht(playerid,params[])
{
new item[20],vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid))return 1;
if(sscanf(params,"s[64]",item))return SendClientMessage(playerid, C_GREY, "Benutze: {FFFFFF}/sirene [1] oder [2]");
if(!strcmp(item, "2", false))
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 560) {
if(SireneAn[vehicleid] == false) {
sirene[1][vehicleid] = CreateObject(19797,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[1][vehicleid], GetPlayerVehicleID(playerid), 0.499999,0.509999,0.629999,0.000000,-0.000000,180.000259);
sirene[2][vehicleid] = CreateObject(19797,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[2][vehicleid], GetPlayerVehicleID(playerid), -0.025000,-1.384999,0.449999,0.000000,-0.000000,0.180374);
sirene[3][vehicleid] = CreateObject(19797,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[3][vehicleid], GetPlayerVehicleID(playerid), 0.499999,0.509999,0.629999,0.000000,-0.000000,180.000259);
SireneAn[vehicleid] = true;
return 1;
}
else if(SireneAn[vehicleid] == true) {
DestroyObject(sirene[1][vehicleid]);
DestroyObject(sirene[2][vehicleid]);
DestroyObject(sirene[3][vehicleid]);
SireneAn[vehicleid] = false;
return 1;
}
return 1;
}
else if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 426) {
if(SireneAn[vehicleid] == false) {
sirene[1][vehicleid] = CreateObject(19797,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[1][vehicleid], GetPlayerVehicleID(playerid), 0.470000,0.299999,0.664999,0.000000,0.000000,180.179916);
//AttachObjectToVehicle(sirene[0][vehicleid],vehicleid,0 ,2.6,0,0,0,0);//Vorne Mitte
sirene[3][vehicleid] = CreateObject(19797,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[3][vehicleid], GetPlayerVehicleID(playerid), -0.009999,-1.789999,0.355000,0.000000,0.000000,0.180035);
SireneAn[vehicleid] = true;
return 1;
}
if(SireneAn[vehicleid] == true) {
DestroyObject(sirene[1][vehicleid]);
DestroyObject(sirene[2][vehicleid]);
DestroyObject(sirene[3][vehicleid]);
SireneAn[vehicleid] = false;
return 1;
}
return 1;
}
return 1;
}
if(!strcmp(item, "1", false))
{
if(GetVehicleModel(560)) {
if(SireneAn[vehicleid] == false) {
sirene[0][vehicleid] = CreateObject(18646,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid], GetPlayerVehicleID(playerid), 0.629999,0.700000,0.375000,0.000000,0.000000,0.000000);
SireneAn[vehicleid] = true;
return 1;
}
else if(SireneAn[vehicleid] == true) {
DestroyObject(sirene[0][vehicleid]);
SireneAn[vehicleid] = false;
return 1;
}
return 1;
}
else if(GetVehicleModel(426)) {
if(SireneAn[vehicleid] == false) {
sirene[0][vehicleid] = CreateObject(19797,0.0,0.0,0.0,0.0,0.0,0.0,250.0);
AttachObjectToVehicle(sirene[0][vehicleid], GetPlayerVehicleID(playerid), -0.025000,-1.384999,0.449999,0.000000,-0.000000,0.180374);
SireneAn[vehicleid] = true;
return 1;
}
if(SireneAn[vehicleid] == true) {
DestroyObject(sirene[0][vehicleid]);
SireneAn[vehicleid] = false;
return 1;
}
}
return 1;
}
return 1;
}