Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function unholster1h(weaponHash)
- unholsteringactive = true
- local dict = "reaction@intimidation@1h"
- local anim = "intro"
- local PlayerData = exports["isPed"]:isPed("")
- local ped = GetPlayerPed(-1)
- if PlayerData.job ~= nil and PlayerData.job.name == 'police' then
- copunholster(weaponHash)
- if weaponHash == GetHashKey("WEAPON_COMBATPISTOL") then
- GiveWeaponComponentToPed(GetPlayerPed(-1), GetHashKey("WEAPON_COMBATPISTOL"), GetHashKey("COMPONENT_AT_PI_FLSH") )
- end
- Citizen.Wait(450)
- unholsteringactive = false
- return
- end
- RemoveAllPedWeapons(ped)
- local animLength = GetAnimDuration(dict, anim) * 1000
- loadAnimDict(dict)
- TaskPlayAnim(ped, dict, anim, 1.0, 1.0, -1, 50, 0, 0, 0, 0)
- Citizen.Wait(900)
- GiveWeaponToPed(ped, weaponHash, getAmmo(weaponHash), 0, 1)
- SetCurrentPedWeapon(ped, weaponHash, 1)
- Citizen.Wait(500)
- ClearPedTasks(ped)
- Citizen.Wait(1000)
- unholsteringactive = false
- end
- function copunholster(weaponHash)
- local dic = "reaction@intimidation@cop@unarmed"
- local anim = "intro"
- local ammoCount = 0
- loadAnimDict( dic )
- local ped = GetPlayerPed(-1)
- RemoveAllPedWeapons(ped)
- TaskPlayAnim(ped, dic, anim, 10.0, 2.3, -1, 49, 1, 0, 0, 0 )
- Citizen.Wait(600)
- GiveWeaponToPed(ped, weaponHash, getAmmo(weaponHash), 0, 1)
- SetCurrentPedWeapon(ped, weaponHash, 1)
- ClearPedTasks(ped)
- end
- function copholster()
- local dic = "reaction@intimidation@cop@unarmed"
- local anim = "intro"
- local ammoCount = 0
- loadAnimDict( dic )
- local ped = GetPlayerPed(-1)
- prevupdate = 0
- updateAmmo()
- TaskPlayAnim(ped, dic, anim, 10.0, 2.3, -1, 49, 1, 0, 0, 0 )
- Citizen.Wait(600)
- SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), 1)
- RemoveAllPedWeapons(ped)
- ClearPedTasks(ped)
- end
- function holster1h()
- unholsteringactive = true
- local dict = "reaction@intimidation@1h"
- local anim = "outro"
- local PlayerData = exports["isPed"]:isPed("")
- if PlayerData.job ~= nil and PlayerData.job.name == 'police' then
- copholster()
- Citizen.Wait(600)
- unholsteringactive = false
- return
- end
- local ped = GetPlayerPed(-1)
- prevupdate = 0
- updateAmmo()
- local animLength = GetAnimDuration(dict, anim) * 1000
- loadAnimDict(dict)
- TaskPlayAnim(ped, dict, anim, 1.0, 1.0, -1, 50, 0, 0, 0, 0)
- Citizen.Wait(animLength - 2200)
- SetCurrentPedWeapon(ped, GetHashKey("WEAPON_UNARMED"), 1)
- Citizen.Wait(300)
- RemoveAllPedWeapons(ped)
- ClearPedTasks(ped)
- Citizen.Wait(800)
- unholsteringactive = false
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement