Vehicle Velocity
#1

Is there any way to prevent vehicle to stop, when someone teleports to it?

I tried with PutPlayerInVehicle and SetPlayerVelocity but if the player teleports to a car as a passenger, the car will be stopped (will not have the same velocity as before). Any ideas?

This is my code:
pawn Код:
Player[playerid][pVehicle] = CreateVehicle(ModelID,xPos,yPos,zPos + 1,Ang,VehicleColors[Color1],VehicleColors[Color2],0);
        SetVehicleVirtualWorld(Player[playerid][pVehicle],Player[playerid][pWorld]);
        PlayerPlaySound(playerid,1056,0,0,0);

        new Count;

        for(new PlayerNumber;PlayerNumber < MAX_PLAYERS;PlayerNumber++)
        {
            if(IsPlayerConnected(PlayerNumber))
            {
                if(PlayerNumber != playerid)
                {
                    if(PlayersInVehicle[PlayerNumber] == TRUE)
                    {
                        if(VehicleSeats[ModelID - 400] > Count)
                        {
                            Count++;
                            PlayerPlaySound(PlayerNumber,1056,0,0,0);
                            PutPlayerInVehicle(PlayerNumber,Player[playerid][pVehicle],Count);
                            SetPlayerVelocity(PlayerNumber,xVel,yVel,zVel);
                        }
                        else
                        {
                            break;
                        }
                    }
                }
            }
        }
       
        PutPlayerInVehicle(playerid,Player[playerid][pVehicle],0);
        SetPlayerVelocity(playerid,xVel,yVel,zVel);
        SetVehicleVelocity(Player[playerid][pVehicle],xVel,yVel,zVel);
Reply


Messages In This Thread
Vehicle Velocity - by Killer#Mummy - 04.08.2012, 21:49
Re: Vehicle Velocity - by Kar - 04.08.2012, 22:13
Re: Vehicle Velocity - by Killer#Mummy - 04.08.2012, 22:35
Re: Vehicle Velocity - by Killer#Mummy - 05.08.2012, 08:15

Forum Jump:


Users browsing this thread: 1 Guest(s)