Liberty Unleashed

Scripting => Script Help => Topic started by: mimomohamed on August 21, 2012, 02:36:25 pm

Title: Problem With the speedo
Post by: mimomohamed on August 21, 2012, 02:36:25 pm
why it doesn't appear when I use this command

Quote
if ( szCommand == "enter" )
   {
      local veh = GetClosestVehicle( pPlayer );
      if ( veh )
      {
         MessagePlayer( "Placing you in the closest vehicle to you", pPlayer );
         pPlayer.Vehicle = veh;
      }
      else MessagePlayer( "couldn't find any car", pPlayer, Colour( 0, 255, 0 ) );
   }

why????

help please .
Title: Re: Problem With the speedo
Post by: Rocky on August 21, 2012, 03:12:30 pm
Code: [Select]
if ( szCommand == "enter" )
   {
      local veh = GetClosestVehicle( pPlayer );
      if ( veh )
      {
           MessagePlayer( "Placing you in the closest vehicle to you", pPlayer );
           player.Pos = veh.Pos;
           player.EnterVehicle( veh , DOOR_DRIVER );
      }
      else MessagePlayer( "couldn't find any car", pPlayer, Colour( 0, 255, 0 ) );
   }
   
Title: Re: Problem With the speedo
Post by: mimomohamed on August 21, 2012, 03:43:19 pm
Thanks Very Much man :)
I Have another problem that the speedo still appear when i use this command

Quote
if ( szCommand == "getout" )
       {
      if ( pPlayer.Vehicle )
      {
              pPlayer.RemoveFromVehicle();
      }
      else MessagePlayer( "you are not in a vehicle", pPlayer );
       }
Title: Re: Problem With the speedo
Post by: VetalYA on August 21, 2012, 10:17:43 pm
Set this Vehicle Velocity to 0.0

and then, give a command to exit this veh with player animation.
Title: Re: Problem With the speedo
Post by: mimomohamed on August 22, 2012, 11:12:31 am
really thanks too nice idea :)