-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #527 from bitpredator/develop
refactor: esx_basicneeds
- Loading branch information
Showing
17 changed files
with
90 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Config = {} | ||
Config.Visible = false | ||
Config.Locale = 'en' | ||
Config.Visible = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/da.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['da'] = { | ||
['got_healed'] = 'Du er blevet helbredt.' | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/de.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['de'] = { | ||
['got_healed'] = 'Du wurdest geheilt.' | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/en.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['en'] = { | ||
['got_healed'] = 'You have been healed.' | ||
} |
4 changes: 4 additions & 0 deletions
4
server-data/resources/[esx_addons]/esx_basicneeds/locales/es.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Locales['es'] = { | ||
['used_bread'] = 'Has usado 1x pan', | ||
['used_water'] = 'Has usado 1x agua', | ||
} |
4 changes: 4 additions & 0 deletions
4
server-data/resources/[esx_addons]/esx_basicneeds/locales/fi.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Locales['fi'] = { | ||
['used_bread'] = 'sinä söit 1x leipä', | ||
['used_water'] = 'sinä joit 1x vesi', | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/fr.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['fr'] = { | ||
['got_healed'] = 'Vous avez été soigné.' | ||
} |
4 changes: 4 additions & 0 deletions
4
server-data/resources/[esx_addons]/esx_basicneeds/locales/hu.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Locales['hu'] = { | ||
['used_bread'] = 'Megettél egy kenyeret.', | ||
['used_water'] = 'Megittál egy vizet.', | ||
} |
5 changes: 5 additions & 0 deletions
5
server-data/resources/[esx_addons]/esx_basicneeds/locales/it.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Locales['it'] = { | ||
['used_bread'] = 'hai usato 1x panino', | ||
['used_water'] = 'hai usato 1x acqua', | ||
['got_healed'] = 'Sei stato curato.' | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/nl.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['nl'] = { | ||
['used_eat'] = 'je hebt een %s gegeten', | ||
} |
4 changes: 4 additions & 0 deletions
4
server-data/resources/[esx_addons]/esx_basicneeds/locales/pl.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Locales['pl'] = { | ||
['used_bread'] = 'zjadłeś/aś 1x chleb', | ||
['used_water'] = 'wypiłeś/aś 1x woda', | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/sl.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['sl'] = { | ||
['got_healed'] = 'Vi ste bili Pozdravljeni.' | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/sr.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['sr'] = { | ||
['got_healed'] = 'Vi ste izlečeni.' | ||
} |
3 changes: 3 additions & 0 deletions
3
server-data/resources/[esx_addons]/esx_basicneeds/locales/zh-cn.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Locales['zh-cn'] = { | ||
['got_healed'] = '已重置饥饿+饥渴双值.' | ||
} |
18 changes: 11 additions & 7 deletions
18
server-data/resources/[esx_addons]/esx_basicneeds/server/main.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
ESX = nil | ||
|
||
ESX = exports["es_extended"]:getSharedObject() | ||
|
||
ESX.RegisterCommand('heal', 'admin', function(xPlayer, args, showError) | ||
ESX.RegisterCommand('heal', 'admin', function(_, args) | ||
args.playerId.triggerEvent('esx_basicneeds:healPlayer') | ||
args.playerId.triggerEvent('chat:addMessage', {args = {'^5HEAL', 'You have been healed.'}}) | ||
args.playerId.showNotification(_U('got_healed')) | ||
end, true, {help = 'Heal a player, or yourself - restores thirst, hunger and health.', validate = true, arguments = { | ||
{name = 'playerId', help = 'the player id', type = 'player'} | ||
}}) | ||
}}) | ||
|
||
AddEventHandler('txAdmin:events:healedPlayer', function(eventData) | ||
if GetInvokingResource() ~= "monitor" or type(eventData) ~= "table" or type(eventData.id) ~= "number" then | ||
return | ||
end | ||
|
||
TriggerClientEvent('esx_basicneeds:healPlayer', eventData.id) | ||
end) |