mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Added /setaccountmoney command, closes #558
This commit is contained in:
@@ -80,6 +80,8 @@ Locales['br'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'teleport to coordinates',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['cs'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'teleport to coordinates',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['de'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'teleport to coordinates',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['en'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'teleport to coordinates',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['fi'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'teleport to coordinates',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['fr'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'le joueur n\'a pas cette arme',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'se téléporter aux coordonnées',
|
||||
['command_setcoords_x'] = 'axe X',
|
||||
['command_setcoords_y'] = 'axe Y',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['pl'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'player does not have that weapon',
|
||||
['command_save'] = 'save a player to database',
|
||||
['command_saveall'] = 'save all players to database',
|
||||
['command_setaccountmoney'] = 'set account money for a player',
|
||||
['command_setaccountmoney_amount'] = 'amount of money to set',
|
||||
['command_setcoords'] = 'teleport to coordinates',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
|
||||
@@ -80,6 +80,8 @@ Locales['sv'] = {
|
||||
['command_giveweaponcomponent_missingweapon'] = 'spelaren har ej det vapnet',
|
||||
['command_save'] = 'spara en spelare i databas',
|
||||
['command_saveall'] = 'spara alla spelare i databas',
|
||||
['command_setaccountmoney'] = 'bestäm ny balans på ett spelarkonto',
|
||||
['command_setaccountmoney_amount'] = 'ny balans',
|
||||
['command_setcoords'] = 'teleportera till koordinater',
|
||||
['command_setcoords_x'] = 'x axel',
|
||||
['command_setcoords_y'] = 'y axel',
|
||||
|
||||
@@ -30,6 +30,18 @@ end, false, {help = _U('command_cardel'), validate = false, arguments = {
|
||||
{name = 'radius', help = _U('command_cardel_radius'), type = 'any'}
|
||||
}})
|
||||
|
||||
ESX.RegisterCommand('setaccountmoney', 'admin', function(xPlayer, args, showError)
|
||||
if args.playerId.getAccount(args.account) then
|
||||
args.playerId.setAccountMoney(args.account, args.amount)
|
||||
else
|
||||
showError(_U('command_giveaccountmoney_invalid'))
|
||||
end
|
||||
end, true, {help = _U('command_setaccountmoney'), validate = true, arguments = {
|
||||
{name = 'playerId', help = _U('commandgeneric_playerid'), type = 'player'},
|
||||
{name = 'account', help = _U('command_giveaccountmoney_account'), type = 'string'},
|
||||
{name = 'amount', help = _U('command_setaccountmoney_amount'), type = 'number'}
|
||||
}})
|
||||
|
||||
ESX.RegisterCommand('giveaccountmoney', 'admin', function(xPlayer, args, showError)
|
||||
if args.playerId.getAccount(args.account) then
|
||||
args.playerId.addAccountMoney(args.account, args.amount)
|
||||
|
||||
Reference in New Issue
Block a user