Impound
#1

I Just wanna know how to change the impound lot ? like when you do /impound the car spawns at the place where i want ,can anyone help me with it ?
+ Rep
Reply
#2

Do you have /apark? just make it like /apark but set it like IsACop or what is your variable,and add is player range to that point (impound).
Reply
#3

what i mean is that i want to change the impound lot location ,the place where the car spawn when a mechanic do /impound
Reply
#4

Do you mean how to park?
Reply
#5

no man ,i mean this command
pawn Код:
CMD:impound(playerid, params[]) {
    switch(PlayerInfo[playerid][pMember]) {
        case 1, 2, 7, 14, 15, 17: {
            if(!IsAtImpoundingPoint(playerid))
            {
                SendClientMessageEx(playerid, COLOR_GREY, "You are not near the impound point, you can't impound!");
                return 1;
            }
            if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)) || arr_Towing[playerid] != INVALID_VEHICLE_ID || arr_Wrecking[playerid] != INVALID_VEHICLE_ID)
            {
            new towed;
                if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid))) towed = GetVehicleTrailer(GetPlayerVehicleID(playerid));
                if(arr_Towing[playerid] != INVALID_VEHICLE_ID) towed = arr_Towing[playerid];
                if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID) towed = arr_Wrecking[playerid];

                new
                    iVehType,
                    iVehIndex,
                    iTargetOwner,
                    iVehTowed = towed;

                if(!GetVehicleModel(iVehTowed)) {
                    return SendClientMessageEx(playerid, COLOR_GREY, "The vehicle in tow has been desynced and therefore cannot be impounded.");
                }
                foreach(Player, i) {
                    iVehIndex = GetPlayerVehicle(i, iVehTowed);
                    if(iVehIndex != -1) {
                        iVehType = 1;
                        iTargetOwner = i;
                        break;
                    }
                }
                if(!iVehType) {
                    for(new i; i < MAX_FAMILY; ++i) {
                        iVehIndex = GetGangVehicle(i, iVehTowed);
                        if(iVehIndex != -1) {
                            iVehType = 2;
                            iTargetOwner = i;
                            break;
                        }
                    }
                }
                switch(iVehType) {
                    case 0, 2: {
                        if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                        {
                            SendClientMessageEx(playerid, COLOR_GRAD1, "The impound administration could not find any registration on the vehicle and has returned it.");
                            DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                           
                        }
                        if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID || arr_Towing[playerid] != INVALID_VEHICLE_ID )
                        {
                            SendClientMessageEx(playerid, COLOR_GRAD1,"You have detached the vehicle that you were towing from the flatbed.");
                            playerveh[playerid] = INVALID_VEHICLE_ID;
                            KillTimer(TimerATACH[playerid]);
                            DestroyObject(GetPVarInt(playerid, "WreckingGate"));
                            DeletePVar(playerid, "WreckingGate");
                        }
                        SetVehiclePos(iVehTowed, 0, 0, 0); // Attempted desync fix
                        SetVehicleToRespawn(iVehTowed);
                    }
                    case 1: {

                        PlayerVehicleInfo[iTargetOwner][iVehIndex][pvImpounded] = 1;
                        PlayerVehicleInfo[iTargetOwner][iVehIndex][pvId] = INVALID_PLAYER_VEHICLE_ID;
                        if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                        {
                            DetachTrailerFromVehicle(GetPlayerVehicleID(playerid));
                           
                        }
                        if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID || arr_Towing[playerid] != INVALID_VEHICLE_ID)
                        {
                            playerveh[playerid] = INVALID_VEHICLE_ID;
                            KillTimer(TimerATACH[playerid]);
                            DestroyObject(GetPVarInt(playerid, "WreckingGate"));
                            DeletePVar(playerid, "WreckingGate");
                        }
                        SetVehiclePos(iVehTowed, 0, 0, 0); // Attempted desync fix
                        DestroyVehicle(iVehTowed);

                        --PlayerCars;

                        new
                            szMessage[96];

                        format(szMessage, sizeof(szMessage),"* You have impounded %s's %s.",GetPlayerNameEx(iTargetOwner), VehicleName[PlayerVehicleInfo[iTargetOwner][iVehIndex][pvModelId] - 400]);
                        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);

                        format(szMessage, sizeof(szMessage), "Your %s has been impounded. You may release it at the DMV in City Hall.", VehicleName[PlayerVehicleInfo[iTargetOwner][iVehIndex][pvModelId] - 400]);
                        SendClientMessageEx(iTargetOwner, COLOR_LIGHTBLUE, szMessage);

                        format(szMessage, sizeof(szMessage), "DISPATCH: %s has impounded %s's %s ($%i unpaid tickets).", GetPlayerNameEx(playerid), GetPlayerNameEx(iTargetOwner), VehicleName[PlayerVehicleInfo[iTargetOwner][iVehIndex][pvModelId] - 400], PlayerVehicleInfo[iTargetOwner][iVehIndex][pvTicket]);
                        SendRadioMessage(PlayerInfo[playerid][pMember], RADIO, szMessage);
                       
                        format(szMessage, sizeof(szMessage), "Impound: %s has impounded %s's %s.",GetPlayerNameEx(playerid),GetPlayerNameEx(iTargetOwner),VehicleName[PlayerVehicleInfo[iTargetOwner][iVehIndex][pvModelId] - 400]);
                        ABroadCast(COLOR_YELLOW, szMessage, 2);
                        Log("logs/impound.log", szMessage);
                    }
                    /*case 2: {

                        new
                            szMessage[29 + MAX_PLAYER_NAME];

                        format(szMessage, sizeof(szMessage),"* You have impounded %s's %s.",FamilyInfo[iTargetOwner][FamilyName], GetVehicleName(iVehTowed));
                        SendClientMessageEx(playerid, COLOR_LIGHTBLUE, szMessage);

                        format(szMessage, sizeof(szMessage), "Your %s has been impounded. You may release it at the DMV in City Hall.", GetVehicleName(iVehTowed));
                        SendNewFamilyMessage(iTargetOwner, COLOR_LIGHTBLUE, szMessage);

                        FamilyVehicleInfo[iTargetOwner][iVehIndex][fvImpounded] = 1;
                        FamilyVehicleInfo[iTargetOwner][iVehIndex][fvId] = INVALID_VEHICLE_ID;
                        DestroyVehicle(iVehTowed);
                    }*/

                }
                arr_Towing[playerid] = INVALID_VEHICLE_ID;
                arr_Wrecking[playerid] = INVALID_VEHICLE_ID;
            }
        }
        default: SendClientMessageEx(playerid, COLOR_GRAD2, "You are not authorized to use this command.");
    }
    return 1;
}
when a RR or A Cop do it ,the car which got impounded spawns somewhere which is the impound lot ,what i want is to change that impound lot
Reply
#6

