habe ein problem dieses Blaulicht passt auf ein sultan aber nicht auf ein cheetah
#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 by CapCon");
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, "/blicht",true) == 0)
{
if(UCL[GetPlayerVehicleID(playerid)] == 0)
{
sirene1[GetPlayerVehicleID(playerid)] = CreateObject(18646,0,0,0,0,0,0,100);
AttachObjectToVehicle(sirene1[GetPlayerVehicleID(playerid)],GetPlayerVehicleID(playerid),-0.5,0.0,0.85,0,0,0);//Dach sirene
UCL[GetPlayerVehicleID(playerid)] = 1;
return 1;
}
else if(UCL[GetPlayerVehicleID(playerid)] == 1)
{
DestroyObject(sirene[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene1[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene2[GetPlayerVehicleID(playerid)]);
DestroyObject(sirene3[GetPlayerVehicleID(playerid)]);
UCL[GetPlayerVehicleID(playerid)] = 0;
return 1;
}
}
return 0;
}