Vehicle entering help
#1

Okay, so I've created the base of a garage system for my self, I don't know how to setvehpos, basically at the moment you type /enter at the garage spot and you enter by your self, how can i make you still inside your vehicle /enter and you and your vehicle will be inside?
Reply
#2

Let me give you an example.

pawn Код:
command(enter,playerid,params[])
{
    if(GetPlayerState[playerid] != PLAYER_STATE_DRIVER) // They're NOT in a car
    {
        //SetPLAYERPos, not SetVehiclePos.
        //SetPLAYERInterior here
    }
    else
    {
        new vehicle = GetPlayerVehicleID(playerid);
        //Then, set their VEHICLE position.
        //LinkVehicleToInterior, or whatever that function is.
    }
    return 1;
}
There, you can see I checked their state, if they were a driver of a vehicle or not. Then, if they WEREN'T in a vehicle, I'd set the PLAYER pos, and if they WERE in a vehicle, I'd set the vehicle pos.
Reply
#3

Thank you so much man, answered the question perfectly, + rep.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)