mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 02:01:31 +00:00
Merge: refactor(esx_multicharacter): complete UI/Backend overhaul
refactor(esx_multicharacter): complete UI/Backend overhaul
This commit is contained in:
@@ -1,13 +1,3 @@
|
||||
|
||||
-- Connection Logic
|
||||
|
||||
local function AwaitContext()
|
||||
while GetResourceState("esx_context") ~= "started" do
|
||||
Wait(100)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
CreateThread(function()
|
||||
|
||||
while not ESX.PlayerLoaded do
|
||||
@@ -16,13 +6,8 @@ CreateThread(function()
|
||||
if NetworkIsPlayerActive(ESX.playerId) then
|
||||
ESX.DisableSpawnManager()
|
||||
DoScreenFadeOut(0)
|
||||
|
||||
local ready = AwaitContext()
|
||||
if ready then
|
||||
|
||||
Multicharacter:SetupCharacters()
|
||||
break
|
||||
end
|
||||
Multicharacter:SetupCharacters()
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
Menu = {}
|
||||
Menu._index = Menu
|
||||
Menu.currentElements = {}
|
||||
|
||||
function Menu:OpenMenu()
|
||||
ESX.OpenContext("left", self.currentElements, self.onUse, nil, false)
|
||||
end
|
||||
|
||||
function Menu:Close()
|
||||
self.currentElements = {}
|
||||
ESX.CloseContext()
|
||||
end
|
||||
|
||||
function Menu:CheckModel(character)
|
||||
if not character.model and character.skin then
|
||||
@@ -23,18 +12,6 @@ function Menu:CheckModel(character)
|
||||
end
|
||||
end
|
||||
|
||||
function Menu:AddCharacters()
|
||||
for _, v in pairs(Multicharacter.Characters) do
|
||||
self:CheckModel(v)
|
||||
|
||||
local label = ("%s %s"):format(v.firstname, v.lastname)
|
||||
self.currentElements[#self.currentElements + 1] = { title = label, icon = "fa-regular fa-user", value = v.id}
|
||||
end
|
||||
if #self.currentElements - 1 < Multicharacter.slots then
|
||||
self.currentElements[#self.currentElements + 1] = { title = TranslateCap("create_char"), icon = "fa-solid fa-plus", value = (#self.currentElements + 1), new = true }
|
||||
end
|
||||
end
|
||||
|
||||
local GetSlot = function()
|
||||
for i = 1, Multicharacter.slots do
|
||||
if not Multicharacter.Characters[i] then
|
||||
@@ -44,7 +21,6 @@ local GetSlot = function()
|
||||
end
|
||||
|
||||
function Menu:NewCharacter()
|
||||
self:Close()
|
||||
local slot = GetSlot()
|
||||
|
||||
TriggerServerEvent("esx_multicharacter:CharacterChosen", slot, true)
|
||||
@@ -59,7 +35,7 @@ function Menu:NewCharacter()
|
||||
end
|
||||
|
||||
|
||||
function Menu:SelectCharacter()
|
||||
function Menu:InitCharacter()
|
||||
local Characters = Multicharacter.Characters
|
||||
local Character = next(Characters)
|
||||
self:CheckModel(Characters[Character])
|
||||
@@ -67,125 +43,35 @@ function Menu:SelectCharacter()
|
||||
if not Multicharacter.spawned then
|
||||
Multicharacter:SetupCharacter(Character)
|
||||
end
|
||||
|
||||
self.currentElements = {
|
||||
{
|
||||
title = TranslateCap("select_char"),
|
||||
icon = "fa-solid fa-users",
|
||||
description = TranslateCap("select_char_description"),
|
||||
unselectable = true
|
||||
Wait(500)
|
||||
|
||||
SendNUIMessage({
|
||||
action = "ToggleMulticharacter",
|
||||
data = {
|
||||
show = true,
|
||||
Characters = Characters,
|
||||
CanDelete = Config.CanDelete,
|
||||
AllowedSlot = Multicharacter.slots,
|
||||
Locale = Locales[Config.Locale].UI,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
self:AddCharacters()
|
||||
self.onUse = function(_, SelectedCharacter)
|
||||
if SelectedCharacter.new then
|
||||
self:NewCharacter()
|
||||
else
|
||||
if SelectedCharacter.value ~= Multicharacter.spawned then
|
||||
Multicharacter:SetupCharacter(SelectedCharacter.value)
|
||||
local playerPed = PlayerPedId()
|
||||
SetPedAoBlobRendering(playerPed, true)
|
||||
ResetEntityAlpha(playerPed)
|
||||
end
|
||||
self:CharacterOptions()
|
||||
end
|
||||
end
|
||||
|
||||
self:OpenMenu()
|
||||
SetNuiFocus(true, true)
|
||||
end
|
||||
|
||||
|
||||
function Menu:CharacterOptions()
|
||||
local currentCharacter = Multicharacter.Characters[Multicharacter.spawned]
|
||||
local elements = {
|
||||
{
|
||||
title = TranslateCap("character", currentCharacter.firstname .. " " .. currentCharacter.lastname),
|
||||
icon = "fa-regular fa-user",
|
||||
unselectable = true
|
||||
},
|
||||
{
|
||||
title = TranslateCap("return"),
|
||||
unselectable = false,
|
||||
icon = "fa-solid fa-arrow-left",
|
||||
description = TranslateCap("return_description"),
|
||||
action = "return"
|
||||
},
|
||||
}
|
||||
|
||||
if not currentCharacter.disabled then
|
||||
elements[3] = {
|
||||
title = TranslateCap("char_play"),
|
||||
description = TranslateCap("char_play_description"),
|
||||
icon = "fa-solid fa-play",
|
||||
action = "play",
|
||||
}
|
||||
else
|
||||
elements[3] = {
|
||||
title = TranslateCap("char_disabled"),
|
||||
icon = "fa-solid fa-xmark",
|
||||
description = TranslateCap("char_disabled_description")
|
||||
}
|
||||
end
|
||||
if Config.CanDelete then
|
||||
elements[4] = {
|
||||
title = TranslateCap("char_delete"),
|
||||
icon = "fa-solid fa-xmark",
|
||||
description = TranslateCap("char_delete_description"),
|
||||
action = "delete",
|
||||
}
|
||||
end
|
||||
|
||||
self.currentElements = elements
|
||||
self.onUse = function(_, Action)
|
||||
if Action.action == "play" then
|
||||
Multicharacter:CloseUI()
|
||||
self:Close()
|
||||
|
||||
TriggerServerEvent("esx_multicharacter:CharacterChosen", Multicharacter.spawned, false)
|
||||
elseif Action.action == "delete" then
|
||||
self:ConfirmDeletion()
|
||||
elseif Action.action == "return" then
|
||||
self:SelectCharacter()
|
||||
end
|
||||
end
|
||||
|
||||
self:OpenMenu()
|
||||
function Menu:SelectCharacter(index)
|
||||
Multicharacter:SetupCharacter(index)
|
||||
local playerPed = PlayerPedId()
|
||||
SetPedAoBlobRendering(playerPed, true)
|
||||
ResetEntityAlpha(playerPed)
|
||||
end
|
||||
|
||||
function Menu:ConfirmDeletion()
|
||||
self.currentElements = {
|
||||
{
|
||||
title = TranslateCap("char_delete_confirmation"),
|
||||
icon = "fa-solid fa-users",
|
||||
description = TranslateCap("char_delete_confirmation_description"),
|
||||
unselectable = true
|
||||
},
|
||||
{
|
||||
title = TranslateCap("char_delete"),
|
||||
icon = "fa-solid fa-xmark",
|
||||
description = TranslateCap("char_delete_yes_description"),
|
||||
action = "delete",
|
||||
},
|
||||
{
|
||||
title = TranslateCap("return"),
|
||||
unselectable = false,
|
||||
icon = "fa-solid fa-arrow-left",
|
||||
description = TranslateCap("char_delete_no_description"),
|
||||
action = "return"
|
||||
},
|
||||
}
|
||||
function Menu:PlayCharacter()
|
||||
Multicharacter:CloseUI()
|
||||
TriggerServerEvent("esx_multicharacter:CharacterChosen", Multicharacter.spawned, false)
|
||||
end
|
||||
|
||||
self.onUse = function(_, Action)
|
||||
if Action.action == "delete" then
|
||||
self:Close()
|
||||
|
||||
TriggerServerEvent("esx_multicharacter:DeleteCharacter", Multicharacter.spawned)
|
||||
Multicharacter.spawned = false
|
||||
elseif Action.action == "return" then
|
||||
self:CharacterOptions()
|
||||
end
|
||||
end
|
||||
|
||||
self:OpenMenu()
|
||||
function Menu:DeleteCharacter()
|
||||
TriggerServerEvent("esx_multicharacter:DeleteCharacter", Multicharacter.spawned)
|
||||
Multicharacter.spawned = false
|
||||
end
|
||||
@@ -12,8 +12,8 @@ function Multicharacter:SetupCamera()
|
||||
|
||||
local offset = GetOffsetFromEntityInWorldCoords(self.playerPed, 0, 1.7, 0.4)
|
||||
|
||||
SetCamCoord(self.cam, offset.x, offset.y, offset.z)
|
||||
PointCamAtCoord(self.cam, self.spawnCoords.x, self.spawnCoords.y, self.spawnCoords.z + 1.3)
|
||||
SetCamCoord(self.cam, offset.x + 0.7, offset.y , offset.z)
|
||||
PointCamAtCoord(self.cam, self.spawnCoords.x + 0.4, self.spawnCoords.y, self.spawnCoords.z + 1.3)
|
||||
end
|
||||
|
||||
function Multicharacter:AwaitFadeIn()
|
||||
@@ -116,6 +116,10 @@ function Multicharacter:ChangeExistingPed()
|
||||
local newCharacter = self.Characters[self.tempIndex]
|
||||
local spawnedCharacter = self.Characters[self.spawned]
|
||||
|
||||
if not newCharacter.model then
|
||||
newCharacter.model = newCharacter.sex == TranslateCap("male") and `mp_m_freemode_01` or `mp_f_freemode_01`
|
||||
end
|
||||
|
||||
if spawnedCharacter and spawnedCharacter.model then
|
||||
local model = ESX.Streaming.RequestModel(newCharacter.model)
|
||||
if model then
|
||||
@@ -123,7 +127,6 @@ function Multicharacter:ChangeExistingPed()
|
||||
SetModelAsNoLongerNeeded(newCharacter.model)
|
||||
end
|
||||
end
|
||||
|
||||
TriggerEvent("skinchanger:loadSkin", newCharacter.skin)
|
||||
end
|
||||
|
||||
@@ -135,8 +138,12 @@ end
|
||||
|
||||
function Multicharacter:CloseUI()
|
||||
SendNUIMessage({
|
||||
action = "closeui",
|
||||
action = "ToggleMulticharacter",
|
||||
data = {
|
||||
show = false
|
||||
}
|
||||
})
|
||||
SetNuiFocus(false, false)
|
||||
end
|
||||
|
||||
function Multicharacter:SetupCharacter(index)
|
||||
@@ -152,10 +159,6 @@ function Multicharacter:SetupCharacter(index)
|
||||
self.spawned = index
|
||||
self.playerPed = PlayerPedId()
|
||||
self:PrepForUI()
|
||||
SendNUIMessage({
|
||||
action = "openui",
|
||||
character = character,
|
||||
})
|
||||
end
|
||||
|
||||
function Multicharacter:SetupUI(characters, slots)
|
||||
@@ -180,7 +183,7 @@ function Multicharacter:SetupUI(characters, slots)
|
||||
TriggerEvent("esx_identity:showRegisterIdentity")
|
||||
end)
|
||||
else
|
||||
Menu:SelectCharacter()
|
||||
Menu:InitCharacter()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
RegisterNuiCallback('SelectCharacter', function (data, cb)
|
||||
local selectedIndex = tonumber(data.id)
|
||||
|
||||
if selectedIndex then
|
||||
Menu:SelectCharacter(selectedIndex)
|
||||
end
|
||||
cb('ok')
|
||||
end)
|
||||
|
||||
RegisterNuiCallback('PlayCharacter', function (data, cb)
|
||||
Menu:PlayCharacter()
|
||||
cb('ok')
|
||||
end)
|
||||
|
||||
RegisterNuiCallback('DeleteCharacter', function (data, cb)
|
||||
Menu:DeleteCharacter()
|
||||
cb('ok')
|
||||
end)
|
||||
|
||||
RegisterNuiCallback('CreateCharacter', function (data, cb)
|
||||
Menu:NewCharacter()
|
||||
cb('ok')
|
||||
end)
|
||||
@@ -7,7 +7,7 @@ Config.CanDelete = true
|
||||
if IsDuplicityVersion() then
|
||||
-- This is the default number of slots for EVERY player
|
||||
-- If you want to manage extra slots for specific players you can do it by using '/setslots' and '/remslots' commands
|
||||
Config.Slots = 4
|
||||
Config.Slots = 3
|
||||
--------------------
|
||||
|
||||
-- Text to prepend to each character (char#:identifier) - keep it short
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
fx_version 'cerulean'
|
||||
|
||||
game 'gta5'
|
||||
author 'ESX-Framework - Linden - KASH'
|
||||
description 'Allows players to have multiple characters on the same account.'
|
||||
@@ -21,6 +20,6 @@ client_scripts {
|
||||
'client/*.lua'
|
||||
}
|
||||
|
||||
ui_page { 'html/ui.html' }
|
||||
ui_page 'web/build/index.html'
|
||||
|
||||
files { 'html/ui.html', 'html/css/main.css', 'html/js/app.js', 'html/locales/*.js' }
|
||||
files { 'web/build/index.html', 'web/build/**/*.*'}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@300;600&display=swap");
|
||||
@import url("https://fonts.googleapis.com/css2?family=Oswald&display=swap");
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
user-select: none;
|
||||
color: rgb(255, 255, 255);
|
||||
border-radius: 15px;
|
||||
font-weight: 300;
|
||||
font-size: 1.6vh;
|
||||
font-family: Calibri, "Helvetica", san-serif;
|
||||
}
|
||||
|
||||
html {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
body {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.main-container {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 150;
|
||||
transform: translate(0, -50%);
|
||||
border-radius: 15px;
|
||||
background: rgba(15, 15, 15, 0.9);
|
||||
}
|
||||
|
||||
.header {
|
||||
font-family: "Oswald", sans-serif;
|
||||
position: absolute;
|
||||
background: rgba(10, 10, 10, 0.9);
|
||||
border-radius: 15px 15px 0px 0px;
|
||||
height: 10%;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
text-align: center;
|
||||
transform: translate(-50%);
|
||||
font-weight: 700;
|
||||
padding-bottom: 5px;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
.footer {
|
||||
position: absolute;
|
||||
font-size: 0rem;
|
||||
}
|
||||
|
||||
.character-box {
|
||||
display: flex;
|
||||
right: 0;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
line-height: 1.4rem;
|
||||
height: calc(30rem);
|
||||
width: 17rem;
|
||||
border: 1px rgba(10, 10, 10, 0.7) solid;
|
||||
box-shadow: 2px 1px 9px 3px rgba(10, 10, 10, 0.7);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: "Oswald", sans-serif;
|
||||
font-size: 22px;
|
||||
padding-top: 1.3rem;
|
||||
display: block;
|
||||
font-weight: 0;
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
var money = Intl.NumberFormat("en-US", {
|
||||
style: "currency",
|
||||
currency: "USD",
|
||||
minimumFractionDigits: 0,
|
||||
});
|
||||
|
||||
(() => {
|
||||
Kashacter = {};
|
||||
|
||||
Kashacter.ShowUI = function (data) {
|
||||
$("body").css({ display: "block" });
|
||||
$(".main-container").css({ display: "block" });
|
||||
$("[data-charid=1]")
|
||||
.html(
|
||||
'<div class="character-info"><p class="character-info-name"><h1>' +
|
||||
`${translate.name} ` +
|
||||
"</h1><span>" +
|
||||
data.firstname +
|
||||
" " +
|
||||
data.lastname +
|
||||
'</span></p><p class="character-info-work"><h1>' +
|
||||
`${translate.job} ` +
|
||||
"</h1><span>" +
|
||||
data.job +
|
||||
" " +
|
||||
data.job_grade +
|
||||
'</span></p><p class="character-info-money"><h1>' +
|
||||
`${translate.money} ` +
|
||||
"</h1><span> " +
|
||||
money.format(data.money) +
|
||||
'</span></p><p class="character-info-bank"><h1>' +
|
||||
`${translate.bank} ` +
|
||||
"</h1><span> " +
|
||||
money.format(data.bank) +
|
||||
'</span></p> <p class="character-info-dateofbirth"><h1>' +
|
||||
`${translate.dob} ` +
|
||||
"</h1><span>" +
|
||||
data.dateofbirth +
|
||||
'</span></p> <p class="character-info-gender"><h1>' +
|
||||
`${translate.gender} ` +
|
||||
"</h1><span>" +
|
||||
data.sex +
|
||||
"</span></p></div>"
|
||||
)
|
||||
.attr("data-ischar", "true");
|
||||
};
|
||||
|
||||
Kashacter.CloseUI = function () {
|
||||
$("body").css({ display: "none" });
|
||||
$(".main-container").css({ display: "none" });
|
||||
$("[data-charid=1]").html('<h3 class="character-fullname"></h3><div class="character-info"><p class="character-info-new"></p></div>');
|
||||
};
|
||||
|
||||
window.onload = function (e) {
|
||||
window.addEventListener("message", function (event) {
|
||||
switch (event.data.action) {
|
||||
case "openui":
|
||||
Kashacter.ShowUI(event.data.character);
|
||||
break;
|
||||
case "closeui":
|
||||
Kashacter.CloseUI();
|
||||
break;
|
||||
}
|
||||
});
|
||||
};
|
||||
})();
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Jméno";
|
||||
translate.job = "Práce";
|
||||
translate.bank = "Banka";
|
||||
translate.money = "Peníze";
|
||||
translate.gender = "Pohlaví";
|
||||
translate.dob = "Datum narození";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Name";
|
||||
translate.job = "Beruf";
|
||||
translate.bank = "Bankguthaben";
|
||||
translate.money = "Bargeld";
|
||||
translate.gender = "Geschlecht";
|
||||
translate.dob = "Geburtsdatum";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Name";
|
||||
translate.job = "Job";
|
||||
translate.bank = "Bank";
|
||||
translate.money = "Cash";
|
||||
translate.gender = "Gender";
|
||||
translate.dob = "Date of birth";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Nombre";
|
||||
translate.job = "Trabajo";
|
||||
translate.bank = "Banco";
|
||||
translate.money = "Dinero";
|
||||
translate.gender = "Género";
|
||||
translate.dob = "Fecha de nacimiento";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Nimi";
|
||||
translate.job = "Työ";
|
||||
translate.bank = "Pankki";
|
||||
translate.money = "Käteinen";
|
||||
translate.gender = "Sukupuoli";
|
||||
translate.dob = "Syntymäaika";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Nom";
|
||||
translate.job = "Métier";
|
||||
translate.bank = "Banque";
|
||||
translate.money = "Argent";
|
||||
translate.gender = "Sexe";
|
||||
translate.dob = "Date de naissance";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Név";
|
||||
translate.job = "Munka";
|
||||
translate.bank = "Bank";
|
||||
translate.money = "Készpénz";
|
||||
translate.gender = "Nem";
|
||||
translate.dob = "Születési idő";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Nome";
|
||||
translate.job = "Lavoro";
|
||||
translate.bank = "Banca";
|
||||
translate.money = "Contanti";
|
||||
translate.gender = "Genere";
|
||||
translate.dob = "Data di nascita";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Naam";
|
||||
translate.job = "Job";
|
||||
translate.bank = "Bank";
|
||||
translate.money = "Cash";
|
||||
translate.gender = "Gender";
|
||||
translate.dob = "Geboortedatum";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "imię";
|
||||
translate.job = "Zajęcie";
|
||||
translate.bank = "Bank";
|
||||
translate.money = "Gotówka";
|
||||
translate.gender = "Seks";
|
||||
translate.dob = "Data urodzenia";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Nome";
|
||||
translate.job = "Trabalho";
|
||||
translate.bank = "Banco";
|
||||
translate.money = "Dinheiro";
|
||||
translate.gender = "Género";
|
||||
translate.dob = "Data de Nascimento";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Ime";
|
||||
translate.job = "Posao";
|
||||
translate.bank = "Banka";
|
||||
translate.money = "Novac";
|
||||
translate.gender = "Pol";
|
||||
translate.dob = "Datum rodjenja";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Namn";
|
||||
translate.job = "Jobb";
|
||||
translate.bank = "Bank";
|
||||
translate.money = "Kontanter";
|
||||
translate.gender = "Kön";
|
||||
translate.dob = "Födelsedatum";
|
||||
@@ -1,8 +0,0 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "我的姓名";
|
||||
translate.job = "我的职业";
|
||||
translate.bank = "银行存款";
|
||||
translate.money = "手持现金";
|
||||
translate.gender = "我的性别";
|
||||
translate.dob = "出生日期";
|
||||
@@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
<!-- Custom CSS -->
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css" />
|
||||
<!-- Locales -->
|
||||
<script src="locales/en.js"></script>
|
||||
</head>
|
||||
<body style="display: none">
|
||||
<div class="main-container">
|
||||
<div class="header">Character Info</div>
|
||||
<div class="character-box" data-charid="1">
|
||||
<h3 class="character-fullname"></h3>
|
||||
<div class="character-info"></div>
|
||||
</div>
|
||||
<div class="footer">Multicharacter</div>
|
||||
</div>
|
||||
<script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script src="js/app.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +1,22 @@
|
||||
Locales["cs"] = {
|
||||
["male"] = "Muž",
|
||||
["female"] = "Žena",
|
||||
["select_char"] = "Zvolit Postavu",
|
||||
["select_char_description"] = "Zvol si postavu za kterou budeš hrát.",
|
||||
["create_char"] = "Vytvořit Novou Postavu",
|
||||
["char_play"] = "Hrát za postavu",
|
||||
["char_play_description"] = "Pokračovat do města.",
|
||||
["char_disabled"] = "Tato postava je zakázána!",
|
||||
["char_disabled_description"] = "Tuto postavu nemůžeš používat.",
|
||||
["char_delete"] = "Vymazat postavu",
|
||||
["char_delete_description"] = "Na vždy smazat tuto postavu.",
|
||||
["character"] = "Postava: %s",
|
||||
["return"] = "Zpět",
|
||||
["return_description"] = "Vrátit se na vybírání postav.",
|
||||
["command_setslots"] = "Nastavit sloty pro hráče v multicharacteru",
|
||||
["command_remslots"] = "Odebrat sloty pro hráče v multicharacteru",
|
||||
["command_enablechar"] = "Povolit zvolený slot hráči",
|
||||
["command_disablechar"] = "Zakázat zvolený slot pro hrače",
|
||||
["command_charslot"] = "Číslo slotu",
|
||||
["command_identifier"] = "Identifier hráče",
|
||||
["command_slots"] = "# ze slotu",
|
||||
["slotsadd"] = "Nastavil si slot %s hráči %s",
|
||||
["slotsrem"] = "Odebral si slot %s",
|
||||
["charenabled"] = "Povolil si postavu #%s z %s",
|
||||
["chardisabled"] = "Zakázal si postavu #%s z %s",
|
||||
["charnotfound"] = "Postava #%s z %s nebyla nalezena/neexistuje",
|
||||
["command_setslots"] = "Nastavit počet multicharakterových slotů hráče",
|
||||
["command_remslots"] = "Odebrat počet multicharakterových slotů hráče",
|
||||
["command_enablechar"] = "Povolit danou postavu hráče",
|
||||
["command_disablechar"] = "Zakázat danou postavu hráče",
|
||||
["command_charslot"] = "Číslo slotu postavy",
|
||||
["command_identifier"] = "Identifikátor hráče",
|
||||
["command_slots"] = "Počet slotů",
|
||||
["slotsadd"] = "Nastavil jsi %s slotů pro %s",
|
||||
["slotsrem"] = "Odebral jsi sloty pro %s",
|
||||
["charenabled"] = "Povolil jsi postavu #%s hráče %s",
|
||||
["chardisabled"] = "Zakázal jsi postavu #%s hráče %s",
|
||||
["charnotfound"] = "Postava #%s hráče %s neexistuje",
|
||||
|
||||
UI = {
|
||||
["title"] = "VÝBĚR POSTAVY",
|
||||
["char_info_title"] = "Informace o postavě",
|
||||
["play"] = "HRÁT",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["da"] = {
|
||||
["male"] = "Mand",
|
||||
["female"] = "Kvinde",
|
||||
["select_char"] = "Vælg karakter",
|
||||
["select_char_description"] = "Vælg en karakter at spille som.",
|
||||
["create_char"] = "Ny Karakter",
|
||||
["char_play"] = "Spil",
|
||||
["char_play_description"] = "Fortsæt ind i byen.",
|
||||
["char_disabled"] = "Deaktiveret",
|
||||
["char_disabled_description"] = "Denne karakter er ubrugelig.",
|
||||
["char_delete"] = "Slet",
|
||||
["char_delete_description"] = "Fjern denne karakter permanent.",
|
||||
["char_delete_confirmation"] = "Slet bekræftelse",
|
||||
["char_delete_confirmation_description"] = "Er du sikker på at fjerne det valgte karakter?",
|
||||
["char_delete_yes_description"] = "Ja, jeg er sikker på at fjerne det valgte karakter",
|
||||
["char_delete_no_description"] = "Nej, vend tilbage til karakter-indstillinger",
|
||||
["character"] = "Karakter: %s",
|
||||
["return"] = "Tilbage",
|
||||
["return_description"] = "Vend tilbage til valg af karaktere.",
|
||||
["command_setslots"] = "Indstil flerkarakters slotsnummer for en spiller",
|
||||
["command_remslots"] = "Fjern flerkarakters slotsnummer for en spiller",
|
||||
["command_enablechar"] = "Aktiver en valgt karakter af en spiller",
|
||||
["command_disablechar"] = "Deaktiver en valgt karakter af en spiller",
|
||||
["command_charslot"] = "Karakterens plads nummer",
|
||||
["command_identifier"] = "Spiller identifikator",
|
||||
["command_slots"] = "# af slots",
|
||||
["slotsadd"] = "Du indstillerde %s slots til %s",
|
||||
["slotsrem"] = "Du fjernede slots til %s",
|
||||
["charenabled"] = "Du aktiverede karakter #%s af %s",
|
||||
["chardisabled"] = "Du deaktiverede tegn #%s af %s",
|
||||
["charnotfound"] = "Karakter #%s af %s eksisterer ikke",
|
||||
["command_setslots"] = "Indstil antal multikarakter-slots for en spiller",
|
||||
["command_remslots"] = "Fjern antal multikarakter-slots for en spiller",
|
||||
["command_enablechar"] = "Aktivér en given karakter for en spiller",
|
||||
["command_disablechar"] = "Deaktivér en given karakter for en spiller",
|
||||
["command_charslot"] = "Karakterens slotnummer",
|
||||
["command_identifier"] = "Spillerens identifikator",
|
||||
["command_slots"] = "Antal slots",
|
||||
["slotsadd"] = "Du satte %s slots til %s",
|
||||
["slotsrem"] = "Du fjernede slots fra %s",
|
||||
["charenabled"] = "Du aktiverede karakter #%s for %s",
|
||||
["chardisabled"] = "Du deaktiverede karakter #%s for %s",
|
||||
["charnotfound"] = "Karakter #%s for %s findes ikke",
|
||||
|
||||
UI = {
|
||||
["title"] = "KARAKTERVALG",
|
||||
["char_info_title"] = "Karakterinformation",
|
||||
["play"] = "SPIL",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["de"] = {
|
||||
["male"] = "Männlich",
|
||||
["female"] = "Weiblich",
|
||||
["select_char"] = "Charakter auswählen",
|
||||
["select_char_description"] = "Wähle einen Charakter aus, mit den du spielen willst.",
|
||||
["create_char"] = "Neuer Charakter",
|
||||
["char_play"] = "Spielen",
|
||||
["char_play_description"] = "Weiter in die Stadt.",
|
||||
["char_disabled"] = "Deaktiviert",
|
||||
["char_disabled_description"] = "Dieser Charakter ist deaktiviert.",
|
||||
["char_delete"] = "Löschen",
|
||||
["char_delete_description"] = "Dieser Charakter wird dauerhaft entfernt.",
|
||||
["char_delete_confirmation"] = "Bestätigung zur Entfernung deines Charakters.",
|
||||
["char_delete_confirmation_description"] = "Bist du sicher, dass du den ausgewählten Charakter entfernen willst?",
|
||||
["char_delete_yes_description"] = "Ja, ich bin sicher, dass ich den ausgewählten Charakter lösche",
|
||||
["char_delete_no_description"] = "Nein, zurück zu den Charakteroptionen",
|
||||
["character"] = " Charakter: %s",
|
||||
["return"] = "Zurück",
|
||||
["return_description"] = "Zur Charakterauswahl zurückkehren.",
|
||||
["command_setslots"] = "Anzahl der Charakter-Slots eines Spielers festlegen",
|
||||
["command_remslots"] = "Die Anzahl der Charakter-Slots eines Spielers entfernen",
|
||||
["command_enablechar"] = "Aktiviere einen bestimmten Charakter eines Spielers",
|
||||
["command_disablechar"] = "Deaktiviere einen bestimmten Charakter eines Spielers",
|
||||
["command_charslot"] = "Slotnummer des Charakters",
|
||||
["command_identifier"] = "Spieler R* ID",
|
||||
["command_slots"] = "Anzahl von Charakter-Slots",
|
||||
["slotsadd"] = "Du hast %s Charakter-Slots auf %s gesetzt",
|
||||
["slotsrem"] = "Du hast &s Charakter-Slots auf %s entfernt",
|
||||
["charenabled"] = "Du hast den Charakter #%s von %s aktiviert",
|
||||
["chardisabled"] = "Du hast den Charakter #%s von %s deaktiviert",
|
||||
["charnotfound"] = "Charakter #%s von %s existiert nicht",
|
||||
}
|
||||
["male"] = "Männlich",
|
||||
["female"] = "Weiblich",
|
||||
["command_setslots"] = "Anzahl der Mehrcharakter-Slots eines Spielers festlegen",
|
||||
["command_remslots"] = "Anzahl der Mehrcharakter-Slots eines Spielers entfernen",
|
||||
["command_enablechar"] = "Einen bestimmten Charakter eines Spielers aktivieren",
|
||||
["command_disablechar"] = "Einen bestimmten Charakter eines Spielers deaktivieren",
|
||||
["command_charslot"] = "Slot-Nummer des Charakters",
|
||||
["command_identifier"] = "Spielerkennung",
|
||||
["command_slots"] = "Anzahl der Slots",
|
||||
["slotsadd"] = "Du hast %s Slots für %s festgelegt",
|
||||
["slotsrem"] = "Du hast Slots von %s entfernt",
|
||||
["charenabled"] = "Du hast Charakter #%s von %s aktiviert",
|
||||
["chardisabled"] = "Du hast Charakter #%s von %s deaktiviert",
|
||||
["charnotfound"] = "Charakter #%s von %s existiert nicht",
|
||||
|
||||
UI = {
|
||||
["title"] = "CHARAKTERAUSWAHL",
|
||||
["char_info_title"] = "Charakterinformation",
|
||||
["play"] = "SPIELEN",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,22 +1,6 @@
|
||||
Locales["en"] = {
|
||||
["male"] = "Male",
|
||||
["female"] = "Female",
|
||||
["select_char"] = "Select Character",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "New Character",
|
||||
["char_play"] = "Play",
|
||||
["char_play_description"] = "Continue Into The City.",
|
||||
["char_disabled"] = "Disabled",
|
||||
["char_disabled_description"] = "This Character Is Unusable.",
|
||||
["char_delete"] = "Delete",
|
||||
["char_delete_description"] = "Permanently Remove This Character.",
|
||||
["char_delete_confirmation"] = "Delete Confirmation",
|
||||
["char_delete_confirmation_description"] = "Are you sure removing selected character?",
|
||||
["char_delete_yes_description"] = "Yes, I am sure removing selected character",
|
||||
["char_delete_no_description"] = "No, return to character options",
|
||||
["character"] = "Character: %s",
|
||||
["return"] = "Return",
|
||||
["return_description"] = "Return To Character Selection.",
|
||||
["command_setslots"] = "Set multicharacter slots number of a player",
|
||||
["command_remslots"] = "Remove multicharacter slots number of a player",
|
||||
["command_enablechar"] = "Enable a given character of a player",
|
||||
@@ -29,4 +13,10 @@ Locales["en"] = {
|
||||
["charenabled"] = "You enabled character #%s of %s",
|
||||
["chardisabled"] = "You disabled character #%s of %s",
|
||||
["charnotfound"] = "Character #%s of %s doesn't exist",
|
||||
|
||||
UI = {
|
||||
["title"] = "CHARACTER SELECTION",
|
||||
["char_info_title"] = "Character Info",
|
||||
["play"] = "PLAY",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,22 @@
|
||||
Locales["es"] = {
|
||||
["male"] = "Masculino",
|
||||
["female"] = "Femenino",
|
||||
["select_char"] = "Seleccionar personaje",
|
||||
["select_char_description"] = "Selecciona un personaje para jugar.",
|
||||
["create_char"] = "Crear nuevo personaje",
|
||||
["char_play"] = "Seleccionar personaje",
|
||||
["char_play_description"] = "Ingresar a la ciudad.",
|
||||
["char_disabled"] = "Este personaje está deshabilitado",
|
||||
["char_disabled_description"] = "Este personaje no se encuentra disponible.",
|
||||
["char_delete"] = "Borrar el personaje seleccionado",
|
||||
["char_delete_description"] = "Eliminar este personaje.",
|
||||
["character"] = "Personaje: %s",
|
||||
["return"] = "Volver",
|
||||
["return_description"] = "Volver a la selección de personajes.",
|
||||
["command_setslots"] = "Establecer el numero de slots de un jugador",
|
||||
["command_remslots"] = "Elimina slots de un jugador.",
|
||||
["command_enablechar"] = "Activar el personaje de un jugador",
|
||||
["command_disablechar"] = "Deshabilitar personaje al jugador.",
|
||||
["command_charslot"] = "Número de slot del personaje",
|
||||
["male"] = "Hombre",
|
||||
["female"] = "Mujer",
|
||||
["command_setslots"] = "Establecer número de ranuras multicaracter para un jugador",
|
||||
["command_remslots"] = "Eliminar número de ranuras multicaracter para un jugador",
|
||||
["command_enablechar"] = "Habilitar un personaje específico de un jugador",
|
||||
["command_disablechar"] = "Deshabilitar un personaje específico de un jugador",
|
||||
["command_charslot"] = "Número de ranura del personaje",
|
||||
["command_identifier"] = "Identificador del jugador",
|
||||
["command_slots"] = "Nº de slots",
|
||||
["slotsadd"] = "Has establecido los slots de %s a %s",
|
||||
["slotsrem"] = "Has eliminado un slot a %s",
|
||||
["charenabled"] = "Has habilitado el personaje Nº%s de %s",
|
||||
["chardisabled"] = "Has deshabilitado el personaje Nº%s de %s",
|
||||
["charnotfound"] = "Personaje Nº%s de %s no existe",
|
||||
["command_slots"] = "Número de ranuras",
|
||||
["slotsadd"] = "Has establecido %s ranuras para %s",
|
||||
["slotsrem"] = "Has eliminado ranuras para %s",
|
||||
["charenabled"] = "Has habilitado el personaje #%s de %s",
|
||||
["chardisabled"] = "Has deshabilitado el personaje #%s de %s",
|
||||
["charnotfound"] = "El personaje #%s de %s no existe",
|
||||
|
||||
UI = {
|
||||
["title"] = "SELECCIÓN DE PERSONAJE",
|
||||
["char_info_title"] = "Información del personaje",
|
||||
["play"] = "JUGAR",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
Locales["fi"] = {
|
||||
["male"] = "Mies",
|
||||
["female"] = "Nainen",
|
||||
["select_char"] = "Valitse hahmo",
|
||||
["select_char_description"] = "Valitse hahmo, jolla haluat pelata.",
|
||||
["create_char"] = "Uusi hahmo",
|
||||
["char_play"] = "Pelaa",
|
||||
["char_play_description"] = "Jatka kaupunkiin.",
|
||||
["char_disabled"] = "Ei käytössä",
|
||||
["char_disabled_description"] = "Tämä hahmo on käyttökelvoton.",
|
||||
["char_delete"] = "Poista",
|
||||
["char_delete_description"] = "Poista tämä hahmo pysyvästi.",
|
||||
["char_delete_confirmation"] = "Vahvista poistaminen.",
|
||||
["char_delete_confirmation_description"] = "Oletko varma, että poistat valitun hahmon?",
|
||||
["char_delete_yes_description"] = "Kyllä, olen varma, että poistan valitun hahmon",
|
||||
["char_delete_no_description"] = "Ei, Palaa hahmojen valintaan",
|
||||
["character"] = "Hahmo: %s",
|
||||
["return"] = "Takaisin",
|
||||
["return_description"] = "Palaa hahmojen valintaan.",
|
||||
["command_setslots"] = "Määritä pelaajan multicharacter paikkojen määrä",
|
||||
["command_remslots"] = "Vähennä pelaajan multicharacter paikkojen määrää",
|
||||
["command_enablechar"] = "Muuta pelaajan tietty hahmo käyttöön",
|
||||
["command_disablechar"] = "Muuta pelaajan tietty hahmo pois käytöstä",
|
||||
["command_charslot"] = "Hahmon paikan numero",
|
||||
["command_setslots"] = "Aseta pelaajalle monihahmoslottien määrä",
|
||||
["command_remslots"] = "Poista pelaajalta monihahmoslotteja",
|
||||
["command_enablechar"] = "Ota käyttöön pelaajan tietty hahmo",
|
||||
["command_disablechar"] = "Poista käytöstä pelaajan tietty hahmo",
|
||||
["command_charslot"] = "Hahmon slottinumero",
|
||||
["command_identifier"] = "Pelaajan tunniste",
|
||||
["command_slots"] = "# paikoista",
|
||||
["slotsadd"] = "Lisäsit %s paikkaa kohteeseen %s",
|
||||
["slotsedit"] = "Olet määrittänyt %s kohteeseen %s",
|
||||
["slotsrem"] = "Poistit paikat kohteesta %s",
|
||||
["charenabled"] = "Otit käyttöön hahmon #%s / %s",
|
||||
["chardisabled"] = "Poistit hahmon #%s / %s käytöstä",
|
||||
["charnotfound"] = "Hahmoa #%s / %s ei ole olemassa",
|
||||
["command_slots"] = "Slottien määrä",
|
||||
["slotsadd"] = "Asetit %s slottia pelaajalle %s",
|
||||
["slotsrem"] = "Poistit slottien määrän pelaajalta %s",
|
||||
["charenabled"] = "Otat käyttöön hahmon #%s pelaajalta %s",
|
||||
["chardisabled"] = "Poistit käytöstä hahmon #%s pelaajalta %s",
|
||||
["charnotfound"] = "Hahmo #%s pelaajalta %s ei ole olemassa",
|
||||
|
||||
UI = {
|
||||
["title"] = "HAHMON VALINTA",
|
||||
["char_info_title"] = "Hahmon tiedot",
|
||||
["play"] = "PELAA",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["fr"] = {
|
||||
["male"] = "Homme",
|
||||
["female"] = "Femme",
|
||||
["select_char"] = "Sélectionnez un personnage",
|
||||
["select_char_description"] = "Sélectionnez un personnage avec lequel jouer.",
|
||||
["create_char"] = "Créer un nouveau personnage",
|
||||
["char_play"] = "Jouer ce personnage",
|
||||
["char_play_description"] = "Continuez dans la ville.",
|
||||
["char_disabled"] = "Ce personnage est désactivé",
|
||||
["char_disabled_description"] = "Ce personnage est inutilisable.",
|
||||
["char_delete"] = "Supprimer ce personnage",
|
||||
["char_delete_description"] = "Supprimer définitivement ce personnage.",
|
||||
["char_delete_confirmation"] = "Confirmation de suppression",
|
||||
["char_delete_confirmation_description"] = "Êtes-vous sûr de vouloir supprimer ce personnage?",
|
||||
["char_delete_yes_description"] = "Oui, je suis sur de vouloir supprimer ce personnage",
|
||||
["char_delete_no_description"] = "Non, retourner aux options de personnages",
|
||||
["character"] = "Personnage: %s",
|
||||
["return"] = "Retour",
|
||||
["return_description"] = "Retourner à la sélection de personnage.",
|
||||
["command_setslots"] = "Définir le numéro de créneau multi-caractères d'un joueur",
|
||||
["command_remslots"] = "Suppression du numéro de créneau multi-caractères d'un joueur",
|
||||
["command_enablechar"] = "Activer un personnage donné d'un joueur",
|
||||
["command_disablechar"] = "Désactiver un personnage donné d'un joueur",
|
||||
["command_charslot"] = "Numéro d'emplacement du caractère",
|
||||
["command_setslots"] = "Définir le nombre d'emplacements multicaractères d'un joueur",
|
||||
["command_remslots"] = "Retirer le nombre d'emplacements multicaractères d'un joueur",
|
||||
["command_enablechar"] = "Activer un personnage spécifique d'un joueur",
|
||||
["command_disablechar"] = "Désactiver un personnage spécifique d'un joueur",
|
||||
["command_charslot"] = "Numéro d'emplacement du personnage",
|
||||
["command_identifier"] = "Identifiant du joueur",
|
||||
["command_slots"] = "# de slots",
|
||||
["slotsadd"] = "Vous avez défini %s slots à %s",
|
||||
["slotsrem"] = "Vous avez suprimé les slots à %s",
|
||||
["command_slots"] = "Nombre d'emplacements",
|
||||
["slotsadd"] = "Vous avez défini %s emplacements pour %s",
|
||||
["slotsrem"] = "Vous avez retiré des emplacements pour %s",
|
||||
["charenabled"] = "Vous avez activé le personnage #%s de %s",
|
||||
["chardisabled"] = "Vous avez désactivé le personnage #%s de %s",
|
||||
["charnotfound"] = "Le personnage #%s de %s n'éxiste",
|
||||
["charnotfound"] = "Le personnage #%s de %s n'existe pas",
|
||||
|
||||
UI = {
|
||||
["title"] = "SÉLECTION DE PERSONNAGE",
|
||||
["char_info_title"] = "Infos du personnage",
|
||||
["play"] = "JOUER",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["gr"] = {
|
||||
["male"] = "Άνδρας",
|
||||
["female"] = "Γυναίκα",
|
||||
["select_char"] = "Επιλογή Χαρακτήρα",
|
||||
["select_char_description"] = "Επιλέξτε ένα χαρακτήρα για να παίξετε.",
|
||||
["create_char"] = "Νέος Χαρακτήρας",
|
||||
["char_play"] = "Παίξτε",
|
||||
["char_play_description"] = "Συνέχεια στην πόλη.",
|
||||
["char_disabled"] = "Απενεργοποιημένος",
|
||||
["char_disabled_description"] = "Αυτός ο χαρακτήρας δεν είναι χρησιμοποιήσιμος.",
|
||||
["char_delete"] = "Διαγραφή",
|
||||
["char_delete_description"] = "Διαγράψτε οριστικά αυτόν τον χαρακτήρα.",
|
||||
["char_delete_confirmation"] = "Επιβεβαίωση Διαγραφής",
|
||||
["char_delete_confirmation_description"] = "Είστε σίγουρος ότι θέλετε να διαγράψετε τον επιλεγμένο χαρακτήρα;",
|
||||
["char_delete_yes_description"] = "Ναι, είμαι σίγουρος ότι θέλω να διαγράψω τον επιλεγμένο χαρακτήρα",
|
||||
["char_delete_no_description"] = "Όχι, επιστροφή στις επιλογές χαρακτήρα",
|
||||
["character"] = "Χαρακτήρας: %s",
|
||||
["return"] = "Επιστροφή",
|
||||
["return_description"] = "Επιστροφή στην επιλογή χαρακτήρα.",
|
||||
["command_setslots"] = "Ορίστε τον αριθμό των slot πολλαπλών χαρακτήρων ενός παίκτη",
|
||||
["command_remslots"] = "Αφαιρέστε τον αριθμό των slot πολλαπλών χαρακτήρων ενός παίκτη",
|
||||
["command_enablechar"] = "Ενεργοποιήστε έναν συγκεκριμένο χαρακτήρα ενός παίκτη",
|
||||
["command_disablechar"] = "Απενεργοποιήστε έναν συγκεκριμένο χαρακτήρα ενός παίκτη",
|
||||
["command_charslot"] = "Αριθμός υποδιαίρεσης του χαρακτήρα",
|
||||
["command_identifier"] = "Ταυτότητα παίκτη",
|
||||
["command_slots"] = "Αριθμός slot",
|
||||
["slotsadd"] = "Ορίσατε %s slot σε %s",
|
||||
["slotsrem"] = "Αφαιρέσατε slot από τον %s",
|
||||
["charenabled"] = "Ενεργοποιήσατε τον χαρακτήρα #%s του %s",
|
||||
["chardisabled"] = "Απενεργοποιήσατε τον χαρακτήρα #%s του %s",
|
||||
["charnotfound"] = "Ο χαρακτήρας #%s του %s δεν υπάρχει",
|
||||
["command_setslots"] = "Ορισμός αριθμού multicharacter θέσεων για έναν παίκτη",
|
||||
["command_remslots"] = "Αφαίρεση αριθμού multicharacter θέσεων από έναν παίκτη",
|
||||
["command_enablechar"] = "Ενεργοποίηση συγκεκριμένου χαρακτήρα ενός παίκτη",
|
||||
["command_disablechar"] = "Απενεργοποίηση συγκεκριμένου χαρακτήρα ενός παίκτη",
|
||||
["command_charslot"] = "Αριθμός θέσης χαρακτήρα",
|
||||
["command_identifier"] = "Αναγνωριστικό παίκτη",
|
||||
["command_slots"] = "Αριθμός θέσεων",
|
||||
["slotsadd"] = "Ορίσατε %s θέσεις για τον/την %s",
|
||||
["slotsrem"] = "Αφαιρέσατε θέσεις από τον/την %s",
|
||||
["charenabled"] = "Ενεργοποιήσατε τον χαρακτήρα #%s του/της %s",
|
||||
["chardisabled"] = "Απενεργοποιήσατε τον χαρακτήρα #%s του/της %s",
|
||||
["charnotfound"] = "Ο χαρακτήρας #%s του/της %s δεν υπάρχει",
|
||||
|
||||
UI = {
|
||||
["title"] = "ΕΠΙΛΟΓΗ ΧΑΡΑΚΤΗΡΑ",
|
||||
["char_info_title"] = "Πληροφορίες Χαρακτήρα",
|
||||
["play"] = "ΠΑΙΞΕ",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["he"] = {
|
||||
["male"] = "זכר",
|
||||
["female"] = "נקבה",
|
||||
["select_char"] = "בחר דמות",
|
||||
["select_char_description"] = "בחר דמות לשחק.",
|
||||
["create_char"] = "דמות חדשה",
|
||||
["char_play"] = "שחק",
|
||||
["char_play_description"] = "המשך לעיר.",
|
||||
["char_disabled"] = "מושבת",
|
||||
["char_disabled_description"] = "דמות זו לא ניתן לשימוש.",
|
||||
["char_delete"] = "מחק",
|
||||
["char_delete_description"] = "הסר את הדמות לצמיתות.",
|
||||
["char_delete_confirmation"] = "אישור מחיקה",
|
||||
["char_delete_confirmation_description"] = "האם אתה בטוח שאתה מסיר את הדמות שנבחרה?",
|
||||
["char_delete_yes_description"] = "כן, אני בטוח שאני מסיר את הדמות שנבחרה",
|
||||
["char_delete_no_description"] = "לא, חזור לאפשרויות הדמות",
|
||||
["character"] = "דמות: %s",
|
||||
["return"] = "חזור",
|
||||
["return_description"] = "חזור לבחירת הדמות.",
|
||||
["command_setslots"] = "הגדר מספר מקומות לדמות של שחקן",
|
||||
["command_remslots"] = "הסר מספר מקומות לדמות של שחקן",
|
||||
["command_setslots"] = "הגדר מספר חריצי דמויות מרובות לשחקן",
|
||||
["command_remslots"] = "הסר מספר חריצי דמויות מרובות משחקן",
|
||||
["command_enablechar"] = "אפשר דמות מסוימת של שחקן",
|
||||
["command_disablechar"] = "השבת דמות מסוימת של שחקן",
|
||||
["command_charslot"] = "מספר מקום של הדמות",
|
||||
["command_disablechar"] = "נטרל דמות מסוימת של שחקן",
|
||||
["command_charslot"] = "מספר חריץ הדמות",
|
||||
["command_identifier"] = "מזהה שחקן",
|
||||
["command_slots"] = "# של מקומות",
|
||||
["slotsadd"] = "הגדרת %s מקומות ל- %s",
|
||||
["slotsrem"] = "הסרת מקומות ל- %s",
|
||||
["charenabled"] = "אפשרת את הדמות #%s של %s",
|
||||
["chardisabled"] = "השבתת את הדמות #%s של %s",
|
||||
["command_slots"] = "מספר חריצים",
|
||||
["slotsadd"] = "הגדרת %s חריצים עבור %s",
|
||||
["slotsrem"] = "הסרת חריצים מ-%s",
|
||||
["charenabled"] = "איפשרת את הדמות #%s של %s",
|
||||
["chardisabled"] = "נטרלת את הדמות #%s של %s",
|
||||
["charnotfound"] = "הדמות #%s של %s לא קיימת",
|
||||
|
||||
UI = {
|
||||
["title"] = "בחירת דמות",
|
||||
["char_info_title"] = "פרטי דמות",
|
||||
["play"] = "שחק",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["hu"] = {
|
||||
["male"] = "Férfi",
|
||||
["female"] = "Nő",
|
||||
["select_char"] = "Karakter kiválasztása",
|
||||
["select_char_description"] = "Karakter kiválasztása a játékhoz.",
|
||||
["create_char"] = "Új karakter létrehozása",
|
||||
["char_play"] = "Karakter kiválasztása",
|
||||
["char_play_description"] = "Visszatérés a városba.",
|
||||
["char_disabled"] = "Karakter le van tiltva",
|
||||
["char_disabled_description"] = "Ez a karakter nem használható.",
|
||||
["char_delete"] = "Karakter törlése",
|
||||
["char_delete_description"] = "Karakter végleges törlése.",
|
||||
["char_delete_confirmation"] = "Törlés megerősítés",
|
||||
["char_delete_confirmation_description"] = "Biztosan törölni szeretnéd a kiválasztott karaktert?",
|
||||
["char_delete_yes_description"] = "Igen, törölni szeretném",
|
||||
["char_delete_no_description"] = "Nem, vissza a karakter opciókhoz",
|
||||
["character"] = "Karakter: %s",
|
||||
["return"] = "Vissza",
|
||||
["return_description"] = "Vissza a karakter választáshoz.",
|
||||
["command_setslots"] = "Játékos karakter slotok számának beállítása",
|
||||
["command_remslots"] = "Játékos karakter slotok számának eltávolítása",
|
||||
["command_enablechar"] = "Játékos karakterének engedélyezése",
|
||||
["command_disablechar"] = "Játékos karakterének tiltása",
|
||||
["command_charslot"] = "Karakter slotok számának beállítása",
|
||||
["command_identifier"] = "Játékos identifier",
|
||||
["command_slots"] = "# slotok",
|
||||
["slotsadd"] = "Beállítottad %s slotokat, neki %s",
|
||||
["slotsrem"] = "Eltávolítottad a következő slotokat: %s",
|
||||
["charenabled"] = "Karakter engedélyezve #%s-ból/ből %s",
|
||||
["chardisabled"] = "Karakter letiltva #%s-ból/ből %s",
|
||||
["charnotfound"] = "Karakter #%s-ból/ből %s nem létezik",
|
||||
["command_setslots"] = "Többszereplős slotok számának beállítása egy játékos számára",
|
||||
["command_remslots"] = "Többszereplős slotok számának eltávolítása egy játékostól",
|
||||
["command_enablechar"] = "Egy adott karakter engedélyezése egy játékosnál",
|
||||
["command_disablechar"] = "Egy adott karakter letiltása egy játékosnál",
|
||||
["command_charslot"] = "A karakter slot száma",
|
||||
["command_identifier"] = "Játékos azonosító",
|
||||
["command_slots"] = "Slotok száma",
|
||||
["slotsadd"] = "%s slotot állítottál be %s játékosnak",
|
||||
["slotsrem"] = "Eltávolítottad a slotokat %s játékostól",
|
||||
["charenabled"] = "Engedélyezted a(z) #%s karaktert %s játékosnál",
|
||||
["chardisabled"] = "Letiltottad a(z) #%s karaktert %s játékosnál",
|
||||
["charnotfound"] = "A(z) #%s karakter %s játékosnál nem létezik",
|
||||
|
||||
UI = {
|
||||
["title"] = "KARAKTER KIVÁLASZTÁSA",
|
||||
["char_info_title"] = "Karakterinformáció",
|
||||
["play"] = "JÁTÉK",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["it"] = {
|
||||
["male"] = "Uomo",
|
||||
["female"] = "Donna",
|
||||
["select_char"] = "Seleziona personaggio",
|
||||
["select_char_description"] = "Seleziona un personaggio con cui giocare.",
|
||||
["create_char"] = "Nuovo personaggio",
|
||||
["char_play"] = "Inizia",
|
||||
["char_play_description"] = "Continua in città.",
|
||||
["char_disabled"] = "Disabilitato",
|
||||
["char_disabled_description"] = "Questo personaggio è inutilizzabile.",
|
||||
["char_delete"] = "Elimina",
|
||||
["char_delete_description"] = "Rimuovi permanentemente questo personaggio..",
|
||||
["char_delete_confirmation"] = "Conferma eliminazione",
|
||||
["char_delete_confirmation_description"] = "Sei sicuro di voler rimuovere il personaggio selezionato?",
|
||||
["char_delete_yes_description"] = "Si, sono sicuro di voler rimuovere il personaggio",
|
||||
["char_delete_no_description"] = "No, ritorna alle opzioni",
|
||||
["character"] = "Personaggio: %s",
|
||||
["return"] = "Ritorno",
|
||||
["return_description"] = "Ritorna alla selezione dei personaggi.",
|
||||
["command_setslots"] = "imposta il numero di slot per il giocatore",
|
||||
["command_remslots"] = "Rimuovi slot per il giocatore",
|
||||
["male"] = "Maschio",
|
||||
["female"] = "Femmina",
|
||||
["command_setslots"] = "Imposta il numero di slot multicarattere per un giocatore",
|
||||
["command_remslots"] = "Rimuovi il numero di slot multicarattere da un giocatore",
|
||||
["command_enablechar"] = "Abilita un determinato personaggio di un giocatore",
|
||||
["command_disablechar"] = "Disabilita un determinato personaggio per i giocatore",
|
||||
["command_charslot"] = "Numero di slot",
|
||||
["command_identifier"] = "Identificativo del giocatore",
|
||||
["command_slots"] = "# di slot",
|
||||
["slotsadd"] = "Hai impostato %s slots a %s",
|
||||
["slotsrem"] = "Hai rimosso gli slot in %s",
|
||||
["charenabled"] = "Hai abilitato il personaggio #%s di %s",
|
||||
["chardisabled"] = "hai disabilitato il personaggio #%s di %s",
|
||||
["command_disablechar"] = "Disabilita un determinato personaggio di un giocatore",
|
||||
["command_charslot"] = "Numero dello slot del personaggio",
|
||||
["command_identifier"] = "Identificatore del giocatore",
|
||||
["command_slots"] = "Numero di slot",
|
||||
["slotsadd"] = "Hai impostato %s slot per %s",
|
||||
["slotsrem"] = "Hai rimosso gli slot da %s",
|
||||
["charenabled"] = "Hai abilitato il personaggio #%s di %s",
|
||||
["chardisabled"] = "Hai disabilitato il personaggio #%s di %s",
|
||||
["charnotfound"] = "Il personaggio #%s di %s non esiste",
|
||||
|
||||
UI = {
|
||||
["title"] = "SELEZIONE DEL PERSONAGGIO",
|
||||
["char_info_title"] = "Informazioni del personaggio",
|
||||
["play"] = "GIOCA",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["nl"] = {
|
||||
["male"] = "Man",
|
||||
["female"] = "Vrouw",
|
||||
["select_char"] = "Selecteer Karakter",
|
||||
["select_char_description"] = "Selecteer een karakter om mee te spelen.",
|
||||
["create_char"] = "Maak karakter aan",
|
||||
["char_play"] = "Speel",
|
||||
["char_play_description"] = "Ga verder naar de stad.",
|
||||
["char_disabled"] = "Uitgeschakeld",
|
||||
["char_disabled_description"] = "Dit karakter is onbruikbaar.",
|
||||
["char_delete"] = "Verwijder",
|
||||
["char_delete_description"] = "Verwijder dit karakter (PERMANENT).",
|
||||
["char_delete_confirmation"] = "Bevestig",
|
||||
["char_delete_confirmation_description"] = "Ben je zeker dat je het geselecteerde karakter wilt verwijderen?",
|
||||
["char_delete_yes_description"] = "Ja, ik ben zeker dat ik het karakter wil verwijderen",
|
||||
["char_delete_no_description"] = "Nee, ga terug naar karakter opties",
|
||||
["character"] = "Karakter: %s",
|
||||
["return"] = "Ga terug",
|
||||
["return_description"] = "Ga terug naar karakter selectie.",
|
||||
["command_setslots"] = "Multicharacter hoeveelheid slots van een speler instellen",
|
||||
["command_remslots"] = "Verwijder slotnummer van een speler",
|
||||
["command_enablechar"] = "Een bepaald karakter van een speler inschakelen",
|
||||
["command_disablechar"] = "Een bepaald karakter van een speler uitschakelen",
|
||||
["command_charslot"] = "Slotnummer van het personage",
|
||||
["command_identifier"] = "Speler identifier",
|
||||
["command_slots"] = "# van de slots",
|
||||
["slotsadd"] = "Je hebt %s slots gezet naar %s",
|
||||
["slotsrem"] = "Je hebt slots verwijderd naar %s",
|
||||
["charenabled"] = "Je hebt karakter #%s ingeschakeld van %s",
|
||||
["chardisabled"] = "Je hebt karakter #%s uitgeschakeld van %s",
|
||||
["charnotfound"] = "Karakter #%s van %s bestaat niet",
|
||||
["command_setslots"] = "Stel het aantal multi-personage slots in voor een speler",
|
||||
["command_remslots"] = "Verwijder het aantal multi-personage slots van een speler",
|
||||
["command_enablechar"] = "Schakel een specifiek personage van een speler in",
|
||||
["command_disablechar"] = "Schakel een specifiek personage van een speler uit",
|
||||
["command_charslot"] = "Personage slotnummer",
|
||||
["command_identifier"] = "Speleridentificatie",
|
||||
["command_slots"] = "Aantal slots",
|
||||
["slotsadd"] = "Je hebt %s slots ingesteld voor %s",
|
||||
["slotsrem"] = "Je hebt slots verwijderd van %s",
|
||||
["charenabled"] = "Je hebt personage #%s van %s ingeschakeld",
|
||||
["chardisabled"] = "Je hebt personage #%s van %s uitgeschakeld",
|
||||
["charnotfound"] = "Personage #%s van %s bestaat niet",
|
||||
|
||||
UI = {
|
||||
["title"] = "PERSONAGE SELECTIE",
|
||||
["char_info_title"] = "Personage Informatie",
|
||||
["play"] = "SPEEL",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
Locales["pl"] = {
|
||||
["male"] = "Mężczyzna",
|
||||
["female"] = "Kobieta",
|
||||
["select_char"] = "Wybierz postać",
|
||||
["select_char_description"] = "Wybierz postać, którą chcesz grać.",
|
||||
["create_char"] = "Nowa postać",
|
||||
["char_play"] = "Graj",
|
||||
["char_play_description"] = "Przejdź do miasta.",
|
||||
["char_disabled"] = "Wyłączona",
|
||||
["char_disabled_description"] = "Ta postać jest niedostępna.",
|
||||
["char_delete"] = "Usuń",
|
||||
["char_delete_description"] = "Trwale usuń tę postać.",
|
||||
["char_delete_confirmation"] = "Potwierdz usunięcie",
|
||||
["char_delete_confirmation_description"] = "Czy na pewno chcesz usunąć wybraną postać?",
|
||||
["char_delete_yes_description"] = "Tak, jestem pewien, że chcę usunąć wybraną postać",
|
||||
["char_delete_no_description"] = "Nie, wróć do opcji postaci",
|
||||
["character"] = "Postać: %s",
|
||||
["return"] = "Powrót",
|
||||
["return_description"] = "Wróć do wyboru postaci.",
|
||||
["command_setslots"] = "Ustaw liczbę slotów dla wielu postaci",
|
||||
["command_remslots"] = "Usuń liczbę slotów dla wielu postaci",
|
||||
["command_enablechar"] = "Włącz określoną postać",
|
||||
["command_disablechar"] = "Wyłącz określoną postać",
|
||||
["command_charslot"] = "Numer slotu postaci",
|
||||
["command_identifier"] = "Identyfikator postaci",
|
||||
["command_slots"] = "# liczba slotów",
|
||||
["slotsadd"] = "Ustawiłeś %s slotów dla %s",
|
||||
["slotsrem"] = "Usunąłeś sloty dla %s",
|
||||
["charenabled"] = "Włączyłeś postać #%s gracza %s",
|
||||
["chardisabled"] = "Wyłączyłeś postać #%s gracza %s",
|
||||
["charnotfound"] = "Postać #%s gracza %s nie istnieje",
|
||||
["male"] = "Mężczyzna",
|
||||
["female"] = "Kobieta",
|
||||
["command_setslots"] = "Ustaw liczbę slotów multi-postaci dla gracza",
|
||||
["command_remslots"] = "Usuń liczbę slotów multi-postaci od gracza",
|
||||
["command_enablechar"] = "Włącz konkretną postać gracza",
|
||||
["command_disablechar"] = "Wyłącz konkretną postać gracza",
|
||||
["command_charslot"] = "Numer slotu postaci",
|
||||
["command_identifier"] = "Identyfikator gracza",
|
||||
["command_slots"] = "Liczba slotów",
|
||||
["slotsadd"] = "Ustawiłeś %s slotów dla %s",
|
||||
["slotsrem"] = "Usunąłeś sloty od %s",
|
||||
["charenabled"] = "Włączyłeś postać #%s dla %s",
|
||||
["chardisabled"] = "Wyłączyłeś postać #%s dla %s",
|
||||
["charnotfound"] = "Postać #%s dla %s nie istnieje",
|
||||
|
||||
UI = {
|
||||
["title"] = "WYBÓR POSTACI",
|
||||
["char_info_title"] = "Informacje o postaci",
|
||||
["play"] = "GRAJ",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
Locales["pt"] = {
|
||||
["male"] = "Masculino",
|
||||
["female"] = "Feminino",
|
||||
["delete_label"] = "Excluir %s %s?",
|
||||
["select_char"] = "Selecionar personagem",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "Criar novo personagem",
|
||||
["char_play"] = "Selecionar",
|
||||
["char_disabled"] = "Este personagem está desabilitado",
|
||||
["char_delete"] = "Excluir este personagem",
|
||||
["cancel"] = "Cancelar",
|
||||
["confirm"] = "Confirmar",
|
||||
["command_setslots"] = "Definir o número de slots de vários personagens de um jogador",
|
||||
["command_remslots"] = "Remover o número de slots de vários personagens de um jogador",
|
||||
["command_enablechar"] = "Habilitar um determinado personagem de um jogador",
|
||||
["command_disablechar"] = "Desabilitar um determinado personagem de um jogador",
|
||||
["command_setslots"] = "Defina o número de slots de múltiplos personagens para um jogador",
|
||||
["command_remslots"] = "Remova o número de slots de múltiplos personagens de um jogador",
|
||||
["command_enablechar"] = "Ative um personagem específico de um jogador",
|
||||
["command_disablechar"] = "Desative um personagem específico de um jogador",
|
||||
["command_charslot"] = "Número do slot do personagem",
|
||||
["command_identifier"] = "Identificador do jogador",
|
||||
["command_slots"] = "# de slots",
|
||||
["command_slots"] = "Número de slots",
|
||||
["slotsadd"] = "Você definiu %s slots para %s",
|
||||
["slotsrem"] = "Você removeu slots de %s",
|
||||
["charenabled"] = "Você ativou o personagem #%s de %s",
|
||||
["chardisabled"] = "Você desativou o personagem #%s de %s",
|
||||
["charnotfound"] = "Personagem #%s de %s não existe",
|
||||
["charnotfound"] = "O personagem #%s de %s não existe",
|
||||
|
||||
UI = {
|
||||
["title"] = "SELEÇÃO DE PERSONAGEM",
|
||||
["char_info_title"] = "Informações do personagem",
|
||||
["play"] = "JOGAR",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
Locales["sl"] = {
|
||||
["male"] = "Moški",
|
||||
["female"] = "Ženska",
|
||||
["select_char"] = "Izberi znak",
|
||||
["select_char_description"] = "Izberite lik za igranje.",
|
||||
["create_char"] = "Nov lik",
|
||||
["char_play"] = "Predvajaj",
|
||||
["char_play_description"] = "Nadaljujte v mesto.",
|
||||
["char_disabled"] = "Onemogočeno",
|
||||
["char_disabled_description"] = "Ta znak je neuporaben.",
|
||||
["char_delete"] = "Izbriši",
|
||||
["char_delete_description"] = "Trajno odstrani ta znak.",
|
||||
["char_delete_confirmation"] = "Potrditev brisanja",
|
||||
["char_delete_confirmation_description"] = "Ali ste prepicani da hocete zbrisati svoj karakter*",
|
||||
["char_delete_yes_description"] = "Da",
|
||||
["char_delete_no_description"] = "Ne",
|
||||
["character"] = "Znak: %s",
|
||||
["return"] = "Vrni se",
|
||||
["return_description"] = "Nazaj na izbiro znakov.",
|
||||
["command_setslots"] = "Nastavi število večznakovnih mest za igralca",
|
||||
["command_remslots"] = "Odstrani večznakovno število rež igralca",
|
||||
["command_setslots"] = "Nastavi število večkarakternih slotov za igralca",
|
||||
["command_remslots"] = "Odstrani število večkarakternih slotov igralcu",
|
||||
["command_enablechar"] = "Omogoči določen lik igralca",
|
||||
["command_disablechar"] = "Onemogoči določen lik igralca",
|
||||
["command_charslot"] = "Številka reže znaka",
|
||||
["command_charslot"] = "Številka slota lika",
|
||||
["command_identifier"] = "Identifikator igralca",
|
||||
["command_slots"] = "Št. rež",
|
||||
["slotsadd"] = "Dodali ste %s rež v %s",
|
||||
["slotsedit"] = "%s rež ste nastavili na %s",
|
||||
["slotsrem"] = "Odstranili ste reže za %s",
|
||||
["charenabled"] = "Omogočili ste znak #%s od %s",
|
||||
["chardisabled"] = "Onemogočili ste znak #%s od %s",
|
||||
["charnotfound"] = "Znak #%s od %s ne obstaja",
|
||||
["command_slots"] = "Število slotov",
|
||||
["slotsadd"] = "Nastavil si %s slotov za %s",
|
||||
["slotsrem"] = "Odstranil si slot(e) od %s",
|
||||
["charenabled"] = "Omogočil si lika #%s za %s",
|
||||
["chardisabled"] = "Onemogočil si lika #%s za %s",
|
||||
["charnotfound"] = "Lik #%s za %s ne obstaja",
|
||||
|
||||
UI = {
|
||||
["title"] = "IZBIRA LIKA",
|
||||
["char_info_title"] = "Informacije o liku",
|
||||
["play"] = "IGRAJ",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
Locales["sr"] = {
|
||||
["male"] = "Muško",
|
||||
["female"] = "Žensko",
|
||||
["select_char"] = "Izaberi Karakter",
|
||||
["select_char_description"] = "Izaberi karakter kojim ćeš igrati",
|
||||
["create_char"] = "Novi Karakter",
|
||||
["char_play"] = "Igraj",
|
||||
["char_play_description"] = "Nastavi u grad.",
|
||||
["char_disabled"] = "Onemogućeno",
|
||||
["char_disabled_description"] = "Taj karakter je onemogućen",
|
||||
["char_delete"] = "Izbriši",
|
||||
["char_delete_description"] = "Nepovratno obrišite karakter",
|
||||
["char_delete_confirmation"] = "Potvrda brisanja",
|
||||
["char_delete_confirmation_description"] = "Da li ste sigurni da želite da obrišete karakter?",
|
||||
["char_delete_yes_description"] = "Da, siguran sam da želim obrisati karakter",
|
||||
["char_delete_no_description"] = "Ne, vrati se nazad",
|
||||
["character"] = "Karakter: %s",
|
||||
["return"] = "Nazad",
|
||||
["return_description"] = "Povratak na biranje karaktera.",
|
||||
["command_setslots"] = "Postavi broj slotova karaktera igraču",
|
||||
["command_remslots"] = "Izbriši slotove igraču",
|
||||
["command_enablechar"] = "Dozvoli karakter igraču",
|
||||
["command_disablechar"] = "Zabrani karakter igraču",
|
||||
["command_charslot"] = "Broj slotova",
|
||||
["command_identifier"] = "Identifikator Igrača",
|
||||
["command_slots"] = "# slotova",
|
||||
["slotsadd"] = "Dodali ste %s slotova %s",
|
||||
["slotsedit"] = "Postavili ste %s slotova %s",
|
||||
["slotsrem"] = "Oduzeli ste slotove %s",
|
||||
["charenabled"] = "Dozvolili ste karakter #%s od %s",
|
||||
["chardisabled"] = "Zabranili ste karakter #%s od %s",
|
||||
["charnotfound"] = "Karakter #%s od %s ne postoji",
|
||||
["male"] = "Muški",
|
||||
["female"] = "Ženski",
|
||||
["command_setslots"] = "Postavi broj multi-karakternih slotova za igrača",
|
||||
["command_remslots"] = "Ukloni broj multi-karakternih slotova od igrača",
|
||||
["command_enablechar"] = "Omogući određeni lik igrača",
|
||||
["command_disablechar"] = "Onemogući određeni lik igrača",
|
||||
["command_charslot"] = "Broj slota lika",
|
||||
["command_identifier"] = "Identifikator igrača",
|
||||
["command_slots"] = "Broj slotova",
|
||||
["slotsadd"] = "Postavio si %s slotova za %s",
|
||||
["slotsrem"] = "Uklonio si slotove od %s",
|
||||
["charenabled"] = "Omogućio si lika #%s za %s",
|
||||
["chardisabled"] = "Onemogućio si lika #%s za %s",
|
||||
["charnotfound"] = "Lik #%s za %s ne postoji",
|
||||
|
||||
UI = {
|
||||
["title"] = "IZBOR LIKA",
|
||||
["char_info_title"] = "Informacije o liku",
|
||||
["play"] = "IGRAJ",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
Locales["sv"] = {
|
||||
["male"] = "Man",
|
||||
["female"] = "Kvinna",
|
||||
["select_char"] = "Välj karaktär",
|
||||
["select_char_description"] = "Välj en karaktär att spela som.",
|
||||
["create_char"] = "Ny karaktär",
|
||||
["char_play"] = "Spela",
|
||||
["char_play_description"] = "Fortsätt i staden.",
|
||||
["char_disabled"] = "Otillgänglig",
|
||||
["char_disabled_description"] = "Denna karaktär är inte tillgänglig.",
|
||||
["char_delete"] = "Radera",
|
||||
["char_delete_description"] = "Permanent radera denna karaktär.",
|
||||
["char_delete_confirmation"] = "Acceptera",
|
||||
["char_delete_confirmation_description"] = "Säker att du vill radera den?",
|
||||
["char_delete_yes_description"] = "Ja, jag är säker",
|
||||
["char_delete_no_description"] = "Nej, gå tillbaka till karaktärerna",
|
||||
["character"] = "Karaktär: %s",
|
||||
["return"] = "Tillbaka",
|
||||
["return_description"] = "Tillbaka till karaktärerna.",
|
||||
["command_setslots"] = "Ge slots till en spelare",
|
||||
["command_remslots"] = "Radera slots från en spelare",
|
||||
["command_enablechar"] = "Aktivera vald karaktär till spelare",
|
||||
["command_disablechar"] = "Avaktivera vald karaktär till spelare",
|
||||
["command_charslot"] = "Slotsnummer på karaktären",
|
||||
["command_identifier"] = "Spelare",
|
||||
["command_slots"] = "# av slots",
|
||||
["slotsadd"] = "Du satte %s slots till %s",
|
||||
["slotsrem"] = "Du raderade slots till %s",
|
||||
["charenabled"] = "Du aktiverade karaktär #%s av %s",
|
||||
["chardisabled"] = "Du avaktiverade #%s av %s",
|
||||
["charnotfound"] = "Karaktär #%s av %s existerar inte",
|
||||
["command_setslots"] = "Sätt antalet multikaraktärsplatser för en spelare",
|
||||
["command_remslots"] = "Ta bort antalet multikaraktärsplatser från en spelare",
|
||||
["command_enablechar"] = "Aktivera en specifik karaktär för en spelare",
|
||||
["command_disablechar"] = "Inaktivera en specifik karaktär för en spelare",
|
||||
["command_charslot"] = "Karaktärsplatsnummer",
|
||||
["command_identifier"] = "Spelaridentifierare",
|
||||
["command_slots"] = "Antal platser",
|
||||
["slotsadd"] = "Du har satt %s platser för %s",
|
||||
["slotsrem"] = "Du har tagit bort platser från %s",
|
||||
["charenabled"] = "Du har aktiverat karaktär #%s för %s",
|
||||
["chardisabled"] = "Du har inaktiverat karaktär #%s för %s",
|
||||
["charnotfound"] = "Karaktär #%s för %s finns inte",
|
||||
|
||||
UI = {
|
||||
["title"] = "KARAKTÄRSVAL",
|
||||
["char_info_title"] = "Karaktärsinformation",
|
||||
["play"] = "SPELA",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,33 +1,22 @@
|
||||
Locales["zh-cn"] = {
|
||||
["male"] = "男性",
|
||||
["female"] = "女性",
|
||||
["select_char"] = "选择角色",
|
||||
["select_char_description"] = "请选择已存在的游戏角色进入.",
|
||||
["create_char"] = "创建新角色",
|
||||
["char_play"] = "游玩",
|
||||
["char_play_description"] = "继而进入城镇.",
|
||||
["char_disabled"] = "不可用",
|
||||
["char_disabled_description"] = "此角色无法使用.",
|
||||
["char_delete"] = "移除",
|
||||
["char_delete_description"] = "永久删除此角色.",
|
||||
["char_delete_confirmation"] = "删除确认",
|
||||
["char_delete_confirmation_description"] = "您确定要删除选定的角色吗?",
|
||||
["char_delete_yes_description"] = "是的,我确定删除选定的角色",
|
||||
["char_delete_no_description"] = "取消,并返回至角色选项",
|
||||
["character"] = "游戏角色: %s",
|
||||
["return"] = "返回",
|
||||
["return_description"] = "返回至角色选择.",
|
||||
["command_setslots"] = "设置玩家多玩家插槽数量",
|
||||
["command_remslots"] = "移除玩家多角色位置数量",
|
||||
["command_enablechar"] = "启用玩家游玩某个角色",
|
||||
["command_disablechar"] = "禁用玩家游玩某个角色",
|
||||
["command_charslot"] = "玩家的角色数量上限",
|
||||
["command_identifier"] = "玩家标识符",
|
||||
["command_slots"] = "# 插槽数量",
|
||||
["slotsadd"] = "增加: %s 角色插槽至 %s",
|
||||
["slotsedit"] = "成功配置 %s 角色插槽至 %s",
|
||||
["slotsrem"] = "成功移除角色插槽 %s",
|
||||
["charenabled"] = "您开启了角色: #%s使用权, 拥有人%s",
|
||||
["chardisabled"] = "您关闭了角色: #%s使用权, 拥有人%s",
|
||||
["charnotfound"] = "角色信息: #%s ,拥有人:%s 并不存在",
|
||||
["command_setslots"] = "为玩家设置多角色槽位数量",
|
||||
["command_remslots"] = "移除玩家的多角色槽位数量",
|
||||
["command_enablechar"] = "启用玩家的指定角色",
|
||||
["command_disablechar"] = "禁用玩家的指定角色",
|
||||
["command_charslot"] = "角色槽位编号",
|
||||
["command_identifier"] = "玩家标识",
|
||||
["command_slots"] = "槽位数量",
|
||||
["slotsadd"] = "你已为 %s 设置了 %s 个槽位",
|
||||
["slotsrem"] = "你已移除了 %s 的槽位",
|
||||
["charenabled"] = "你已启用了 %s 的角色 #%s",
|
||||
["chardisabled"] = "你已禁用了 %s 的角色 #%s",
|
||||
["charnotfound"] = "%s 的角色 #%s 不存在",
|
||||
|
||||
UI = {
|
||||
["title"] = "角色选择",
|
||||
["char_info_title"] = "角色信息",
|
||||
["play"] = "开始游戏",
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,14 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ESX MULTICHARACTER</title>
|
||||
<script type="module" crossorigin src="./assets/index-DGfzXZP_.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-Cy_cJ0Pf.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,28 @@
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
import reactRefresh from 'eslint-plugin-react-refresh';
|
||||
import tseslint from 'typescript-eslint';
|
||||
|
||||
export default tseslint.config(
|
||||
{ ignores: ['dist'] },
|
||||
{
|
||||
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2020,
|
||||
globals: globals.browser,
|
||||
},
|
||||
plugins: {
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react-refresh/only-export-components': [
|
||||
'warn',
|
||||
{ allowConstantExport: true },
|
||||
],
|
||||
},
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>ESX MULTICHARACTER</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "vite-react-app",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "eslint .",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/react": "^6.0.0",
|
||||
"lucide-react": "^0.344.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.9.1",
|
||||
"@types/react": "^18.3.5",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@vitejs/plugin-react": "^4.3.1",
|
||||
"autoprefixer": "^10.4.18",
|
||||
"eslint": "^9.9.1",
|
||||
"eslint-plugin-react-hooks": "^5.1.0-rc.0",
|
||||
"eslint-plugin-react-refresh": "^0.4.11",
|
||||
"globals": "^15.9.0",
|
||||
"postcss": "^8.4.35",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.5.3",
|
||||
"typescript-eslint": "^8.3.0",
|
||||
"vite": "^5.4.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,44 @@
|
||||
import CharacterSelection from './components/CharacterSelection';
|
||||
import { useState } from 'react';
|
||||
import { useNuiEvent } from './utils/useNuiEvent'
|
||||
import { Character, Locale } from './types/Character';
|
||||
|
||||
function App() {
|
||||
const [isVisible, setIsVisible] = useState<boolean>(false);
|
||||
const [characters, setCharacters] = useState<Character[]>([]);
|
||||
const [Candelete, setCandelete] = useState<boolean>(false);
|
||||
const [MaxAllowedSlot, setMaxAllowedSlot] = useState<number>(0);
|
||||
const [locale, setLocale] = useState<Locale>({ char_info_title: '', play: '', title: '' });
|
||||
|
||||
|
||||
useNuiEvent('ToggleMulticharacter', (data:any) => {
|
||||
if (data.show) {
|
||||
const validCharacters = data.Characters.filter((char: any) => char !== null);
|
||||
const parsedCharacters: Character[] = validCharacters.map((char: any, index: number) => ({
|
||||
id: char.id.toString(),
|
||||
name: `${char.firstname} ${char.lastname}`,
|
||||
birthDate: char.dateofbirth,
|
||||
gender: char.sex?.toUpperCase() === 'MALE' ? 'MALE' : 'FEMALE',
|
||||
occupation: char.job,
|
||||
disabled: char.disabled,
|
||||
isActive: index === 0,
|
||||
}));
|
||||
|
||||
setIsVisible(true);
|
||||
setCharacters(parsedCharacters);
|
||||
setCandelete(data.CanDelete);
|
||||
setMaxAllowedSlot(data.AllowedSlot)
|
||||
setLocale(data.Locale)
|
||||
} else {
|
||||
setIsVisible(false);
|
||||
setCharacters([]);
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
return isVisible && (
|
||||
<CharacterSelection initialCharacters={characters} Candelete={Candelete} MaxAllowedSlot={MaxAllowedSlot} locale={locale} />
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,102 @@
|
||||
import React from 'react';
|
||||
import { Character } from '../types/Character';
|
||||
import { Icon } from '@iconify/react';
|
||||
|
||||
interface CharacterCardProps {
|
||||
character: Character;
|
||||
onSelect: (id: string) => void;
|
||||
onInfoClick: (id: string) => void;
|
||||
showInfo: boolean;
|
||||
PlayCharacter: () => void;
|
||||
}
|
||||
|
||||
const CharacterCard: React.FC<CharacterCardProps> = ({
|
||||
character,
|
||||
onSelect,
|
||||
onInfoClick,
|
||||
showInfo,
|
||||
PlayCharacter
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
<div className='flex justify-center items-center mb-4'>
|
||||
<div
|
||||
className={`
|
||||
h-[65px] w-[462px] cursor-pointer rounded-[5px] overflow-hidden group
|
||||
${character.isActive
|
||||
? ''
|
||||
: 'cursor-pointer rounded-[5px] overflow-hidden bg-[#38383880] border-2 border-[#ffffff50] hover:border-[#FFFFFF] hover:bg-[#38383840'}
|
||||
`}
|
||||
onClick={() => onSelect(character.id)}
|
||||
>
|
||||
<div
|
||||
className={`
|
||||
flex items-center gap-2 transition-all duration-300
|
||||
${character.isActive ? 'text-[#fb9b04]' : 'text-gray-400 group-hover:text-[#FFFFFF]'}
|
||||
`}
|
||||
>
|
||||
<div
|
||||
className={`
|
||||
flex items-center rounded-[5px] p-4 overflow-hidden
|
||||
${character.isActive
|
||||
? 'h-[65px] bg-[#fb9b0440] border-2 border-[#fb9b04]'
|
||||
: 'h-[60px]'}
|
||||
${character.isActive && showInfo ? 'w-full' : character.isActive ? 'w-[411px]' : 'w-full'}
|
||||
`}
|
||||
>
|
||||
<Icon
|
||||
icon="material-symbols:person-rounded"
|
||||
width="30"
|
||||
height="30"
|
||||
className={`mr-3 flex-shrink-0`}
|
||||
/>
|
||||
<div className="flex justify-center items-center w-full h-full overflow-hidden">
|
||||
<span className={`font-bold text-[24px] tracking-wide whitespace-nowrap ${character.isActive ? 'truncate' : 'ml-2'}`}>
|
||||
{character.name}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{character.isActive && (
|
||||
<div className="flex gap-2 flex-shrink-0">
|
||||
<button
|
||||
className={`
|
||||
h-[65px] rounded-[5px] ${character.disabled ? 'bg-gray-500' : 'bg-orange-500 hover:bg-orange-600'} flex text-black items-center justify-center transition-all duration-300
|
||||
${showInfo ? 'w-0 scale-0 opacity-0 overflow-hidden' : 'w-[65px] h-[65px] scale-100 opacity-100'}
|
||||
`}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
PlayCharacter();
|
||||
}}
|
||||
disabled={character.disabled}
|
||||
>
|
||||
<Icon
|
||||
icon="si:play-fill"
|
||||
width="30"
|
||||
height="30"
|
||||
color="#383838"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
className="w-[65px] h-[65px] rounded-[5px] bg-orange-500 text-black flex items-center justify-center transition-colors hover:bg-orange-600 flex-shrink-0"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onInfoClick(character.id);
|
||||
}}
|
||||
>
|
||||
<Icon
|
||||
icon="bi:info"
|
||||
width="30"
|
||||
height="30"
|
||||
color="#383838"
|
||||
/>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
};
|
||||
|
||||
export default CharacterCard;
|
||||
@@ -0,0 +1,71 @@
|
||||
import React from 'react';
|
||||
import { Info, Cake, User2, Briefcase, Trash2 } from 'lucide-react';
|
||||
import { Character, Locale } from '../types/Character';
|
||||
import { Icon } from '@iconify/react';
|
||||
|
||||
interface CharacterInfoProps {
|
||||
character: Character;
|
||||
onClose: () => void;
|
||||
isAllowedtoDelete: boolean;
|
||||
PlayCharacter : () => void;
|
||||
handleDelete: () => void;
|
||||
locale: Locale;
|
||||
}
|
||||
|
||||
const CharacterInfo: React.FC<CharacterInfoProps> = ({ character, onClose, isAllowedtoDelete , PlayCharacter, handleDelete, locale}) => {
|
||||
if (!character) return null;
|
||||
|
||||
return (
|
||||
<div className='flex justify-center items-center'>
|
||||
<div className="w-[462px] bg-neutral-900 rounded-b-lg p-4 animate-slideDown">
|
||||
<div className="mb-4">
|
||||
<h3 className="text-gray-400 uppercase text-sm mb-3 font-semibold flex items-center">
|
||||
<Info className="mr-2" size={16} /> {locale.char_info_title}
|
||||
</h3>
|
||||
|
||||
<div className="grid grid-cols-2 gap-2">
|
||||
<div className="bg-neutral-800 p-3 rounded flex items-center">
|
||||
<Cake className="mr-3 text-white" size={18} />
|
||||
<div className="flex justify-center w-full">
|
||||
<span className="text-white mr-1">{character.birthDate}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-neutral-800 p-3 rounded flex items-center">
|
||||
<User2 className="mr-3 text-white-400" size={18} />
|
||||
<div className="flex justify-center w-full">
|
||||
<span className="text-white mr-6">{character.gender}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="bg-neutral-800 p-3 rounded flex items-center col-span-2">
|
||||
<Briefcase className="mr-3 text-white-400" size={18} />
|
||||
<div className="flex justify-center w-full">
|
||||
<span className="text-white mr-6">{character.occupation}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<button
|
||||
className={`flex-1 ${character.disabled ? 'bg-gray-500' : 'bg-neutral-800 hover:bg-[#FFA31A] hover:text-[#383838]'} text-white py-2 px-4 font-semibold text-[16px] rounded-[5px] flex items-center justify-center transition-colors`}
|
||||
onClick={PlayCharacter}
|
||||
disabled={character.disabled}
|
||||
>
|
||||
<Icon icon="flowbite:play-solid" width={23} height={23} className="mr-2" />
|
||||
{locale.play}
|
||||
</button>
|
||||
{isAllowedtoDelete && (
|
||||
<button
|
||||
className="bg-neutral-800 text-white p-2 rounded hover:bg-red-900 transition-colors"
|
||||
onClick={handleDelete}
|
||||
>
|
||||
<Trash2 size={18} />
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CharacterInfo;
|
||||
@@ -0,0 +1,119 @@
|
||||
import React, { useState } from 'react';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { Character, Locale } from '../types/Character';
|
||||
import CharacterCard from './CharacterCard';
|
||||
import CharacterInfo from './CharacterInfo';
|
||||
import Logo from '../assets/esxLogo.png';
|
||||
import { fetchNui } from '../utils/fetchNui';
|
||||
|
||||
interface CharacterSelectionProps {
|
||||
initialCharacters: Character[];
|
||||
Candelete: boolean;
|
||||
MaxAllowedSlot : number;
|
||||
locale : Locale;
|
||||
}
|
||||
|
||||
const CharacterSelection: React.FC<CharacterSelectionProps> = ({ initialCharacters, Candelete, MaxAllowedSlot, locale }) => {
|
||||
const [characters, setCharacters] = useState<Character[]>(initialCharacters);
|
||||
const [showInfo, setShowInfo] = useState<string | null>(null);
|
||||
const [selectedCharacter, setSelectedCharacter] = useState<Character | null>(
|
||||
characters.find(char => char.isActive) || null
|
||||
);
|
||||
|
||||
const handleSelectCharacter = (id: string) => {
|
||||
if (selectedCharacter?.id === id) return;
|
||||
|
||||
const updatedCharacters = characters.map(char => ({
|
||||
...char,
|
||||
isActive: char.id === id
|
||||
}));
|
||||
|
||||
setCharacters(updatedCharacters);
|
||||
setSelectedCharacter(updatedCharacters.find(char => char.id === id) || null);
|
||||
setShowInfo(null);
|
||||
fetchNui('SelectCharacter', {id : id})
|
||||
};
|
||||
|
||||
const toggleInfo = (id: string) => {
|
||||
setShowInfo(showInfo === id ? null : id);
|
||||
};
|
||||
|
||||
const PlayCharacter = () => {
|
||||
fetchNui('PlayCharacter')
|
||||
}
|
||||
|
||||
const handleCreateCharacter = () => {
|
||||
fetchNui('CreateCharacter')
|
||||
}
|
||||
|
||||
const handleDeleteCharacter = () => {
|
||||
if (!selectedCharacter) return;
|
||||
|
||||
const updatedCharactersRaw = characters.filter(char => char.id !== selectedCharacter.id);
|
||||
|
||||
fetchNui('DeleteCharacter');
|
||||
|
||||
if (updatedCharactersRaw.length > 0) {
|
||||
const updatedCharacters = updatedCharactersRaw.map((char, index) => ({
|
||||
...char,
|
||||
isActive: index === 0
|
||||
}));
|
||||
|
||||
setCharacters(updatedCharacters);
|
||||
setSelectedCharacter(updatedCharacters[0]);
|
||||
setShowInfo(null);
|
||||
} else {
|
||||
setCharacters([]);
|
||||
setSelectedCharacter(null);
|
||||
setShowInfo(null);
|
||||
handleCreateCharacter();
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="h-screen bg-[#161616F2] text-white w-[527px] border-r border-neutral-800 overflow-hidden animate-slideIn flex flex-col">
|
||||
<div className="p-4 flex-1 overflow-auto">
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<img src={Logo} alt="Logo" className="h-16 ml-1" />
|
||||
<h2 className="text-[24px] font-bold tracking-wide text-right flex-1">{locale.title}</h2>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
{characters.map(character => (
|
||||
<div key={character.id}>
|
||||
<CharacterCard
|
||||
character={character}
|
||||
onSelect={handleSelectCharacter}
|
||||
onInfoClick={toggleInfo}
|
||||
showInfo={showInfo === character.id}
|
||||
PlayCharacter={PlayCharacter}
|
||||
/>
|
||||
{character.isActive && showInfo === character.id && (
|
||||
<CharacterInfo
|
||||
character={character}
|
||||
onClose={() => setShowInfo(null)}
|
||||
isAllowedtoDelete={Candelete}
|
||||
PlayCharacter={PlayCharacter}
|
||||
handleDelete={handleDeleteCharacter}
|
||||
locale={locale}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-4 border-t border-neutral-800">
|
||||
<button
|
||||
className={`w-full h-[70px] ${characters.length >= MaxAllowedSlot ? 'bg-gray-500' : 'bg-[#FB9B04] cursor-pointer hover:bg-orange-600'} text-[#383838] p-3 rounded flex items-center justify-center transition-colors`}
|
||||
onClick={handleCreateCharacter}
|
||||
disabled={characters.length >= MaxAllowedSlot}
|
||||
>
|
||||
<Plus size={24} />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default CharacterSelection;
|
||||
@@ -0,0 +1,58 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
:root {
|
||||
--primary: #ff9800;
|
||||
--primary-dark: #f57c00;
|
||||
--dark-bg: #1c1c1c;
|
||||
--card-bg: #262626;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: "Poppins", sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
color: white;
|
||||
}
|
||||
|
||||
@keyframes slideIn {
|
||||
from {
|
||||
transform: translateX(-100%);
|
||||
opacity: 0;
|
||||
}
|
||||
to {
|
||||
transform: translateX(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes slideDown {
|
||||
from {
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
to {
|
||||
max-height: 500px;
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.animate-slideIn {
|
||||
animation: slideIn 0.5s ease-out forwards;
|
||||
}
|
||||
|
||||
.animate-slideDown {
|
||||
animation: slideDown 0.3s ease-out forwards;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.transition-all {
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 300ms;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import App from './App.tsx';
|
||||
import './index.css';
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<App />
|
||||
);
|
||||
@@ -0,0 +1,15 @@
|
||||
export interface Character {
|
||||
id: string;
|
||||
name: string;
|
||||
birthDate: string;
|
||||
gender: 'MALE' | 'FEMALE';
|
||||
occupation: string;
|
||||
isActive?: boolean;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
||||
export interface Locale {
|
||||
char_info_title: string;
|
||||
play : string;
|
||||
title : string;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { isEnvBrowser } from "./misc";
|
||||
|
||||
/**
|
||||
* Simple wrapper around fetch API tailored for CEF/NUI use. This abstraction
|
||||
* can be extended to include AbortController if needed or if the response isn't
|
||||
* JSON. Tailor it to your needs.
|
||||
*
|
||||
* @param eventName - The endpoint eventname to target
|
||||
* @param data - Data you wish to send in the NUI Callback
|
||||
* @param mockData - Mock data to be returned if in the browser
|
||||
*
|
||||
* @return returnData - A promise for the data sent back by the NuiCallbacks CB argument
|
||||
*/
|
||||
|
||||
export async function fetchNui<T = unknown>(
|
||||
eventName: string,
|
||||
data?: unknown,
|
||||
mockData?: T,
|
||||
): Promise<T> {
|
||||
const options = {
|
||||
method: "post",
|
||||
headers: {
|
||||
"Content-Type": "application/json; charset=UTF-8",
|
||||
},
|
||||
body: JSON.stringify(data),
|
||||
};
|
||||
|
||||
if (isEnvBrowser() && mockData) return mockData;
|
||||
|
||||
const resourceName = (window as any).GetParentResourceName
|
||||
? (window as any).GetParentResourceName()
|
||||
: "nui-frame-app";
|
||||
|
||||
const resp = await fetch(`https://${resourceName}/${eventName}`, options);
|
||||
|
||||
const respFormatted = await resp.json();
|
||||
|
||||
return respFormatted;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// Will return whether the current environment is in a regular browser
|
||||
// and not CEF
|
||||
export const isEnvBrowser = (): boolean => !(window as any).invokeNative;
|
||||
|
||||
// Basic no operation function
|
||||
export const noop = () => {};
|
||||
@@ -0,0 +1,49 @@
|
||||
import { MutableRefObject, useEffect, useRef } from "react";
|
||||
import { noop } from "./misc";
|
||||
|
||||
interface NuiMessageData<T = unknown> {
|
||||
action: string;
|
||||
data: T;
|
||||
}
|
||||
|
||||
type NuiHandlerSignature<T> = (data: T) => void;
|
||||
|
||||
/**
|
||||
* A hook that manage events listeners for receiving data from the client scripts
|
||||
* @param action The specific `action` that should be listened for.
|
||||
* @param handler The callback function that will handle data relayed by this hook
|
||||
*
|
||||
* @example
|
||||
* useNuiEvent<{visibility: true, wasVisible: 'something'}>('setVisible', (data) => {
|
||||
* // whatever logic you want
|
||||
* })
|
||||
*
|
||||
**/
|
||||
|
||||
export const useNuiEvent = <T = unknown>(
|
||||
action: string,
|
||||
handler: (data: T) => void,
|
||||
) => {
|
||||
const savedHandler: MutableRefObject<NuiHandlerSignature<T>> = useRef(noop);
|
||||
|
||||
// Make sure we handle for a reactive handler
|
||||
useEffect(() => {
|
||||
savedHandler.current = handler;
|
||||
}, [handler]);
|
||||
|
||||
useEffect(() => {
|
||||
const eventListener = (event: MessageEvent<NuiMessageData<T>>) => {
|
||||
const { action: eventAction, data } = event.data;
|
||||
|
||||
if (savedHandler.current) {
|
||||
if (eventAction === action) {
|
||||
savedHandler.current(data);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
window.addEventListener("message", eventListener);
|
||||
// Remove Event Listener on component cleanup
|
||||
return () => window.removeEventListener("message", eventListener);
|
||||
}, [action]);
|
||||
};
|
||||
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
@@ -0,0 +1,33 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
export default {
|
||||
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
orange: {
|
||||
500: '#FF9800',
|
||||
600: '#F57C00',
|
||||
},
|
||||
neutral: {
|
||||
800: '#262626',
|
||||
900: '#1c1c1c',
|
||||
}
|
||||
},
|
||||
animation: {
|
||||
'slide-in': 'slideIn 0.5s ease-out forwards',
|
||||
'slide-down': 'slideDown 0.3s ease-out forwards',
|
||||
},
|
||||
keyframes: {
|
||||
slideIn: {
|
||||
'0%': { transform: 'translateX(-100%)', opacity: 0 },
|
||||
'100%': { transform: 'translateX(0)', opacity: 1 },
|
||||
},
|
||||
slideDown: {
|
||||
'0%': { maxHeight: '0', opacity: 0, transform: 'translateY(-10px)' },
|
||||
'100%': { maxHeight: '500px', opacity: 1, transform: 'translateY(0)' },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES2022",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import react from '@vitejs/plugin-react';
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
plugins: [react()],
|
||||
optimizeDeps: {
|
||||
exclude: ['lucide-react'],
|
||||
},
|
||||
build: {
|
||||
outDir: 'build',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user