*

Desconectado swarlog

  • *
  • 320
  • 2
  • Sexo: Masculino
    • Ver Perfil
    • United Extreme
Colocar player dentro de un vehículo
« en: 07 de Mayo de 2014, 03:37:19 pm »

En el archivo pawn:

Código: [Seleccionar]
simulated event StartDriving(Vehicle V)
{
local vector X;
super.StartDriving(V);

SetCollision( false, false);
bCollideWorld = false;

// this sets the driver position in vehicle, this time is the manta.
Conduce = V;
V.SetRotation(rotation);
setrotation(V.rotation);
X = V.location - Vector(V.Rotation) * 62;
X.Z += 31;
setlocation(X);

SetBase(Conduce);
SetPhysics( PHYS_None );

NodoAnimacion.PlayCustomAnim('conduce_ma­nta_idle', 1.0f, 0.5f, 0.30f, true, true);
}

simulated event StopDriving(Vehicle V)
{
super.StopDriving(V);
Conduce = none;
NodoAnimacion.StopCustomAnim( 0.25 );
}

if (Conduce != none)
{
SetBase(Conduce);
SetPhysics( PHYS_None );
return;
}