Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable handsup when dead, inlaststand or in vehicle. #491

Closed
wants to merge 1 commit into from

Conversation

L1quidSn4ke
Copy link

Describe Pull request
Fixes people spamming hands up when dead/inlaststand also makes it so you cant use handsup when inside a vehicle.

If your PR is to fix an issue mention that issue here

Questions (please complete the following information):

  • Have you personally loaded this code into an updated qbcore project and checked all it's functionality? YES
  • Does your code fit the style guidelines? YES
  • Does your PR fit the contribution guidelines? YES

@GhzGarage
Copy link
Member

Please remove the part about no hands up in a vehicle

if not HasAnimDictLoaded('missminuteman_1ig_2') then
RequestAnimDict('missminuteman_1ig_2')
while not HasAnimDictLoaded('missminuteman_1ig_2') do
if QBCore.Functions.GetPlayerData().metadata['isdead'] then return end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant and already checked on line 20

local handsUp = false
local animDict = "missminuteman_1ig_2"
local anim = "handsup_base"
local handsup = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handsup would look better as handsUp for the bool variable

RequestAnimDict('missminuteman_1ig_2')
while not HasAnimDictLoaded('missminuteman_1ig_2') do
if QBCore.Functions.GetPlayerData().metadata['isdead'] then return end
if IsPedInAnyVehicle(PlayerPedId(), false) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be removed since hands up in vehicles allows for the ability to roleplay hands up in a traffic stop.

@L1quidSn4ke L1quidSn4ke closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants