Ich Kan mir jemand Helfen Wieso Ich /parken mache Immer noch mein Car Am Händler steht
mach ich was falsch ?
if (strcmp("/parken", cmdtext, true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
for(new i = 0; i<MAX_VEHICLES; i++)
{
if(PlayerCar[vid] == GetPlayerVehicleID(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if(PlayerCar[FrakCar] PlayerCar[JobCar]) return SendClientMessage(playerid, Grey, "Du kannst Fraktionscars nicht umparken!");
if(!strcmp(PlayerCar[Key], pn(playerid), false))
{
GetVehiclePos(GetPlayerVehicleID(playerid), PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz]);
GetVehicleZAngle(GetPlayerVehicleID(playerid), PlayerCar[i][pa]);
new Float:hh;
GetVehicleHealth(GetPlayerVehicleID(playerid), hh);
DestroyVehicle(PlayerCar[i][vid]);
PlayerCar[i][vid] = CreateVehicle(PlayerCar[i][model], PlayerCar[i][px], PlayerCar[i][py], PlayerCar[i][pz], PlayerCar[i][pa], PlayerCar[i][c1], PlayerCar[i][c2], -1);
SetVehicleHealth(PlayerCar[i][vid], hh);
if(!PlayerCar[i][JobCar] && !PlayerCar[i][FrakCar]) SetVehicleNumberPlate(PlayerCar[i][vid], PlayerCar[i][Key]);
else if(PlayerCar[i][JobCar] PlayerCar[i][FrakCar]) SetVehicleNumberPlate(PlayerCar[i][vid], PlayerCar[i][ABC]);
if(!PlayerCar[i][JobCar] && !PlayerCar[i][FrakCar]) AddComponents(i);
VehInfo[PlayerCar[i][vid]][Motor] = 0;
SendClientMessage(playerid, COLOR_GREEN, "{2BAD00}** Fahrzeug wurde erfolgreich umgeparkt!");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Das Fahrzeug gehört dir nicht!");
}
return 1;
}
}
}
return 1;
}[/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i][/i]