ocmd:sirene(playerid,params[])
{
if(IsACop(playerid)) //Habe ich eingefügt 26 erros warum?
{
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(18646,0,0,0,0,0,0);
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.5,-0.2,0.8,2.0,2.0,3.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;
}
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link