Skip to content

Commit

Permalink
Some small vehicle keyfob changes
Browse files Browse the repository at this point in the history
  • Loading branch information
TomGrobbe committed Mar 16, 2019
1 parent 277c61f commit e25e5ec
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions vMenu/CommonFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2979,12 +2979,13 @@ public static async void PressKeyFob(Vehicle veh)
SetModelAsNoLongerNeeded(KeyFobHashKey); // cleanup model from memory

ClearPedTasks(player.Character.Handle);
if (player.Character.Weapons.Current.Hash != WeaponHash.Unarmed)
{
player.Character.Weapons.Give(WeaponHash.Unarmed, 1, true, true);
}
SetCurrentPedWeapon(Game.PlayerPed.Handle, (uint)GetHashKey("WEAPON_UNARMED"), true);
//if (player.Character.Weapons.Current.Hash != WeaponHash.Unarmed)
//{
// player.Character.Weapons.Give(WeaponHash.Unarmed, 1, true, true);
//}

//if (!HasEntityClearLosToEntityInFront(player.Character.Handle, veh.Handle))
// if (!HasEntityClearLosToEntityInFront(player.Character.Handle, veh.Handle))
{
/*
TODO: Work out how to get proper heading between entities.
Expand All @@ -2999,7 +3000,8 @@ public static async void PressKeyFob(Vehicle veh)
//Debug.WriteLine(heading.ToString());
//SetPedDesiredHeading(player.Character.Handle, heading);

//TaskTurnPedToFaceEntity(player.Character.Handle, veh.Handle, 1000);
ClearPedTasks(Game.PlayerPed.Handle);
TaskTurnPedToFaceEntity(player.Character.Handle, veh.Handle, 500);
}

string animDict = "anim@mp_player_intmenu@key_fob@";
Expand Down

0 comments on commit e25e5ec

Please sign in to comment.