/parkcar problem
#1

When i buy the car and then park the vehicle it all works fine, when i log back in i get in the car it says you are the owner which is fine, but then if you try and park it again it disappears and you don't own any cars?


pawn Код:
if(strcmp(cmd, "/parkvehicle", true) == 0 || strcmp(cmd, "/pv", true) == 0) // Parking the car.
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(IsPlayerConnected(playerid))
        {
            if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2)
            {
                GetPlayerVehicleMods(playerid);
                if(PlayerVehicleID1[playerid] == vehicleid)
                {
                    GetVehiclePos(vehicleid, PlayerInfo[playerid][PlayerVehiclePosX1], PlayerInfo[playerid][PlayerVehiclePosY1], PlayerInfo[playerid][PlayerVehiclePosZ1]);
                    GetVehicleZAngle(vehicleid, PlayerInfo[playerid][PlayerVehicleFacing1]);
                    DestroyVehicle(PlayerVehicleID1[playerid]);
                    PlayerInfo[playerid][PlayerVehicle1VirWorld] = GetPlayerVirtualWorld(playerid);
                    PlayerInfo[playerid][PlayerVehicle1Interior] = GetPlayerInterior(playerid);
                    CreatePlayerVehicle(playerid,1);
                    PutPlayerInVehicle(playerid,PlayerVehicleID1[playerid],0);
                }
                else if(PlayerVehicleID2[playerid] == vehicleid)
                {
                    GetVehiclePos(vehicleid, PlayerInfo[playerid][PlayerVehiclePosX2], PlayerInfo[playerid][PlayerVehiclePosY2], PlayerInfo[playerid][PlayerVehiclePosZ2]);
                    GetVehicleZAngle(vehicleid, PlayerInfo[playerid][PlayerVehicleFacing2]);
                    DestroyVehicle(PlayerVehicleID2[playerid]);
                    PlayerInfo[playerid][PlayerVehicle2VirWorld] = GetPlayerVirtualWorld(playerid);
                    PlayerInfo[playerid][PlayerVehicle2Interior] = GetPlayerInterior(playerid);
                    CreatePlayerVehicle(playerid,2);
                    PutPlayerInVehicle(playerid,PlayerVehicleID2[playerid],0);
                }
                else if(PlayerVehicleID3[playerid] == vehicleid)
                {
                    GetVehiclePos(vehicleid, PlayerInfo[playerid][PlayerVehiclePosX3], PlayerInfo[playerid][PlayerVehiclePosY3], PlayerInfo[playerid][PlayerVehiclePosZ3]);
                    GetVehicleZAngle(vehicleid, PlayerInfo[playerid][PlayerVehicleFacing3]);
                    DestroyVehicle(PlayerVehicleID3[playerid]);
                    PlayerInfo[playerid][PlayerVehicle3VirWorld] = GetPlayerVirtualWorld(playerid);
                    PlayerInfo[playerid][PlayerVehicle3Interior] = GetPlayerInterior(playerid);
                    CreatePlayerVehicle(playerid,3);
                    PutPlayerInVehicle(playerid,PlayerVehicleID3[playerid],0);
                }
                else if(PlayerVehicleID4[playerid] == vehicleid)
                {
                    GetVehiclePos(vehicleid, PlayerInfo[playerid][PlayerVehiclePosX4], PlayerInfo[playerid][PlayerVehiclePosY4], PlayerInfo[playerid][PlayerVehiclePosZ4]);
                    GetVehicleZAngle(vehicleid, PlayerInfo[playerid][PlayerVehicleFacing4]);
                    DestroyVehicle(PlayerVehicleID4[playerid]);
                    PlayerInfo[playerid][PlayerVehicle4VirWorld] = GetPlayerVirtualWorld(playerid);
                    PlayerInfo[playerid][PlayerVehicle4Interior] = GetPlayerInterior(playerid);
                    CreatePlayerVehicle(playerid,4);
                    PutPlayerInVehicle(playerid,PlayerVehicleID4[playerid],0);
                }
                else if(PlayerVehicleID5[playerid] == vehicleid)
                {
                    GetVehiclePos(vehicleid, PlayerInfo[playerid][PlayerVehiclePosX5], PlayerInfo[playerid][PlayerVehiclePosY5], PlayerInfo[playerid][PlayerVehiclePosZ5]);
                    GetVehicleZAngle(vehicleid, PlayerInfo[playerid][PlayerVehicleFacing5]);
                    DestroyVehicle(PlayerVehicleID5[playerid]);
                    PlayerInfo[playerid][PlayerVehicle5VirWorld] = GetPlayerVirtualWorld(playerid);
                    PlayerInfo[playerid][PlayerVehicle5Interior] = GetPlayerInterior(playerid);
                    CreatePlayerVehicle(playerid,5);
                    PutPlayerInVehicle(playerid,PlayerVehicleID5[playerid],0);
                }
                else
                {
                    SendClientMessage(playerid,COLOR_GREY," You are not in a vehicle that you own.");
                }
            }
            else
            {
                SendClientMessage(playerid,COLOR_GREY," You are not driving a vehicle.");
            }
        }
        return 1;
    }
