-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix engine start keybind and add keyfob prop #150
Conversation
AttachEntityToEntity( | ||
key, | ||
cache.ped, | ||
GetPedBoneIndex(cache.ped, 57005), | ||
0.10, | ||
0.02, | ||
0, | ||
48.10, | ||
23.14, | ||
24.14, | ||
true, | ||
true, | ||
false, | ||
true, | ||
1, | ||
true | ||
) | ||
SetModelAsNoLongerNeeded(key) | ||
SetTimeout( | ||
1250, | ||
function() | ||
ClearPedTasks(cache.ped) | ||
DeleteEntity(key) | ||
end | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AttachEntityToEntity( | |
key, | |
cache.ped, | |
GetPedBoneIndex(cache.ped, 57005), | |
0.10, | |
0.02, | |
0, | |
48.10, | |
23.14, | |
24.14, | |
true, | |
true, | |
false, | |
true, | |
1, | |
true | |
) | |
SetModelAsNoLongerNeeded(key) | |
SetTimeout( | |
1250, | |
function() | |
ClearPedTasks(cache.ped) | |
DeleteEntity(key) | |
end | |
) | |
AttachEntityToEntity(key, cache.ped, GetPedBoneIndex(cache.ped, 57005), 0.10, 0.02, 0, 48.10, 23.14, 24.14, true, true, false, true, 1, true) | |
SetModelAsNoLongerNeeded(key) | |
SetTimeout(1250, function() | |
ClearPedTasks(cache.ped) | |
DeleteEntity(key) | |
end) |
Don't unfold all the lines as this makes it difficult to follow what is happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally I believe this should be called before the animation as lib.playAnim
is not async so we can then remove the SetTimeout
and just delete the entity after lib.playAnim
TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', | ||
NetworkGetNetworkIdFromEntity(leftVehicle), 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', | |
NetworkGetNetworkIdFromEntity(leftVehicle), 2) | |
TriggerServerEvent('qb-vehiclekeys:server:setVehLockState', NetworkGetNetworkIdFromEntity(leftVehicle), 2) |
Same deal with the earlier formatting
I'll update it accordingly. Idk why my word wrap messed with the formatting and indent. Was doing it on my phone 😅 |
Co-authored-by: Solareon <[email protected]>
Co-authored-by: Solareon <[email protected]>
Co-authored-by: Solareon <[email protected]>
Description
Checklist