So in etwa:
new Float:Deathcarx, Float:Deathcary, Float:Deathcarz,CarIsDeath[MAX_VEHICLES];
public OnVehicleDeath(vehicleid, killerid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
GetVehiclePos(vehicleid,Deathcarx,Deathcary,Deathcarz);
CarIsDeath[vehicleid] = 1;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i,50,Deathcarx,Deathcary,Deathcarz))
{
SendClientMessage(i,WEIS,"Du hast in der Nähe ein Auto explodieren gehört.");
SetPlayerCheckpoint(i,Deathcarx,Deathcary,Deathcarz,2.5);
}
}
return 1;
}
public OnVehicleSpawn(vehicleid)
{
if(CarIsDeath[vehicleid] == 1)
{
SetVehiclePos(vehicleid,Deathcarx,Deathcary,Deathcarz);
SetVehicleParamsEx(vehicleid,false,false,true,false,false,false,false);
CarIsDeath[vehicleid] = 0;
}
return 1;
}
Gruss: Sonic