Skip to content

Commit

Permalink
version 1.0.1
Browse files Browse the repository at this point in the history
You can now prevent mechanics to use the kit
  • Loading branch information
jonteohr committed Mar 13, 2018
1 parent 0d3af51 commit 3d53d1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion __resource.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'

description 'ESX Repairkit'
version '1.0.0'
version '1.0.1'

client_scripts {
'@es_extended/locale.lua',
Expand Down
3 changes: 2 additions & 1 deletion config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ Config = {}
Config.InfiniteRepairs = false -- Should one repairkit last forever?
Config.RepairTime = 15 -- In seconds, how long should a repair take?
Config.IgnoreAbort = true -- Remove repairkit from inventory even if user aborts repairs?
Config.AllowMecano = false -- Allow mechanics to use this repairkit?

Config.Locale = 'sv'
Config.Locale = 'en'
8 changes: 7 additions & 1 deletion server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ ESX.RegisterUsableItem('repairkit', function(source)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)

TriggerClientEvent('esx_repairkit:onUse', _source)
if Config.AllowMecano then
TriggerClientEvent('esx_repairkit:onUse', _source)
else
if xPlayer.job.name ~= 'mecano' then
TriggerClientEvent('esx_repairkit:onUse', _source)
end
end
end)

RegisterNetEvent('esx_repairkit:removeKit')
Expand Down

0 comments on commit 3d53d1c

Please sign in to comment.