Hier habe ich das Script als FilterScript gemacht und richtig 'Eingetabt'(Weiß net, wie man das nennt, 'Eingeordnet?')
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/blaulicht",true) == 0)
{
if(UCL[GetPlayerVehicleID(playerid)] == 0)
{
new tmpcar = GetPlayerVehicleID(playerid);
if(GetVehicleModel(tmpcar) == 560)//sultan
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,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, 0, 0.80, 0, 0, 0);//Vorne Mitte
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,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 480)//comet
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-1,0.6,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 470)//patriot
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,0.2,1.03,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 541)//bullet
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-0.3,0.635,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 415)//cheeta
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-0.6,0.6,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 402)//burrito
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-0.6,0.75,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 495)//sandking
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-0.6,1,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 603)//phoenix
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-0.6,0.65,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 487)//maverik
{
SendClientMessage(playerid,Rot,"Bei diesem Fahrzeug ist das nutzen eines Blaulichtes leider nicht möglich.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 417)//leviathan
{
SendClientMessage(playerid,Rot,"Bei diesem Fahrzeug ist das nutzen eines Blaulichtes leider nicht möglich.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 563)//medicheli
{
SendClientMessage(playerid,Rot,"Bei diesem Fahrzeug ist das nutzen eines Blaulichtes leider nicht möglich.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 573)//dune
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
sirene1[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);//lichtanlage
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.3,1.5,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,-3,1.5,0,0,0);//Vorne Mitte
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 451)//turismo
{
sirene1[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,-2.3,0.2,0,0,0);
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 522)//nrg-500
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19292,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,0.85,0.3,0,0,0);
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 506)//super-gt
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,-0.1,0.55,0,0,0);
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 411)//infernus
{
sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
sirene3[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.44,0.3,0.7,0,0,0);
AttachObjectToVehicle(sirene3[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,-2.35,0.35,0,0,0);
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 502)//Hotring-Racer
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0,0.75,0,0,0);
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
return 1;
}
else if(GetVehicleModel(tmpcar) == 535)//name unbekannt
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19419,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0,0,0.75,0,0,0);
UCL[GetPlayerVehicleID(playerid)] = 1;
SendClientMessage(playerid,Grün,"Sie haben das Blaulicht erfolgreich eingeschaltet.");
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,Rot,"Sie haben das Blaulicht erfolgreich abgeschaltet.");
return 1;
}
}
return 1;
}