sling
This commit is contained in:
parent
90cf348723
commit
619c6d40f6
4 changed files with 86 additions and 8 deletions
|
@ -43,6 +43,9 @@ function Utils:CreateAndAttachWeapon(weaponName, weaponVal, coords, playerPed)
|
|||
Sling.currentAttachedAmount = Sling.currentAttachedAmount + 1
|
||||
SetModelAsNoLongerNeeded(weaponVal.model)
|
||||
|
||||
if NetworkGetEntityOwner(playerPed) == PlayerId() then
|
||||
Sling:SyncWeaponAttachment(weaponName, weaponVal, coords, 'attach')
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -57,4 +60,8 @@ function Utils:DeleteWeapon(weaponName)
|
|||
end
|
||||
DeleteObject(attachment.placeholder)
|
||||
Sling.currentAttachedAmount = Sling.currentAttachedAmount - 1
|
||||
|
||||
if NetworkGetEntityOwner(cache.ped) == PlayerId() then
|
||||
Sling:SyncWeaponAttachment(weaponName, nil, nil, 'detach')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue