Hi,
habe mir nen UC-Sirenen Script gebastelt, wo eine Sirene aufm Dach inkl. Leuchten erstellt werden sollte.
Die Sirene erscheint, nur das Leuchten nicht.
Kennt sich wer damit aus?
https://i.imgur.com/DhaHNhj.jpg -> IG Screen
Das ist das Object: http://dev.prineside.com/en/gt…_model_id/search/?q=19298
Code
ocmd:uclight(playerid, params[])
{
if (!IsPlayerInAnyVehicle(playerid)) {
return SendClientMessage(playerid, COLOR_GREY, "Fehler: Du bist in keinem Fahrzeug.");
}
if (Player[playerid][rank] < 10) {
return SendClientMessage(playerid, COLOR_GREY, "Fehler: Die Undercover-Sirene ist erst ab Rang 10 verfügbar.");
}
new tmpcar = GetPlayerVehicleID(playerid);
if (GetVehicleModel(tmpcar) == 560) {
if (sirene[GetPlayerVehicleID(playerid)] == 0) {
light1[GetPlayerVehicleID(playerid)] = CreateObject(18646, 0, 0, 0, 0, 0, 0, 100);
light2[GetPlayerVehicleID(playerid)] = CreateObject(19298, 0, 0, 0, 0, 0, 0, 100);
light3[GetPlayerVehicleID(playerid)] = CreateObject(19296, 0, 0, 0, 0, 0, 0, 100);
AttachObjectToVehicle(light1[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.50, 0.0, 0.88, 0, 0, 0);
AttachObjectToVehicle(light2[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.50, 0.0, 0.88, 0, 0, 0); // Blau
AttachObjectToVehicle(light3[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), -0.50, 0.0, 0.88, 0, 0, 0); // Rot
sirene[GetPlayerVehicleID(playerid)] = 1;
GameTextForPlayer(playerid,"~w~Sirene~n~~g~Angeschaltet", 3000, 1);
return 1;
} else {
DestroyObject(light1[GetPlayerVehicleID(playerid)]);
DestroyObject(light2[GetPlayerVehicleID(playerid)]);
DestroyObject(light3[GetPlayerVehicleID(playerid)]);
sirene[GetPlayerVehicleID(playerid)] = 0;
GameTextForPlayer(playerid,"~w~Sirene~n~~r~Ausgeschaltet", 3000, 1);
}
} else {
SendClientMessage(playerid, COLOR_GREY, "Fehler: Dieses Fahrzeug kann keine UC-Sirene tragen.");
}
return 1;
}
Alles anzeigen