Skip to content

Commit

Permalink
Merge pull request #704 from bitpredator/dev
Browse files Browse the repository at this point in the history
fix: use bpt_idcard instead of jsfour-idcard
  • Loading branch information
bitpredator authored May 19, 2024
2 parents 2344885 + d587f8f commit f14b433
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# https://github.com/actions/labeler

name: Labeler
on: [pull_request_target]
on: [pull_request]

jobs:
label:
Expand Down
13 changes: 6 additions & 7 deletions server-data/resources/[esx_addons]/BasicItem/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ AddEventHandler("IDCARD:USE", function()
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 2.0 then
ESX.ShowNotification((_LConfig.playerReceiveCard):format(GetPlayerName(closestPlayer)))
TriggerServerEvent("jsfour-idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer))
TriggerServerEvent("bpt_idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer))
else
ESX.ShowNotification(_LConfig.nobodyFound)
TriggerServerEvent("jsfour-idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
TriggerServerEvent("bpt_idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
end
Wait(1)
end)
Expand All @@ -20,10 +20,10 @@ AddEventHandler("DMVCARD:USE", function()
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 2.0 then
ESX.ShowNotification((playerReceiveCard):format(GetPlayerName(closestPlayer)))
TriggerServerEvent("jsfour-idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), "driver")
TriggerServerEvent("bpt_idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), "driver")
else
ESX.ShowNotification(_LConfig.nobodyFound)
TriggerServerEvent("jsfour-idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), "driver")
TriggerServerEvent("bpt_idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), "driver")
end
Wait(1)
end)
Expand All @@ -33,18 +33,17 @@ AddEventHandler("WCARD:USE", function()
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 2.0 then
ESX.ShowNotification((playerReceiveCard):format(GetPlayerName(closestPlayer)))
TriggerServerEvent("jsfour-idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), "weapon")
TriggerServerEvent("bpt_idcardidcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), "weapon")
else
ESX.ShowNotification(_LConfig.nobodyFound)
TriggerServerEvent("jsfour-idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), "weapon")
TriggerServerEvent("bpt_idcard:open", GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), "weapon")
end
Wait(1)
end)

RegisterNetEvent("JOBCARD:USE")
AddEventHandler("JOBCARD:USE", function(user)
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
ESX = exports["es_extended"]:getSharedObject()
ESX.PlayerData = ESX.GetPlayerData()

local userData = user[1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ server_scripts({
"config.lua",
})

dependency("jsfour-idcard")
dependency("bpt_idcard")

0 comments on commit f14b433

Please sign in to comment.