Hey
WIe muss ich das Scripten dass das Car dort Respawned wo man es geparkt hat?
public OnVehicleDeath(vehicleid, killerid)
{
StuffInfo[sSchrotCars] += 1;
ForAllPlayers(i){
for(new h = 0; h < MaxVeh[i]; h++){
if(Carlist[i][h][Carid] == vehicleid){
SetTimerEx("DelayDestroyCar",3000,0,"i, h",i, h);
return 1;
}}}
for(new h = 0; h < sizeof(GangAutoInfo); h++){
if(vehicleid == GangAutoInfo[h][cID]){
GangAutoInfo[h][cStatus] = 1;
GangAutoInfo[h][cTank] = Gas[GangAutoInfo[h][cID]];
DestroyVehicleSelfmade(GangAutoInfo[h][cID]);
GangAutoInfo[h][cID] = -1;
break;}}
if(UCL[vehicleid] == 1){
if(sirene[vehicleid] != -1) {
DestroyObject(sirene[vehicleid]);
sirene[vehicleid] = -1;
}
if(sirene1[vehicleid] != -1) {
DestroyObject(sirene1[vehicleid]);
sirene1[vehicleid] = -1;
}
if(sirene2[vehicleid] != -1) {
DestroyObject(sirene2[vehicleid]);
sirene2[vehicleid] = -1;
}
if(sirene3[vehicleid] != -1) {
DestroyObject(sirene3[vehicleid]);
sirene3[vehicleid] = -1;
}
UCL[vehicleid] = 0;
}
if(IsACopCar(vehicleid))
{
StuffInfo[sSteuerkasse] -= 50000;
StuffInfo[sAusgaben] += 50000;
}
return 1;
}
if(strcmp("/park", cmd, true) == 0)
{
if(IsPlayerInVehicle(playerid,Carlist[playerid][CarKey[playerid]][Carid]))
{
GetVehiclePos(Carlist[playerid][CarKey[playerid]][Carid],Carlist[playerid][CarKey[playerid]][pos_x],Carlist[playerid][CarKey[playerid]][pos_y],Carlist[playerid][CarKey[playerid]][pos_z]);
GetVehicleZAngle(Carlist[playerid][CarKey[playerid]][Carid],Carlist[playerid][CarKey[playerid]][z_angle]);
SendClientMessage(playerid, COLOR_GREEN, "Fahrzeug geparkt!");
}
else
{
SendClientMessage(playerid, COLOR_ERRORTEXT, " Du sitzt nicht in deinem eigenen Auto oder hast nicht den passenden Schlüssel ausgewählt !");
}
return 1;
}
Danke im vorraus