Reply
#2

try

Код:
else
{
     SendClientMessage(playerid,COLOR_GREY," You are not in a vehicle that you own.");
     return 1;
}
Reply
#3

thanks but thats not the problem i cant figure out why when you park after re-log the car disappear when you do /parkcar
Reply
#4

Can you show us CreatePlayerVehicle?
Reply
#5

here is CreatePlayerVehicle

pawn Код:
stock CreatePlayerVehicle(playerid, slotid)
{
    if(IsPlayerConnected(playerid))
    {
        switch(slotid)
        {
            case 1:
            {
                if(PlayerInfo[playerid][PlayerVehicleModel1] != 0)
                {
                    PlayerVehicleID1[playerid] = 0;
                    PlayerVehicleID1[playerid] = CreateVehicle(PlayerInfo[playerid][PlayerVehicleModel1], PlayerInfo[playerid][PlayerVehiclePosX1], PlayerInfo[playerid][PlayerVehiclePosY1], PlayerInfo[playerid][PlayerVehiclePosZ1], PlayerInfo[playerid][PlayerVehicleFacing1], PlayerInfo[playerid][pPlayerVehicle1Color], PlayerInfo[playerid][pPlayerVehicle1Color2], -1);
                    VehicleInfo[PlayerVehicleID1[playerid]][VehicleDealership] = 1;
                    VehicleInfo[PlayerVehicleID1[playerid]][VehicleLock] = PlayerInfo[playerid][pVehLock1];
                    VehicleInfo[PlayerVehicleID1[playerid]][VehicleLocked] = PlayerInfo[playerid][pVehLocked1];
                    SetVehicleVirtualWorld(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1VirWorld]);
                    LinkVehicleToInterior(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1Interior]);
                    strmid(VehicleInfo[PlayerVehicleID1[playerid]][VehicleOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
                    if(PlayerInfo[playerid][pVehLock1] == 1)
                    {
                        if(PlayerInfo[playerid][pVehLocked1] == 1)
                        {
                            LockCar(PlayerVehicleID1[playerid]);
                        }
                        else
                        {
                            UnLockCar(PlayerVehicleID1[playerid]);
                        }
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1PaintJob] != 255)
                    {
                        ChangeVehiclePaintjob(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1PaintJob]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1Nos] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1Nos]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot0] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot0]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot1] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot1]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot2] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot2]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot3] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot3]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot4] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot4]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot5] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot5]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot6] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot6]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot7] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot7]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot8] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot8]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot9] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot9]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot10] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot10]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot11] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot11]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot12] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot12]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle1ModSlot13] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID1[playerid], PlayerInfo[playerid][PlayerVehicle1ModSlot13]);
                    }
                }
            }
            case 2:
            {
                if(PlayerInfo[playerid][PlayerVehicleModel2] != 0)
                {
                    PlayerVehicleID2[playerid] = 0;
                    PlayerVehicleID2[playerid] = CreateVehicle(PlayerInfo[playerid][PlayerVehicleModel2], PlayerInfo[playerid][PlayerVehiclePosX2], PlayerInfo[playerid][PlayerVehiclePosY2], PlayerInfo[playerid][PlayerVehiclePosZ2], PlayerInfo[playerid][PlayerVehicleFacing2], PlayerInfo[playerid][pPlayerVehicle2Color], PlayerInfo[playerid][pPlayerVehicle2Color2], -1);
                    VehicleInfo[PlayerVehicleID2[playerid]][VehicleDealership] = 1;
                    SetVehicleVirtualWorld(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2VirWorld]);
                    LinkVehicleToInterior(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2Interior]);
                    VehicleInfo[PlayerVehicleID2[playerid]][VehicleLock] = PlayerInfo[playerid][pVehLock2];
                    VehicleInfo[PlayerVehicleID2[playerid]][VehicleLocked] = PlayerInfo[playerid][pVehLocked2];
                    strmid(VehicleInfo[PlayerVehicleID2[playerid]][VehicleOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
                    if(PlayerInfo[playerid][pVehLock2] == 1)
                    {
                        if(PlayerInfo[playerid][pVehLocked2] == 1)
                        {
                            LockCar(PlayerVehicleID2[playerid]);
                        }
                        else
                        {
                            UnLockCar(PlayerVehicleID2[playerid]);
                        }
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2PaintJob] != 255)
                    {
                        ChangeVehiclePaintjob(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2PaintJob]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2Nos] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2Nos]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot0] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot0]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot1] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot1]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot2] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot2]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot3] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot3]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot4] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot4]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot5] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot5]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot6] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot6]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot7] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot7]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot8] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot8]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot9] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot9]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot10] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot10]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot11] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot11]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot12] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot12]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle2ModSlot13] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID2[playerid], PlayerInfo[playerid][PlayerVehicle2ModSlot13]);
                    }
                }
            }
            case 3:
            {
                if(PlayerInfo[playerid][PlayerVehicleModel3] != 0)
                {
                    PlayerVehicleID3[playerid] = 0;
                    PlayerVehicleID3[playerid] = CreateVehicle(PlayerInfo[playerid][PlayerVehicleModel3], PlayerInfo[playerid][PlayerVehiclePosX3], PlayerInfo[playerid][PlayerVehiclePosY3], PlayerInfo[playerid][PlayerVehiclePosZ3], PlayerInfo[playerid][PlayerVehicleFacing3], PlayerInfo[playerid][pPlayerVehicle3Color], PlayerInfo[playerid][pPlayerVehicle3Color2], -1);
                    VehicleInfo[PlayerVehicleID3[playerid]][VehicleDealership] = 1;
                    SetVehicleVirtualWorld(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3VirWorld]);
                    LinkVehicleToInterior(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3Interior]);
                    VehicleInfo[PlayerVehicleID3[playerid]][VehicleLock] = PlayerInfo[playerid][pVehLock3];
                    VehicleInfo[PlayerVehicleID3[playerid]][VehicleLocked] = PlayerInfo[playerid][pVehLocked3];
                    strmid(VehicleInfo[PlayerVehicleID3[playerid]][VehicleOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
                    if(PlayerInfo[playerid][pVehLock3] == 1)
                    {
                        if(PlayerInfo[playerid][pVehLocked3] == 1)
                        {
                            LockCar(PlayerVehicleID3[playerid]);
                        }
                        else
                        {
                            UnLockCar(PlayerVehicleID3[playerid]);
                        }
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3PaintJob] != 255)
                    {
                        ChangeVehiclePaintjob(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3PaintJob]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3Nos] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3Nos]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot0] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot0]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot1] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot1]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot2] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot2]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot3] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot3]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot4] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot4]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot5] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot5]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot6] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot6]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot7] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot7]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot8] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot8]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot9] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot9]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot10] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot10]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot11] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot11]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot12] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot12]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle3ModSlot13] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID3[playerid], PlayerInfo[playerid][PlayerVehicle3ModSlot13]);
                    }
                }
            }
            case 4:
            {
                if(PlayerInfo[playerid][PlayerVehicleModel4] != 0)
                {
                    PlayerVehicleID4[playerid] = 0;
                    PlayerVehicleID4[playerid] = CreateVehicle(PlayerInfo[playerid][PlayerVehicleModel4], PlayerInfo[playerid][PlayerVehiclePosX4], PlayerInfo[playerid][PlayerVehiclePosY4], PlayerInfo[playerid][PlayerVehiclePosZ4], PlayerInfo[playerid][PlayerVehicleFacing4], PlayerInfo[playerid][pPlayerVehicle4Color], PlayerInfo[playerid][pPlayerVehicle4Color2], -1);
                    VehicleInfo[PlayerVehicleID4[playerid]][VehicleDealership] = 1;
                    VehicleInfo[PlayerVehicleID4[playerid]][VehicleLock] = PlayerInfo[playerid][pVehLock4];
                    VehicleInfo[PlayerVehicleID4[playerid]][VehicleLocked] = PlayerInfo[playerid][pVehLocked4];
                    SetVehicleVirtualWorld(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4VirWorld]);
                    LinkVehicleToInterior(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4Interior]);
                    strmid(VehicleInfo[PlayerVehicleID4[playerid]][VehicleOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
                    if(PlayerInfo[playerid][pVehLock4] == 1)
                    {
                        if(PlayerInfo[playerid][pVehLocked4] == 1)
                        {
                            LockCar(PlayerVehicleID4[playerid]);
                        }
                        else
                        {
                            UnLockCar(PlayerVehicleID4[playerid]);
                        }
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4PaintJob] != 255)
                    {
                        ChangeVehiclePaintjob(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4PaintJob]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4Nos] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4Nos]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot0] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot0]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot1] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot1]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot2] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot2]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot3] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot3]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot4] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot4]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot5] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot5]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot6] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot6]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot7] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot7]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot8] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot8]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot9] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot9]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot10] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot10]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot11] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot11]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot12] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot12]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle4ModSlot13] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID4[playerid], PlayerInfo[playerid][PlayerVehicle4ModSlot13]);
                    }
                }
            }
            case 5:
            {
                if(PlayerInfo[playerid][PlayerVehicleModel5] != 0)
                {
                    PlayerVehicleID5[playerid] = 0;
                    PlayerVehicleID5[playerid] = CreateVehicle(PlayerInfo[playerid][PlayerVehicleModel5], PlayerInfo[playerid][PlayerVehiclePosX5], PlayerInfo[playerid][PlayerVehiclePosY5], PlayerInfo[playerid][PlayerVehiclePosZ5], PlayerInfo[playerid][PlayerVehicleFacing5], PlayerInfo[playerid][pPlayerVehicle5Color], PlayerInfo[playerid][pPlayerVehicle5Color2], -1);
                    VehicleInfo[PlayerVehicleID5[playerid]][VehicleDealership] = 1;
                    SetVehicleVirtualWorld(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5VirWorld]);
                    LinkVehicleToInterior(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5Interior]);
                    VehicleInfo[PlayerVehicleID5[playerid]][VehicleLock] = PlayerInfo[playerid][pVehLock5];
                    VehicleInfo[PlayerVehicleID5[playerid]][VehicleLocked] = PlayerInfo[playerid][pVehLocked5];
                    strmid(VehicleInfo[PlayerVehicleID5[playerid]][VehicleOwner], PlayerName(playerid), 0, strlen(PlayerName(playerid)), 255);
                    if(PlayerInfo[playerid][pVehLock5] == 1)
                    {
                        if(PlayerInfo[playerid][pVehLocked5] == 1)
                        {
                            LockCar(PlayerVehicleID5[playerid]);
                        }
                        else
                        {
                            UnLockCar(PlayerVehicleID5[playerid]);
                        }
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5PaintJob] != 255)
                    {
                        ChangeVehiclePaintjob(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5PaintJob]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5Nos] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5Nos]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot0] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot0]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot1] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot1]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot2] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot2]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot3] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot3]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot4] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot4]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot5] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot5]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot6] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot6]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot7] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot7]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot8] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot8]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot9] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot9]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot10] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot10]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot11] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot11]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot12] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot12]);
                    }
                    if(PlayerInfo[playerid][PlayerVehicle5ModSlot13] > 0)
                    {
                        AddVehicleComponent(PlayerVehicleID5[playerid], PlayerInfo[playerid][PlayerVehicle5ModSlot13]);
                    }
                }
            }
        }
    }
}
Reply
#6

bump
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)