Car park zone help
#21

Quote:
Originally Posted by nickdodd25
Посмотреть сообщение
oooh i know what it is now, you misunderstood what the code that i am having problems with. But its a command for parking cars in certain areas for players owned vehicles, and i think yours is incase you get stuck it spawns you in a diffrent spot to get unstuck? Right?
o yea i did missunderstand, its a anti carpark script lol opps ma bad
Reply
#22

Bump, Any suggestions on this?

Quote:
Originally Posted by nickdodd25
Посмотреть сообщение
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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)