Player Tp With Vehicle Not Work
#1

pawn Код:
if(strcmp(cmd, "/vgenter", true) == 0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,8.0, 1824.1476,-1537.8507,13.5469)) // VIP GARAGE ENTER
        {
            SetPlayerVirtualWorld(playerid, 110);
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid,1637.3329,-1375.9287,956.5716);
            SetVehiclePos(GetPlayerVehicleID(playerid),1637.3329,-1375.9287,957.5716);
            PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
            SendClientMessage(playerid, 0x80008000, "Welcome to the VIP Garage !");
            SendClientMessage(playerid, COLOR_YELLOW, "Type /vgexit to go Outside");
            GameTextForPlayer(playerid, "~w~VIP Garage", 5000, 1);
        }
        else
        {
            SetVehiclePos(GetPlayerVehicleID(playerid),1637.3329,-1375.9287,956.5716);//The same position of SetPlayerPos
        }

    }
Tp Player With Vehicle here SetPlayerPos(playerid,1637.3329,-1375.9287,956.5716); But player only tp there Vehicle not there

Sorry For my bad English
Reply
#2

pawn Код:
if(strcmp(cmd, "/vgenter", true) == 0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,8.0, 1824.1476,-1537.8507,13.5469)) // VIP GARAGE ENTER
        {
            new VID = GetPlayerVehicleID(playerid);
            SetPlayerVirtualWorld(playerid, 110);
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid,1637.3329,-1375.9287,956.5716);
            SetVehiclePos(VID,1637.3329,-1375.9287,957.5716);
            SetVehicleVirtualWorld(VID, 110);
            LinkVehicleToInterior(VID, 0);
            PutPlayerInVehicle(playerid, VID, 0);
            SendClientMessage(playerid, 0x80008000, "Welcome to the VIP Garage !");
            SendClientMessage(playerid, COLOR_YELLOW, "Type /vgexit to go Outside");
            GameTextForPlayer(playerid, "~w~VIP Garage", 5000, 1);
        }
        else
        {
            SetVehiclePos(GetPlayerVehicleID(playerid),1637.3329,-1375.9287,956.5716);//The same position of SetPlayerPos
        }

    }
    return 1;
}
Try that, I have not tested it!
Reply
#3

pawn Код:
if(strcmp(cmd, "/vgenter", true) == 0)
    {
           if(PlayerInfo[playerid][pDonateRank] >= 1)
           {
             if(!IsPlayerInAnyVehicle(playerid))
             {
              if(IsPlayerInRangeOfPoint(playerid,8.0, 1824.1476,-1537.8507,13.5469)) // VIP GARAGE ENTER
             {
                SetPlayerVirtualWorld(playerid, 110);
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid,1637.3329,-1375.9287,956.5716);
                SendClientMessage(playerid, 0x80008000, "Welcome to the VIP Garage !");
                SendClientMessage(playerid, COLOR_YELLOW, "Type /vgexit to go Outside");
                GameTextForPlayer(playerid, "~w~VIP Garage", 5000, 1);
            }
            else
            {
             SetVehiclePos(GetPlayerVehicleID(playerid),1637.3329,-1375.9287,956.5716);//The same position of SetPlayerPos
            }
            }
            }
            return 1;
    }
Reply
#4

Quote:
Originally Posted by NRJ53
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/vgenter", true) == 0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,8.0, 1824.1476,-1537.8507,13.5469)) // VIP GARAGE ENTER
        {
            new VID = GetPlayerVehicleID(playerid);
            SetPlayerVirtualWorld(playerid, 110);
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid,1637.3329,-1375.9287,956.5716);
            SetVehiclePos(VID,1637.3329,-1375.9287,957.5716);
            SetVehicleVirtualWorld(VID, 110);
            LinkVehicleToInterior(VID, 0);
            PutPlayerInVehicle(playerid, VID, 0);
            SendClientMessage(playerid, 0x80008000, "Welcome to the VIP Garage !");
            SendClientMessage(playerid, COLOR_YELLOW, "Type /vgexit to go Outside");
            GameTextForPlayer(playerid, "~w~VIP Garage", 5000, 1);
        }
        else
        {
            SetVehiclePos(GetPlayerVehicleID(playerid),1637.3329,-1375.9287,956.5716);//The same position of SetPlayerPos
        }

    }
    return 1;
}
Try that, I have not tested it!
Work Good Thanks
Reply
#5

Quote:
Originally Posted by venice
Посмотреть сообщение
Work Good Thanks
Good news

All you forgot was really was:
pawn Код:
SetVehicleVirtualWorld(VID, 110);
            LinkVehicleToInterior(VID, 0);
EDIT:
pawn Код:
if(strcmp(cmd, "/vgenter", true) == 0)
{
    if(PlayerInfo[playerid][pDonateRank] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,8.0, 1824.1476,-1537.8507,13.5469)) // VIP GARAGE ENTER
        {
            new VID = GetPlayerVehicleID(playerid);
            SetPlayerVirtualWorld(playerid, 110);
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid,1637.3329,-1375.9287,956.5716);
            SetVehiclePos(VID,1637.3329,-1375.9287,957.5716);
            SetVehicleVirtualWorld(VID, 110);
            LinkVehicleToInterior(VID, 0);
            PutPlayerInVehicle(playerid, VID, 0);
            SendClientMessage(playerid, 0x80008000, "Welcome to the VIP Garage !");
            SendClientMessage(playerid, COLOR_YELLOW, "Type /vgexit to go Outside");
            GameTextForPlayer(playerid, "~w~VIP Garage", 5000, 1);
        }
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)