Hallo liebe Community ich brauche Hilfe bei der Function OnVehilceDeath
Also Das Car Brennt aber es spawnt gleich also es explodiert nicht ? Bitte help!
Function OnVehicleDeath(vehicleid)
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
for(new x = 0; x < MaxVeh; x++)
{
if(IsPlayerConnected(playerid) && Dtc_PlayerHaveCar[playerid][x])
{
if (vehicleid == PlayerCar[playerid][x][CarId])
{
DestroyObject(suplight1[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight2[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight3[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight4[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight5[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight6[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight7[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight8[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight9[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight10[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight11[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight12[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight13[GetPlayerVehicleID(playerid)]);
DestroyObject(suplight14[GetPlayerVehicleID(playerid)]);
DestroyObject(light1[GetPlayerVehicleID(playerid)]);
DestroyObject(light2[GetPlayerVehicleID(playerid)]);
DestroyObject(light3[GetPlayerVehicleID(playerid)]);
DestroyObject(light4[GetPlayerVehicleID(playerid)]);
DestroyObject(light5[GetPlayerVehicleID(playerid)]);
DestroyVehicle(PlayerCar[playerid][x][CarId]);
PlayerCarSpawn(playerid,x);
}
}
}
}
return 1;
}