Guten morgen..
ich wollte mir ein blaulicht auf meim car scripten aber es geht nicht schade es kommen aber auch keine errors vill könntet ihr ja mal reinschauen hir der script:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT
#include <a_samp>
new sirene[MAX_VEHICLES];
new sirene1[MAX_VEHICLES];
new sirene2[MAX_VEHICLES];
new sirene3[MAX_VEHICLES];
new UCL[MAX_VEHICLES];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blaulicht");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
DestroyObject(sirene[vehicleid]);
DestroyObject(sirene1[vehicleid]);
DestroyObject(sirene2[vehicleid]);
DestroyObject(sirene3[vehicleid]);
UCL[vehicleid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/blaulicht",true) == 0)
{
if(UCL[GetPlayerVehicleID(playerid)] == 1)
{
sirene[GetPlayerVehicleID(playerid)] = CreateObject(19288,0,0,0,0,0,0,100);
sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,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);
AttachObjectToVehicle(sirene[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),0 ,2.6,0,0,0,0);//Vorne Mitte
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,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
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(UCL[GetPlayerVehicleID(playerid)] == 573)
{
DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
UCL[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
return 0;
}
Und ich habe KEINE errors!