Guten Tag,
Ich habe mir einen Befehl erstellt, /sirene.
if(IstSpielerMember(playerid,1))
{
new ssirene[MAX_PLAYERS],sieerene[MAX_VEHICLES];
if(IsPlayerInAnyVehicle(playerid))
{
if(vehicleid == sultan[0] || sultan[1])
{
if(ssirene[vehicleid] == 0)
{
sieerene[vehicleid] = CreateObject(18646,50.0,20.0,40.0,0,0,0);
AttachObjectToVehicle(sieerene[vehicleid],vehicleid,0.0,0.75,0.275,0.0,0.1,0.0);
ssirene[playerid] = 1;
return 1;
}
if(ssirene[vehicleid] == 1)
{
DestroyObject(ssirene[GetPlayerVehicleID(playerid)]);
ssirene[playerid] = 0;
return 1;
}
}
}
}
Das Object wird aber nicht "destroyed"!
MfG