Merge pull request #802 from ChatDisabled/main

Cleanup wanderrer
This commit is contained in:
Kakarot
2022-08-21 11:55:12 -07:00
committed by GitHub
7 changed files with 202 additions and 46 deletions
+3 -3
View File
@@ -37,7 +37,7 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function()
local blipMarker <const> = GetFirstBlipInfoId(8)
if not DoesBlipExist(blipMarker) then
QBCore.Functions.Notify('No Waypoint Set.', "error", 5000)
QBCore.Functions.Notify(Lang:t("notify.nowp"), "error", 5000)
return 'marker'
end
@@ -108,12 +108,12 @@ RegisterNetEvent('QBCore:Command:GoToMarker', function()
-- If we can't find the coords, set the coords to the old ones.
-- We don't unpack them before since they aren't in a loop and only called once.
SetPedCoordsKeepVehicle(ped, oldCoords['x'], oldCoords['y'], oldCoords['z'] - 1.0)
QBCore.Functions.Notify('Error While Teleporting.', "error", 5000)
QBCore.Functions.Notify(Lang:t("notify.ewtp"), "error", 5000)
end
-- If Z coord was found, set coords in found coords.
SetPedCoordsKeepVehicle(ped, x, y, groundZ)
QBCore.Functions.Notify('Teleported To Waypoint.', "success", 5000)
QBCore.Functions.Notify(Lang:t("notify.tptw"), "success", 5000)
end)
-- Vehicle Commands
+74 -2
View File
@@ -13,11 +13,81 @@ local Translations = {
no_valid_license = 'No Valid Rockstar License Found',
not_whitelisted = 'You\'re not whitelisted for this server',
server_already_open = 'The server is already open',
server_already_closed = 'The server is already closed'
server_already_closed = 'The server is already closed',
noperm = 'You don\'t have permissions for this..',
},
success = {
server_opened = 'The server has been opened',
server_closed = 'The server has been closed'
server_closed = 'The server has been closed',
},
notify = {
nowp = 'No Waypoint Set.',
ewtp = 'Error While Teleporting.',
tptw = 'Teleported To Waypoint.',
},
comm ={
tp = 'TP To Player or Coords (Admin Only)',
tp_idx = 'id/x',
tp_idx_h = 'ID of player or X position',
tp_y = 'y',
tp_y_h = 'Y position',
tp_z = 'z',
tp_z_h = 'Z position',
tpm = 'TP To Marker (Admin Only)',
tglpvp = 'Toggle PVP on the server (Admin Only)',
addper = 'Give Player Permissions (God Only)',
addper_id = 'id',
addper_idh = 'ID of player',
addper_per = 'permission',
addper_perh = 'Permission level',
rper = 'Remove Players Permissions (God Only)',
rper_id = 'id',
rper_idh = 'ID of player',
rper_per = 'permission',
rper_perh = 'Permission level',
opserv = 'Open the server for everyone (Admin Only)',
cserv = 'Close the server for people without permissions (Admin Only)',
cserv_r = 'reason',
cserv_rh = 'Reason for closing it (optional)',
car = 'Spawn Vehicle (Admin Only)',
car_m = 'model',
car_mh = 'Model name of the vehicle',
dv = 'Delete Vehicle (Admin Only)',
gm = 'Give A Player Money (Admin Only)',
gm_id = 'id',
gm_idh = 'Player ID',
gm_mt = 'moneytype',
gm_mth = 'Type of money (cash, bank, crypto)',
gm_a = 'amount',
gm_ah = 'Amount of money',
sm = 'Set Players Money Amount (Admin Only)',
sm_id = 'id',
sm_idh = 'Player ID',
sm_mt = 'moneytype',
sm_mth = 'Type of money (cash, bank, crypto)',
sm_a = 'amount',
sm_ah = 'Amount of money',
job = 'Check Your Job',
sjob = 'Set A Players Job (Admin Only)',
sjob_id = 'id',
sjob_idh = 'Player ID',
sjob_j = 'job',
sjob_jh = 'Job name',
sjob_g = 'grade',
sjob_gh = 'Grade',
sg = 'Set A Players Gang (Admin Only)',
sg_id = 'id',
sg_idh = 'Player ID',
sg_g = 'gang',
sg_gh = 'Name of a gang',
sg_gr = 'grade',
sg_grh = 'Grade',
cinv = 'Clear Players Inventory (Admin Only)',
cinv_id = 'id',
cinv_idh = 'Player ID',
me = 'Show local message',
me_m = 'message',
me_mh = 'Message to respond with',
},
info = {
received_paycheck = 'You received your paycheck of $%{value}',
@@ -28,6 +98,8 @@ local Translations = {
checking_ban = 'Hello %s. We are checking if you are banned.',
join_server = 'Welcome %s to {Server Name}.',
checking_whitelisted = 'Hello %s. We are checking your allowance.',
skick = 'You have been banned for cheating. Check our Discord for more information: %{discord}',
pdexp = 'You Have Been Kicked For Exploitation',
}
}
+96 -12
View File
@@ -1,21 +1,105 @@
--[[
Romanian base language translation for qb-core
Translation done by wanderrer (Martin Riggs#0807 on Discord)
]]--
local Translations = {
error = {
not_online = 'Jucatorul nu este conectat',
not_online = 'Cetateanul nu este in stat (offline)',
wrong_format = 'Format incorect',
missing_args = 'Nu ai introdus toate argumentele (x, y, z)',
missing_args2 = 'Toate argumentele trebuie specificate!',
no_access = 'Nu ai acces la aceasta comanda',
company_too_poor = 'Seful tau este sarac si nu are bani pentru a te plati',
item_not_exist = 'Item-ul nu exista',
too_heavy = 'Inventarul este prea greu'
missing_args = 'Nu ai pferit toate argumentele necesare (x, y, z)',
missing_args2 = 'Toate argumentele trebuiesc precizate!',
no_access = 'Nu ai acces la aceasta comanda!',
company_too_poor = 'Patronul tau e sarachie mare, nu are bani!',
item_not_exist = 'Acest obiect nu exista',
too_heavy = 'Inventarul tau este prea plin',
duplicate_license = 'Duplicat de licenta RockStar detectata',
no_valid_license = 'Nu s-a gasit nicio licenta valida RockStar',
not_whitelisted = 'Nu ai statut de whitelist pe acest server',
noperm = 'Din pacate nu ai permisiunile necesare pentru asa ceva..',
},
success = {},
notify = {
nowp = 'Niciun punct de referinta setat.',
ewtp = 'A aparut o eroare la teleportare.',
tptw = 'Ai fost teleportat la punctul de referinta.',
ops_open = 'Serverul este deja deschis publicului',
ops_closed = 'Serverul este inchis publicului',
},
comm ={
tp = 'TP catre un jucator sau catre anumite coordonate (Admin Only)',
tp_idx = 'ID/X',
tp_idx_h = 'ID-ul jucatorului sau coordonata X',
tp_y = 'Y',
tp_y_h = 'Coordonata Y',
tp_z = 'Z',
tp_z_h = 'Coordonata Z',
tpm = 'TP la punctul de referinta de pe harta (Admin Only)',
tglpvp = 'Activeaza/Dezactiveaza PVP pe server (Admin Only)',
addper = 'Dai permisiuni speciale unui jucator (God Only)',
addper_id = 'ID',
addper_idh = 'ID-ul jucatorului',
addper_per = 'Permisiuni',
addper_perh = 'Permisiunile pe care vrei sa le dau (admin/moderator)',
rper = 'Stergi permisiunile speciale ale unui jucator (God Only)',
rper_id = 'ID',
rper_idh = 'ID-ul jucatorului',
rper_per = 'Permisiuni',
rper_perh = 'Nivelul de permisiuni pe care vrei sa le stergi',
opserv = 'Deschide serverul pentru publicul larg (Admin Only)',
cserv = 'Inchide serverul pentru publicul larg (Admin Only)',
cserv_r = 'Motivul',
cserv_rh = 'Motivul pentru care serverul este inchis publicului larg (optional)',
car = 'Spawneaza un vehicul (Admin Only)',
car_m = 'Model',
car_mh = 'Modelul vehiculului dorit, Ex: intruder',
dv = 'Stergi un vehicul (Admin Only)',
gm = 'Dai o suma de bani unui jucator (Admin Only)',
gm_id = 'ID',
gm_idh = 'ID-ul jucatorului, Ex: 342',
gm_mt = 'Tipul banilor',
gm_mth = 'Aici avem 3 optiuni (cash, bank, crypto)',
gm_a = 'Suma',
gm_ah = 'Suma de bani pe care vrei sa o dai, Ex: 5000',
sm = 'Setezi o suma de bani pentru un jucator anume (Admin Only)',
sm_id = 'ID',
sm_idh = 'ID-ul Jucatorului',
sm_mt = 'tipul de bani',
sm_mth = 'Tipul de bani pe care vrei sa-l setezi jucatorului (cash, bank, crypto)',
sm_a = 'Suma',
sm_ah = 'Suma de bani pe care vrei sa o dai/setezi',
job = 'Iti verifici job-ul, in cazul in care ai uitat :)',
sjob = 'Setezi un job pentru un cetatean (Admin Only)',
sjob_id = 'ID',
sjob_idh = 'ID-ul Jucatorului',
sjob_j = 'job',
sjob_jh = 'Numele jobului, asa cum este definit in config.',
sjob_g = 'Functia',
sjob_gh = 'Functia este de tipul 1,2,3,4 etc.',
sg = 'Setezi o gasca/mafie pentru un jucator (Admin Only)',
sg_id = 'ID',
sg_idh = 'ID-ul Jucatorului',
sg_g = 'gasca/mafie',
sg_gh = 'Numele mafiei sau a gasti pe care vrei sa o setezi',
sg_gr = 'Functia',
sg_grh = 'Functia este de tipul 1,2,3,4 etc.',
cinv = 'Golesti inventarul unui jucator (Admin Only)',
cinv_id = 'ID',
cinv_idh = 'ID-ul Jucatorului',
me = 'Mesaj local/Indica o actiune sau afectiune',
me_m = 'mesaj',
me_mh = 'Efectiv mesajul pe care vrei sa-l afisezi',
},
info = {
received_paycheck = 'Ai primit salariul in valoare de: $%{value}',
job_info = 'Job: %{value} | Statut: %{value2} | In Tura: %{value3}',
gang_info = 'Gang: %{value} | Statut: %{value2}',
on_duty = 'Ai intrat in tura!',
off_duty = 'Ai iesit din tura!'
received_paycheck = 'Ai primit salariul in valoare de $%{value}',
job_info = 'Job: %{value} | Functie: %{value2} | In tura: %{value3}',
gang_info = 'Gasca: %{value} | Functie: %{value2}',
on_duty = 'Ai inceput tura !',
off_duty = 'Ai iesit din tura!',
checking_ban = 'Salutari %s. Verificam daca ai primit ban la noi :)',
join_server = 'Bun venit %s pe {Server Name}.',
checking_whitelisted = 'Salutari %s. Iti facem o verificare scurta.',
skick = 'Ai fost banat pentru cheating. Informatii suplimentare pe serverul nostru de Discord: ',
pdexp = 'Ai primit KICK pentru ca ai incercat un exploit!',
}
}
+24 -24
View File
@@ -81,17 +81,17 @@ function QBCore.Commands.Refresh(source)
end
-- Teleport
QBCore.Commands.Add('tp', 'TP To Location/Player/Coords (Admin Only)', { { name = 'location/id/x', help = 'location name, ID of player, or X position' }, { name = 'y', help = 'Y position' }, { name = 'z', help = 'Z position' } }, false, function(source, args)
QBCore.Commands.Add('tp', Lang:t("comm.tp"), { { name = Lang:t("comm.tp_idx"), help = Lang:t("comm.tp_idx_h") }, { name = Lang:t("comm.tp_y"), help = Lang:t("comm.tp_y_h") }, { name = Lang:t("comm.tp_z"), help = Lang:t("comm.tp_z_h") } }, false, function(source, args)
if args[1] and not args[2] and not args[3] then
if tonumber(args[1]) then
local target = GetPlayerPed(tonumber(args[1]))
if target ~= 0 then
local coords = GetEntityCoords(target)
TriggerClientEvent('QBCore:Command:TeleportToPlayer', source, coords)
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
local target = GetPlayerPed(tonumber(args[1]))
if target ~= 0 then
local coords = GetEntityCoords(target)
TriggerClientEvent('QBCore:Command:TeleportToPlayer', source, coords)
else
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.not_online'), 'error')
end
else
local location = QBShared.Locations[args[1]]
if location then
TriggerClientEvent('QBCore:Command:TeleportToCoords', source, location.x, location.y, location.z, location.w)
@@ -115,18 +115,18 @@ QBCore.Commands.Add('tp', 'TP To Location/Player/Coords (Admin Only)', { { name
end
end, 'admin')
QBCore.Commands.Add('tpm', 'TP To Marker (Admin Only)', {}, false, function(source)
QBCore.Commands.Add('tpm', Lang:t("comm.tpm"), {}, false, function(source)
TriggerClientEvent('QBCore:Command:GoToMarker', source)
end, 'admin')
QBCore.Commands.Add('togglepvp', 'Toggle PVP on the server (Admin Only)', {}, false, function()
QBCore.Commands.Add('togglepvp', Lang:t("comm.tglpvp"), {}, false, function()
QBConfig.Server.PVP = not QBConfig.Server.PVP
TriggerClientEvent('QBCore:Client:PvpHasToggled', -1, QBConfig.Server.PVP)
end, 'admin')
-- Permissions
QBCore.Commands.Add('addpermission', 'Give Player Permissions (God Only)', { { name = 'id', help = 'ID of player' }, { name = 'permission', help = 'Permission level' } }, true, function(source, args)
QBCore.Commands.Add('addpermission', Lang:t("comm.addper"), { { name = Lang:t("comm.addper_id"), help = Lang:t("comm.addper_idh") }, { name = Lang:t("comm.addper_per"), help = Lang:t("comm.addper_perh") } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
local permission = tostring(args[2]):lower()
if Player then
@@ -136,7 +136,7 @@ QBCore.Commands.Add('addpermission', 'Give Player Permissions (God Only)', { { n
end
end, 'god')
QBCore.Commands.Add('removepermission', 'Remove Players Permissions (God Only)', { { name = 'id', help = 'ID of player' }, { name = 'permission', help = 'Permission level' } }, true, function(source, args)
QBCore.Commands.Add('removepermission', Lang:t("comm.rper"), { { name = Lang:t("comm.rper_id"), help = Lang:t("comm.rper_idh") }, { name = Lang:t("comm.rper_per"), help = Lang:t("comm.rper_perh") } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
local permission = tostring(args[2]):lower()
if Player then
@@ -148,7 +148,7 @@ end, 'god')
-- Open & Close Server
QBCore.Commands.Add('openserver', 'Open the server for everyone (Admin Only)', {}, false, function(source)
QBCore.Commands.Add('openserver', Lang:t("comm.opserv"), {}, false, function(source)
if not QBCore.Config.Server.Closed then
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.server_already_open'), 'error')
return
@@ -157,11 +157,11 @@ QBCore.Commands.Add('openserver', 'Open the server for everyone (Admin Only)', {
QBCore.Config.Server.Closed = false
TriggerClientEvent('QBCore:Notify', source, Lang:t('success.server_opened'), 'success')
else
QBCore.Functions.Kick(source, 'You don\'t have permissions for this..', nil, nil)
QBCore.Functions.Kick(source, Lang:t("error.noperm"), nil, nil)
end
end, 'admin')
QBCore.Commands.Add('closeserver', 'Close the server for people without permissions (Admin Only)', { { name = 'reason', help = 'Reason for closing it (optional)' } }, false, function(source, args)
QBCore.Commands.Add('closeserver', Lang:t("comm.cserv"), {{ name = Lang:t("comm.cserv_r"), help = Lang:t("comm.cserv_rh")}}, false, function(source, args)
if QBCore.Config.Server.Closed then
TriggerClientEvent('QBCore:Notify', source, Lang:t('error.server_already_closed'), 'error')
return
@@ -177,23 +177,23 @@ QBCore.Commands.Add('closeserver', 'Close the server for people without permissi
end
TriggerClientEvent('QBCore:Notify', source, Lang:t('success.server_closed'), 'success')
else
QBCore.Functions.Kick(source, 'You don\'t have permissions for this..', nil, nil)
QBCore.Functions.Kick(source, Lang:t("error.noperm"), nil, nil)
end
end, 'admin')
-- Vehicle
QBCore.Commands.Add('car', 'Spawn Vehicle (Admin Only)', { { name = 'model', help = 'Model name of the vehicle' } }, true, function(source, args)
QBCore.Commands.Add('car', Lang:t("comm.car"), {{ name = Lang:t("comm.car_m"), help = Lang:t("comm.car_mh") }}, true, function(source, args)
TriggerClientEvent('QBCore:Command:SpawnVehicle', source, args[1])
end, 'admin')
QBCore.Commands.Add('dv', 'Delete Vehicle (Admin Only)', {}, false, function(source)
QBCore.Commands.Add('dv', Lang:t("comm.dv"), {}, false, function(source)
TriggerClientEvent('QBCore:Command:DeleteVehicle', source)
end, 'admin')
-- Money
QBCore.Commands.Add('givemoney', 'Give A Player Money (Admin Only)', { { name = 'id', help = 'Player ID' }, { name = 'moneytype', help = 'Type of money (cash, bank, crypto)' }, { name = 'amount', help = 'Amount of money' } }, true, function(source, args)
QBCore.Commands.Add('givemoney', Lang:t("comm.gm"), { { name = Lang:t("comm.gm_id"), help = Lang:t("comm.gm_idh") }, { name = Lang:t("comm.gm_mt"), help = Lang:t("comm.gm_mth") }, { name = Lang:t("comm.gm_a"), help = Lang:t("comm.gm_ah") } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
Player.Functions.AddMoney(tostring(args[2]), tonumber(args[3]))
@@ -202,7 +202,7 @@ QBCore.Commands.Add('givemoney', 'Give A Player Money (Admin Only)', { { name =
end
end, 'admin')
QBCore.Commands.Add('setmoney', 'Set Players Money Amount (Admin Only)', { { name = 'id', help = 'Player ID' }, { name = 'moneytype', help = 'Type of money (cash, bank, crypto)' }, { name = 'amount', help = 'Amount of money' } }, true, function(source, args)
QBCore.Commands.Add('setmoney', Lang:t("comm.sm"), { { name = Lang:t("comm.sm_id"), help = Lang:t("comm.sm_idh") }, { name = Lang:t("comm.sm_mt"), help = Lang:t("comm.sm_mth") }, { name = Lang:t("comm.sm_a"), help = Lang:t("comm.sm_ah") } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
Player.Functions.SetMoney(tostring(args[2]), tonumber(args[3]))
@@ -213,12 +213,12 @@ end, 'admin')
-- Job
QBCore.Commands.Add('job', 'Check Your Job', {}, false, function(source)
QBCore.Commands.Add('job', Lang:t("comm.job"), {}, false, function(source)
local PlayerJob = QBCore.Functions.GetPlayer(source).PlayerData.job
TriggerClientEvent('QBCore:Notify', source, Lang:t('info.job_info', {value = PlayerJob.label, value2 = PlayerJob.grade.name, value3 = PlayerJob.onduty}))
end, 'user')
QBCore.Commands.Add('setjob', 'Set A Players Job (Admin Only)', { { name = 'id', help = 'Player ID' }, { name = 'job', help = 'Job name' }, { name = 'grade', help = 'Grade' } }, true, function(source, args)
QBCore.Commands.Add('setjob', Lang:t("comm.sjob"), { { name = Lang:t("comm.sjob_id"), help = Lang:t("comm.sjob_idh") }, { name = Lang:t("comm.sjob_j"), help = Lang:t("comm.sjob_jh") }, { name = Lang:t("comm.sjob_g"), help = Lang:t("comm.sjob_gh") } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
Player.Functions.SetJob(tostring(args[2]), tonumber(args[3]))
@@ -234,7 +234,7 @@ QBCore.Commands.Add('gang', 'Check Your Gang', {}, false, function(source)
TriggerClientEvent('QBCore:Notify', source, Lang:t('info.gang_info', {value = PlayerGang.label, value2 = PlayerGang.grade.name}))
end, 'user')
QBCore.Commands.Add('setgang', 'Set A Players Gang (Admin Only)', { { name = 'id', help = 'Player ID' }, { name = 'gang', help = 'Name of a gang' }, { name = 'grade', help = 'Grade' } }, true, function(source, args)
QBCore.Commands.Add('setgang', Lang:t("comm.sg"), { { name = Lang:t("comm.sg_id"), help = Lang:t("comm.sg_idh") }, { name = Lang:t("comm.sg_g"), help = Lang:t("comm.sg_gh") }, { name = Lang:t("comm.sg_gr"), help = Lang:t("comm.sg_grh") } }, true, function(source, args)
local Player = QBCore.Functions.GetPlayer(tonumber(args[1]))
if Player then
Player.Functions.SetGang(tostring(args[2]), tonumber(args[3]))
@@ -278,7 +278,7 @@ end, 'user')
-- Me command
QBCore.Commands.Add('me', 'Show local message', {{name = 'message', help = 'Message to respond with'}}, false, function(source, args)
QBCore.Commands.Add('me', Lang:t("comm.me"), {{name = Lang:t("comm.me_m"), help = Lang:t("comm.me_mh")}}, false, function(source, args)
if #args < 1 then TriggerClientEvent('QBCore:Notify', source, Lang:t('error.missing_args2'), 'error') return end
local ped = GetPlayerPed(source)
local pCoords = GetEntityCoords(ped)
+2 -2
View File
@@ -87,7 +87,7 @@ RegisterNetEvent('QBCore:Server:CloseServer', function(reason)
end
end
else
QBCore.Functions.Kick(src, 'You don\'t have permissions for this..', nil, nil)
QBCore.Functions.Kick(src, Lang:t("error.noperm"), nil, nil)
end
end)
@@ -96,7 +96,7 @@ RegisterNetEvent('QBCore:Server:OpenServer', function()
if QBCore.Functions.HasPermission(src, 'admin') then
QBCore.Config.Server.Closed = false
else
QBCore.Functions.Kick(src, 'You don\'t have permissions for this..', nil, nil)
QBCore.Functions.Kick(src, Lang:t("error.noperm"), nil, nil)
end
end)
+1 -1
View File
@@ -328,7 +328,7 @@ local function ExploitBan(playerId, origin)
2147483647,
'Anti Cheat'
})
DropPlayer(playerId, "You have been banned for cheating. Check our Discord for more information: " .. QBCore.Config.Server.Discord)
DropPlayer(playerId, Lang:t('info.skick', {discord = QBCore.Config.Server.Discord}))
TriggerEvent("qb-log:server:CreateLog", "anticheat", "Anti-Cheat", "red", name .. " has been banned for exploiting " .. origin, true)
end
+2 -2
View File
@@ -23,7 +23,7 @@ function QBCore.Player.Login(source, citizenid, newData)
end
QBCore.Player.CheckPlayerData(source, PlayerData)
else
DropPlayer(source, 'You Have Been Kicked For Exploitation')
DropPlayer(source, Lang:t("info.pdexp"))
TriggerEvent('qb-log:server:CreateLog', 'anticheat', 'Anti-Cheat', 'white', GetPlayerName(source) .. ' Has Been Dropped For Character Joining Exploit', false)
end
else
@@ -553,7 +553,7 @@ function QBCore.Player.DeleteCharacter(source, citizenid)
end
end)
else
DropPlayer(source, 'You Have Been Kicked For Exploitation')
DropPlayer(source, Lang:t("info.pdexp"))
TriggerEvent('qb-log:server:CreateLog', 'anticheat', 'Anti-Cheat', 'white', GetPlayerName(source) .. ' Has Been Dropped For Character Deletion Exploit', true)
end
end