Well no errors this time, and it works....kinda lol the only time the car get parked if the carpark zone and house park zone overlap then it parks the car, but when its in the house zone it says unknown command and when by the carpark it says that you have to be in a certain radius of the house. So some how we have to change up these lines....
pawn Код:
if (IsPlayerInRangeOfPoint(playerid, ParkRange, AHouseData[HouseID][HouseX], AHouseData[HouseID][HouseY], AHouseData[HouseID][HouseZ])) {
new bool:playerIsInParkRange;
for(new i=0;i<=6;i++) {
if (IsPlayerInRangeOfPoint(playerid, ParkRange, CarParkX[i], CarParkY[i], CarParkZ[i])) {
playerIsInParkRange = true;
break;
}
}
if(playerIsInParkRange) {
GetVehiclePos(vid, x, y, z);
GetVehicleZAngle(vid, rot);
AVehicleData[vid][SpawnX] = x;
AVehicleData[vid][SpawnY] = y;
AVehicleData[vid][SpawnZ] = z;
AVehicleData[vid][SpawnRot] = rot;
for (new i; i < MAX_HOUSESPERPLAYER; i++) {
HouseID = APlayerData[playerid][Houses][i];
for (new CarSlot; CarSlot < 10; CarSlot++) {
if (AHouseData[HouseID][VehicleIDs][CarSlot] == vid) {
House_ReplaceVehicle(HouseID, CarSlot);
PutPlayerInVehicle(playerid, AHouseData[HouseID][VehicleIDs][CarSlot], 0);
GetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(AHouseData[HouseID][VehicleIDs][CarSlot], 1, lights, alarm, doors, bonnet, boot, objective);
break;
}
}
}
I tryed to fix it but i just made it worse and it threw off tons on errors, almost tempted to just make two cmds one /housepark and /carpark