Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

danish #179

Closed
wants to merge 124 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
ddb8bfb
deleted character confirming
GeekHamza1 Apr 30, 2022
6b98414
Update style.css
tom-osborne Jul 9, 2022
339eba5
Merge pull request #101 from ElvisMatias/patch-2
tom-osborne Jul 9, 2022
06bc65b
Merge branch 'main' into patch-2
tom-osborne Jul 9, 2022
90dacba
Update script.js
tom-osborne Jul 9, 2022
80bd676
Update style.css
tom-osborne Jul 9, 2022
14125ee
Merge pull request #124 from r5-Scripts/main
tom-osborne Jul 9, 2022
40bf59d
Merge branch 'main' into patch-2
tom-osborne Jul 9, 2022
d1bffb0
Update main.lua
tom-osborne Jul 9, 2022
bd6868d
Update main.lua
tom-osborne Jul 9, 2022
0c323aa
Merge pull request #110 from GeekHamza1/patch-2
tom-osborne Jul 9, 2022
bc06dd5
add dollar format
FlexBuf Jul 10, 2022
9d88c2b
Merge pull request #128 from ElvisMatias/patch-3
tom-osborne Jul 12, 2022
a9a7ae1
Update regex to match word case. Fixes #79
tom-osborne Jul 15, 2022
27ca910
Merge pull request #129 from tom-osborne/main
GhzGarage Jul 15, 2022
9dd9586
[lint] Add qbapartments to extra_libs
tom-osborne Jul 19, 2022
f6a7bf2
Merge pull request #133 from tom-osborne/main
tom-osborne Jul 19, 2022
1c8c559
[QoL] Import start apartment config setting from qb-apartments
tom-osborne Jul 19, 2022
41e4765
Merge pull request #134 from tom-osborne/main
tom-osborne Jul 20, 2022
fbf178c
small tweaks
TransitNode Jul 25, 2022
283b04f
Update main.lua
TransitNode Jul 25, 2022
2a930c5
oops
TransitNode Jul 25, 2022
d5adf1d
Merge pull request #136 from TransitNode/main
tom-osborne Jul 28, 2022
b889bf9
feat(server): preloading timeout
BerkieBb Aug 20, 2022
3fd6206
feat(server): preloading timeout
BerkieBb Aug 22, 2022
15ec8ab
Add admin command
Z3rio Aug 25, 2022
79d5ea8
Add delete char command
Z3rio Aug 27, 2022
b1282f4
Update main.lua
Z3rio Aug 27, 2022
b5e456d
Merge pull request #138 from BerkieBb/main
tom-osborne Aug 29, 2022
fef0e9c
UI Revisions
Z3rio Aug 29, 2022
c9870c1
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 29, 2022
b105933
Fix readme screenshots
Z3rio Aug 29, 2022
858b375
Merge branch 'main' into main
Z3rio Aug 29, 2022
92c0cb5
Move drop player to qb-core
Z3rio Aug 29, 2022
46e7f59
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 29, 2022
65b2467
Update server/main.lua
Z3rio Aug 29, 2022
c5b7e9c
Remove unused styles + html
Z3rio Aug 29, 2022
51c3e8a
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 29, 2022
858f801
Make button text larger + more readable
Z3rio Aug 29, 2022
b5667bb
Update html/style.css
Z3rio Aug 30, 2022
f39e005
Update html/index.html
Z3rio Aug 30, 2022
5687572
Fix issues with register + deletion windows
Z3rio Aug 30, 2022
de79641
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 30, 2022
5bde115
Further fixes
Z3rio Aug 30, 2022
d2b12c2
Update index.html
Z3rio Aug 30, 2022
c7b0025
Update index.html
Z3rio Aug 30, 2022
0b1d9cc
Fix color scheme
Z3rio Aug 30, 2022
e32dea4
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 30, 2022
930d1b3
Remove unused classes / ids + fix class / id names
Z3rio Aug 30, 2022
58a2090
Update README.md
Z3rio Aug 30, 2022
9675760
UI Fixes
Z3rio Aug 30, 2022
d265b00
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 30, 2022
09e9cbe
Update style.css
Z3rio Aug 30, 2022
c183825
Fix gender issue
Z3rio Aug 30, 2022
a542971
Update style.css
Z3rio Aug 30, 2022
3e55cac
Merge pull request #141 from Z3rio/main
GhzGarage Aug 30, 2022
8ce9734
Update index.html
w4fflz Aug 31, 2022
de587df
Merge pull request #145 from Wafflzdev/main
tom-osborne Aug 31, 2022
df3f405
Quick gender fix
Z3rio Aug 31, 2022
9675999
Update index.html
Z3rio Aug 31, 2022
bbcbb6f
Merge pull request #1 from qbcore-framework/main
Z3rio Aug 31, 2022
fea2e72
Merge pull request #146 from Z3rio/main
GhzGarage Aug 31, 2022
81ef35f
Change event listener to switch
Z3rio Aug 31, 2022
2ec3c03
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Aug 31, 2022
47d20fb
Fix register animation
Z3rio Aug 31, 2022
39e7bed
Merge branch 'qbcore-framework:main' into main
Z3rio Sep 1, 2022
b9f245d
Fix issue with scrollbars
Z3rio Sep 2, 2022
966b7fb
Merge branch 'main' of https://github.com/Z3rio/qb-multicharacter
Z3rio Sep 2, 2022
4d06b50
Add translations
Z3rio Sep 2, 2022
ca09c65
Add swedish translation
Z3rio Sep 2, 2022
f741fa3
Update style.css
Z3rio Sep 2, 2022
421d403
Update index.html
Z3rio Sep 2, 2022
8693af2
Make UI more responsive
Z3rio Sep 3, 2022
0e86e7f
Fix for characters scroll
Z3rio Sep 3, 2022
e69460a
Merge pull request #151 from Z3rio/main
tom-osborne Sep 4, 2022
0d8577e
create it.lua
EnzoDCdev Sep 4, 2022
fbffd12
Create fr.lua
TonybynMp4 Sep 4, 2022
e239738
add translation to spanish
jeann2013 Sep 5, 2022
9dfc714
Merge pull request #154 from jeann2013/develop
GhzGarage Sep 5, 2022
8369d91
Merge branch 'main' into patch-1
tom-osborne Sep 6, 2022
f0e7e9d
Merge pull request #152 from Enzo-DC/patch-1
tom-osborne Sep 6, 2022
bc37d47
Merge branch 'main' into patch-1
tom-osborne Sep 6, 2022
e8460b5
Merge pull request #153 from TonybynMp4/patch-1
tom-osborne Sep 6, 2022
b828d01
Create ar.lua
RadhwaneDZ Sep 9, 2022
28c3fbd
Merge pull request #157 from RadhwaneDZ/patch-3
tom-osborne Sep 9, 2022
f7e887f
auto switch locale system
Sep 22, 2022
b78c532
auto switch locale system
Sep 22, 2022
9fca320
Merge pull request #160 from buddizer/patch-1
tom-osborne Sep 22, 2022
01bb1ea
Fix UI translations not working
D4isDAVID Sep 22, 2022
9b8a209
Merge pull request #164 from D4isDAVID/fix/locale
tom-osborne Sep 23, 2022
05aec56
Properly implement UI locales
D4isDAVID Sep 25, 2022
39c6cca
Merge pull request #166 from D4isDAVID/feat/locale
tom-osborne Oct 1, 2022
2348772
Update index.html
Irishstevie Oct 7, 2022
4bf46f3
Merge pull request #170 from Irishstevie/patch-3
tom-osborne Oct 7, 2022
101b48a
axios update (needs test)
Irishstevie Oct 20, 2022
9a16d70
Cannot access viewmodel fix
Jorn08 Oct 25, 2022
36e25e4
Merge pull request #174 from Jorn08/viewmodel-fix
tom-osborne Oct 26, 2022
93b98d9
Merge branch 'main' into patch-4
tom-osborne Oct 26, 2022
f0456b4
Merge pull request #172 from Irishstevie/patch-4
tom-osborne Oct 26, 2022
6d722d5
Add country list input feature
PedroTeixeira-unP Oct 26, 2022
44f8238
fix priority
PedroTeixeira-unP Oct 26, 2022
e7a660e
Merge pull request #176 from PedroTeixeira-unP/create-character-feature
tom-osborne Nov 6, 2022
66b0b3e
Bump version / Tidy manifest
S33G Nov 19, 2022
837d477
Merge pull request #181 from charj/patch-1
Z3rio Dec 8, 2022
c438a4d
Fix
Z3rio Dec 12, 2022
054ec72
Change vue to prod version
Z3rio Dec 12, 2022
3cf3b29
Fix error
Z3rio Dec 12, 2022
c8a00ce
[ENHANCEMENT] Ping discord user instead of discord id (#182)
Bama94 Dec 13, 2022
f365b3f
Merge branch 'main' into vue-fix
Z3rio Dec 13, 2022
8706db5
Merge pull request #184 from Z3rio/vue-fix
GhzGarage Dec 13, 2022
ed5c090
Create pt.lua
Bakisito Jan 11, 2023
66bbe7c
Scroll Bar Fix! (#190)
r0adra93 Jan 18, 2023
5fc36df
Added vietnamese language! (#193)
Jan 18, 2023
e76183a
Better Shutdown Loading Screen (#183)
TGIANN Feb 28, 2023
13fdd9b
Merge branch 'qbcore-framework:main' into main
Bakisito Mar 26, 2023
b00e994
Fix spelling of successfully on player load
devnull9090 Jun 23, 2023
32a33d7
Merge pull request #213 from devnull9090/patch-1
GhzGarage Jul 25, 2023
ee6ac0f
add cs translate
zdenda142 Jul 25, 2023
3a2db3d
Added Japanese locales
DekoKiyo Jul 26, 2023
484a1dc
Merge branch 'main' into main
GhzGarage Aug 5, 2023
3174a3b
Merge pull request #215 from zdenda142/main
GhzGarage Aug 5, 2023
16c15bb
Merge pull request #216 from DekoKiyo/main
GhzGarage Aug 5, 2023
56d560c
Merge branch 'main' into main
GhzGarage Aug 5, 2023
b921c1e
Merge pull request #191 from Bakisito/main
GhzGarage Aug 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
with:
capture: "junit.xml"
args: "-t --formatter JUnit"
extra_libs: mysql+polyzone+qblocales
extra_libs: mysql+polyzone+qblocales+qbapartments
- name: Generate Lint Report
if: always()
uses: mikepenz/action-junit-report@v3
with:
report_paths: "**/junit.xml"
check_name: Linting Report
fail_on_failure: false
fail_on_failure: false
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Added support for setting default number of characters per player per Rockstar l
- [qb-weathersync](https://github.com/qbcore-framework/qb-weathersync) - For adjusting the weather while player is creating a character.

## Screenshots
![Character Selection](https://i.imgur.com/EUB5X6Y.png)
![Character Registration](https://i.imgur.com/RKxiyed.png)
![Character Selection](https://cdn.discordapp.com/attachments/934470871333105674/1014215694394589294/unknown.png)
![Character Registration](https://cdn.discordapp.com/attachments/934470871333105674/1014215687700488304/unknown.png)

## Features
- Ability to create up to 5 characters and delete any character.
Expand Down
22 changes: 18 additions & 4 deletions client/main.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local cam = nil
local charPed = nil
local loadScreenCheckState = false
local QBCore = exports['qb-core']:GetCoreObject()

-- Main Thread
Expand Down Expand Up @@ -37,14 +38,26 @@ end

local function openCharMenu(bool)
QBCore.Functions.TriggerCallback("qb-multicharacter:server:GetNumberOfCharacters", function(result)
local translations = {}
for k in pairs(Lang.fallback and Lang.fallback.phrases or Lang.phrases) do
if k:sub(0, ('ui.'):len()) then
translations[k:sub(('ui.'):len() + 1)] = Lang:t(k)
end
end
SetNuiFocus(bool, bool)
SendNUIMessage({
action = "ui",
customNationality = Config.customNationality,
toggle = bool,
nChar = result,
enableDeleteButton = Config.EnableDeleteButton,
translations = translations
})
skyCam(bool)
if not loadScreenCheckState then
ShutdownLoadingScreenNui()
loadScreenCheckState = true
end
end)
end

Expand Down Expand Up @@ -143,7 +156,7 @@ RegisterNUICallback('cDataPed', function(nData, cb)
"mp_m_freemode_01",
"mp_f_freemode_01",
}
model = GetHashKey(randommodels[math.random(1, #randommodels)])
model = joaat(randommodels[math.random(1, #randommodels)])
RequestModel(model)
while not HasModelLoaded(model) do
Wait(0)
Expand All @@ -164,7 +177,7 @@ RegisterNUICallback('cDataPed', function(nData, cb)
"mp_m_freemode_01",
"mp_f_freemode_01",
}
local model = GetHashKey(randommodels[math.random(1, #randommodels)])
local model = joaat(randommodels[math.random(1, #randommodels)])
RequestModel(model)
while not HasModelLoaded(model) do
Wait(0)
Expand Down Expand Up @@ -198,9 +211,9 @@ end)
RegisterNUICallback('createNewCharacter', function(data, cb)
local cData = data
DoScreenFadeOut(150)
if cData.gender == "Male" then
if cData.gender == Lang:t("ui.male") then
cData.gender = 0
elseif cData.gender == "Female" then
elseif cData.gender == Lang:t("ui.female") then
cData.gender = 1
end
TriggerServerEvent('qb-multicharacter:server:createCharacter', cData)
Expand All @@ -210,6 +223,7 @@ end)

RegisterNUICallback('removeCharacter', function(data, cb)
TriggerServerEvent('qb-multicharacter:server:deleteCharacter', data.citizenid)
DeletePed(charPed)
TriggerEvent('qb-multicharacter:client:chooseChar')
cb("ok")
end)
4 changes: 2 additions & 2 deletions config.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Config = {}
Config.StartingApartment = true -- Enable/disable starting apartments (make sure to set default spawn coords)
Config.Interior = vector3(-814.89, 181.95, 76.85) -- Interior to load where characters are previewed
Config.DefaultSpawn = vector3(-1035.71, -2731.87, 12.86) -- Default spawn coords if you have start apartments disabled
Config.PedCoords = vector4(-813.97, 176.22, 76.74, -7.5) -- Create preview ped at these coordinates
Config.HiddenCoords = vector4(-812.23, 182.54, 76.74, 156.5) -- Hides your actual ped while you are in selection
Config.CamCoords = vector4(-813.46, 178.95, 76.85, 174.5) -- Camera coordinates for character preview screen
Config.EnableDeleteButton = true -- Define if the player can delete the character or not
Config.customNationality = false -- Defines if Nationality input is custom of blocked to the list of Countries

Config.DefaultNumberOfCharacters = 5 -- Define maximum amount of default characters (maximum 5 characters defined by default)
Config.PlayersNumberOfCharacters = { -- Define maximum amount of player characters by rockstar license (you can find this license in your server's database in the player table)
{ license = "license:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", numberOfChars = 2 },
}
}
21 changes: 16 additions & 5 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ fx_version 'cerulean'
game 'gta5'

description 'QB-Multicharacter'
version '1.0.0'
version '1.2.0'

shared_scripts {
'@qb-core/shared/locale.lua',
'locales/en.lua',
'locales/*.lua',
'config.lua'
}

client_scripts {
'client/main.lua'
}

shared_script 'config.lua'
client_script 'client/main.lua'
server_scripts {
'@oxmysql/lib/MySQL.lua',
'@qb-apartments/config.lua',
'server/main.lua'
}

Expand All @@ -17,8 +27,9 @@ files {
'html/index.html',
'html/style.css',
'html/reset.css',
'html/profanity.js',
'html/script.js'
'html/vue.js',
'html/swal2.js',
'html/profanity.js'
}

dependencies {
Expand Down
Loading
Loading