Added /save <playerId> and /saveall commands

This commit is contained in:
ElPumpo
2020-03-23 12:10:25 +01:00
parent d8e4e8d991
commit 0fc8c4d9c5
9 changed files with 26 additions and 0 deletions
+2
View File
@@ -62,6 +62,8 @@ Locales['br'] = {
['command_clearall'] = 'limpar o chat para todos',
['command_clearinventory'] = 'remover todos os itens do inventário',
['command_clearloadout'] = 'remova todas as armas do carregamento',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'teleport to coordinates',
['command_setcoords_x'] = 'x axis',
['command_setcoords_y'] = 'y axis',
+2
View File
@@ -62,6 +62,8 @@ Locales['cs'] = {
['command_clearall'] = 'clear chat for all players',
['command_clearinventory'] = 'clear player inventory',
['command_clearloadout'] = 'clear a player loadout',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'teleport to coordinates',
['command_setcoords_x'] = 'x axis',
['command_setcoords_y'] = 'y axis',
+2
View File
@@ -62,6 +62,8 @@ Locales['de'] = {
['command_clearall'] = 'clear chat for all players',
['command_clearinventory'] = 'clear player inventory',
['command_clearloadout'] = 'clear a player loadout',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'teleport to coordinates',
['command_setcoords_x'] = 'x axis',
['command_setcoords_y'] = 'y axis',
+2
View File
@@ -62,6 +62,8 @@ Locales['en'] = {
['command_clearall'] = 'clear chat for all players',
['command_clearinventory'] = 'clear player inventory',
['command_clearloadout'] = 'clear a player loadout',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'teleport to coordinates',
['command_setcoords_x'] = 'x axis',
['command_setcoords_y'] = 'y axis',
+2
View File
@@ -62,6 +62,8 @@ Locales['fi'] = {
['command_clearall'] = 'clear chat for all players',
['command_clearinventory'] = 'clear player inventory',
['command_clearloadout'] = 'clear a player loadout',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'teleport to coordinates',
['command_setcoords_x'] = 'x axis',
['command_setcoords_y'] = 'y axis',
+2
View File
@@ -62,6 +62,8 @@ Locales['fr'] = {
['command_clearall'] = 'vider le chat pour tous',
['command_clearinventory'] = 'vider l\'inventaire d\'un joueur',
['command_clearloadout'] = 'vider le loadout d\'un joueur',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'se téléporter aux coordonnées',
['command_setcoords_x'] = 'axe X',
['command_setcoords_y'] = 'axe Y',
+2
View File
@@ -62,6 +62,8 @@ Locales['pl'] = {
['command_clearall'] = 'clear chat for all players',
['command_clearinventory'] = 'clear player inventory',
['command_clearloadout'] = 'clear a player loadout',
['command_save'] = 'save a player to database',
['command_saveall'] = 'save all players to database',
['command_setcoords'] = 'teleport to coordinates',
['command_setcoords_x'] = 'x axis',
['command_setcoords_y'] = 'y axis',
+2
View File
@@ -62,6 +62,8 @@ Locales['sv'] = {
['command_clearall'] = 'töm chatten för alla spelare',
['command_clearinventory'] = 'töm en spelares inventory',
['command_clearloadout'] = 'töm en spelares loadout',
['command_save'] = 'spara en spelare i databas',
['command_saveall'] = 'spara alla spelare i databas',
['command_setcoords'] = 'teleportera till koordinater',
['command_setcoords_x'] = 'x axel',
['command_setcoords_y'] = 'y axel',
+10
View File
@@ -116,3 +116,13 @@ end, true, {help = _U('command_setgroup'), validate = true, arguments = {
{name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
{name = 'group', help = _U('command_setgroup_group'), type = 'string'},
}})
ESX.RegisterCommand('save', 'admin', function(xPlayer, args, showError)
ESX.SavePlayer(args.playerId)
end, true, {help = _U('command_save'), validate = true, arguments = {
{name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'}
}})
ESX.RegisterCommand('saveall', 'admin', function(xPlayer, args, showError)
ESX.SavePlayers()
end, true, {help = _U('command_saveall')})