30.06.2012, 06:15
Let me give you an example.
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.
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;
}