Well then go ingame,go to place where is your new "impound" write /save Impound cordinates
then go to your documents/GTA San Andreas User Files/SAMP/savedpositions
When you open savedpositions.txt you will see something like this

pawn Код:
AddPlayerClass(6,1475.1866,-1749.3876,3285.2859,181.6267,0,0,0,0,0,0); // Impound cordinates
take X,Y,Z cordinates from that code wich is

example:
AddPlayerClass(6,1475.1866,-1749.3876,3285.2859,181.6267,0,0,0,0,0,0);

Then open your pawno use "ctrl+f" write "/impound"

In the command you will see something like if(PlayerToPoint(15,playerid,1475.1866,-1749.3876,3285.2859))
Replace it with new cordinates.


EDIT: Just saw you posted command till i wrote this, find "Public IsAtImpoundingPoint" and change cordinates.
Reply
#7

Quote:
Originally Posted by ***Niko***
Посмотреть сообщение
Well then go ingame,go to place where is your new "impound" write /save Impound cordinates
then go to your documents/GTA San Andreas User Files/SAMP/savedpositions
When you open savedpositions.txt you will see something like this

pawn Код:
AddPlayerClass(6,1475.1866,-1749.3876,3285.2859,181.6267,0,0,0,0,0,0); // Impound cordinates
take X,Y,Z cordinates from that code wich is

example:
AddPlayerClass(6,1475.1866,-1749.3876,3285.2859,181.6267,0,0,0,0,0,0);

Then open your pawno use "ctrl+f" write "/impound"

In the command you will see something like if(PlayerToPoint(15,playerid,1475.1866,-1749.3876,3285.2859))
Replace it with new cordinates.


EDIT: Just saw you posted command till i writed this, find "Public IsAtImpoundingPoint" and change cordinates.
Hope he understood
Reply
#8

Look ,this is the ImpoundingPoint ,which i can /impound at

And this is the Place where the cars spawns when it get impounded (( which i want to change ))

i hope you guys understand what i mean
Reply
#9

i explaned you all how to change cordinate find "Public IsAtImpoundingPoint" and you will see cordinates there
about Label use "ctrl+f" write Impound Yard,you will see something like this

pawn Код:
Create3DTextLabel("Impound Yard \n Type /impound to impound a vehicle",0xFFFF00AA, -65.3189,-1119.7914,1.0781, 20,0,1);
change cordinates wich is

Example
Create3DTextLabel("Impound Yard \n Type /impound to impound a vehicle",0xFFFF00AA, -65.3189,-1119.7914,1.0781, 20,0,1);
Reply
#10

Quote:
Originally Posted by ***Niko***
Посмотреть сообщение
i explaned you all how to change cordinate find "Public IsAtImpoundingPoint" and you will see cordinates there
about Label use "ctrl+f" write Impound Yard,you will see something like this

pawn Код:
Create3DTextLabel("Impound Yard \n Type /impound to impound a vehicle",0xFFFF00AA, -65.3189,-1119.7914,1.0781, 20,0,1);
change cordinates wich is

Example
Create3DTextLabel("Impound Yard \n Type /impound to impound a vehicle",0xFFFF00AA, -65.3189,-1119.7914,1.0781, 20,0,1);
That will just change the place where i can do /impound not the impound lit where the cars spawn
Any other ideas ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)