rv-props-tablet add + Loading Edit + qb-target

- rv-props: prop tableta custom cu logo-ul serverului (prop_rv_tablet)
- 17mov_JobCenter: trigger tableta custom cand playerul este la Job Center
- Loading Screen: logo 320px, texte in romana, accent rosu #cc1133, card info RV
- qb-target: punctul (eye) dublu ca size (8px→16px), hover text rosu #cc1133
- 17mov_JobCenter: GlobalColor #cc1133 (accent mai inchis)
- colors.css: tema Red Valley pe toate NUI-urile (accent, background alb transparent)
- docs: 17mov_Hud API reference complet, server knowledge update
This commit is contained in:
2026-04-01 20:23:47 +03:00
parent f2ea62d16c
commit 89070f745b
5347 changed files with 450 additions and 12423 deletions

View File

@@ -0,0 +1,143 @@
-- ============================================
-- rv-devtools: Comenzi de test pentru dezvoltatori
-- testanim, stopanim, testbubble, stopbubble, testtex
-- ============================================
-- ==========================================
-- TESTANIM: Test animatii + props
-- testanim dict anim [propName] [boneId] [ox oy oz] [rx ry rz]
-- ==========================================
local testProp = nil
RegisterCommand("testanim", function(_, args)
if not args[1] then
print("^3[testanim]^0 Utilizare:")
print(" testanim dict anim -- doar animatie")
print(" testanim dict anim propName -- prop pe mana dreapta (bone 60309)")
print(" testanim dict anim propName boneId -- prop pe bone custom (zero offsets)")
print(" testanim dict anim propName boneId ox oy oz rx ry rz -- full control")
print("^3Exemple:^0")
print(" testanim amb@code_human_in_bus_passenger_idles@female@tablet@base base prop_cs_tablet")
print(" testanim mp_character_creation@lineup@male_a loop_raised prop_police_id_board 28422")
return
end
-- Opreste animatia/propul anterior
ClearPedTasks(PlayerPedId())
if testProp and DoesEntityExist(testProp) then DeleteEntity(testProp) testProp = nil end
local ped = PlayerPedId()
local dict = args[1]
local anim = args[2] or "base"
-- Joaca animatia
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do Wait(10) end
TaskPlayAnim(ped, dict, anim, 2.0, -2.0, -1, 49, 0, false, false, false)
-- Prop optional (arg 3+)
if args[3] then
local model = GetHashKey(args[3])
print("^3[testanim]^0 Loading model: " .. args[3] .. " (hash: " .. model .. ")")
print("^3[testanim]^0 IsModelValid: " .. tostring(IsModelValid(model)))
RequestModel(model)
local timeout = 50 -- 5 seconds max
while not HasModelLoaded(model) and timeout > 0 do Wait(100) timeout = timeout - 1 end
if HasModelLoaded(model) then
print("^2[testanim]^0 Model loaded!")
local coords = GetEntityCoords(ped)
testProp = CreateObject(model, coords.x, coords.y, coords.z, true, true, true)
print("^3[testanim]^0 CreateObject returned: " .. tostring(testProp))
local bone = tonumber(args[4]) or 60309
local ox = tonumber(args[5]) or 0.0
local oy = tonumber(args[6]) or 0.0
local oz = tonumber(args[7]) or 0.0
local rx = tonumber(args[8]) or 0.0
local ry = tonumber(args[9]) or 0.0
local rz = tonumber(args[10]) or 0.0
AttachEntityToEntity(testProp, ped, GetPedBoneIndex(ped, bone),
ox, oy, oz, rx, ry, rz, true, true, false, true, 1, true)
else
print("^1[testanim]^0 TIMEOUT: Model '" .. args[3] .. "' failed to load! IsModelValid=" .. tostring(IsModelValid(model)))
end
end
end, false)
RegisterCommand("stopanim", function()
ClearPedTasks(PlayerPedId())
if testProp and DoesEntityExist(testProp) then DeleteEntity(testProp) testProp = nil end
end, false)
-- ==========================================
-- TESTBUBBLE: Test bubble text deasupra capului
-- testbubble [text]
-- ==========================================
RegisterCommand("testbubble", function(_, args)
local text = table.concat(args, " ")
if text == "" then text = "Test bubble..." end
LocalPlayer.state:set("bubbleText", text, true)
LocalPlayer.state:set("bubbleIcon", "💬", true)
LocalPlayer.state:set("browsingJobs", true, true)
end, false)
RegisterCommand("stopbubble", function()
LocalPlayer.state:set("browsingJobs", false, true)
end, false)
-- ==========================================
-- TESTTEX: Test texture replacement cu imagine PNG
-- testtex [txdName] [textureName]
-- ==========================================
local texApplied = false
RegisterCommand("testtex", function(_, args)
local txdName = args[1] or "prop_cs_tablet"
local texName = args[2] or "prop_tablet_screen_01"
-- Creaza runtime texture din PNG (nu DUI)
local txd = CreateRuntimeTxd("rv_logo_txd")
local tex = CreateRuntimeTextureFromImage(txd, "rv_logo_tex", "web/images/logo.webp")
if tex then
AddReplaceTexture(txdName, texName, "rv_logo_txd", "rv_logo_tex")
print("^2[testtex]^0 Applied PNG: " .. txdName .. " / " .. texName)
texApplied = true
else
print("^1[testtex]^0 Failed to create texture from image!")
end
end, false)
-- testtexall - incearca toate combinatiile
RegisterCommand("testtexall", function()
local txd = CreateRuntimeTxd("rv_logo_txd")
local tex = CreateRuntimeTextureFromImage(txd, "rv_logo_tex", "web/images/logo.webp")
if not tex then
print("^1[testtexall]^0 Failed to create texture!")
return
end
local combos = {
{"prop_cs_tablet", "prop_tablet_screen_01"},
{"prop_cs_tablet", "prop_cs_tablet_d"},
{"prop_cs_tablet", "prop_cs_tablet_scr"},
{"prop_cs_tablet", "tablet_screen"},
{"prop_cs_tablet", "screen"},
{"prop_cs_tablet", "prop_base_black_02"},
{"prop_cs_tablet", "prop_base_white_fullb"},
{"prop_cs_tablet", "prop_fruit_box_01"},
{"prop_cs_tablet", "prop_green_glass3_a"},
}
for _, combo in ipairs(combos) do
AddReplaceTexture(combo[1], combo[2], "rv_logo_txd", "rv_logo_tex")
print("^3[testtexall]^0 Trying: " .. combo[1] .. " / " .. combo[2])
end
print("^2[testtexall]^0 Done! Check tablet.")
end, false)
RegisterCommand("stoptex", function()
RemoveReplaceTexture("prop_cs_tablet", "prop_tablet_screen_01")
texApplied = false
print("^2[stoptex]^0 Texture reset")
end, false)

View File

@@ -0,0 +1,16 @@
fx_version "cerulean"
game "gta5"
lua54 "yes"
author "Red Valley"
description "Dev tools: testanim, testbubble, testtex"
version "1.0.0"
client_scripts {
"client/*.lua",
}
files {
"web/**.*",
"web/**/**.*",
}

View File

@@ -2,9 +2,23 @@
/* DONT CHANGE COLOR FORMAT! It's must stay as 3 numbers separated with spaces representing rgb format */
:root {
--color-accent: 103 155 255;
--color-accent: 204 17 51;
--color-danger: 255 0 61;
--color-background-primary: 200 215 239;
--color-background-primary: 255 255 255;
--color-text-primary: 255 255 255;
--color-text-secondary: 235 235 245;
}
/* ===== RED VALLEY LOADING SCREEN OVERRIDES ===== */
/* MainTitle "Loading" → alb ușor transparent */
.text-6xl.font-\[Agency\].text-accent,
.text-6xl.font-\['Agency'\].text-accent {
color: rgba(255, 255, 255, 0.7) !important;
}
/* MainSubtitle "Screen" → pink/magenta din logo */
.text-6xl.font-\[Agency\].text-white,
.text-6xl.font-\['Agency'\].text-white {
color: #E91E8C !important;
}

View File

@@ -3,7 +3,7 @@
"Enable": true,
"Src": "./loadingscreen/images/logo.webp",
"Size": {
"Width": "160px",
"Width": "320px",
"Height": "auto",
"Left" : "50%",
"Top": "50%"

View File

@@ -2,9 +2,9 @@
/* DONT CHANGE COLOR FORMAT! It's must stay as 3 numbers separated with spaces representing rgb format */
:root {
--color-accent: 103 155 255;
--color-accent: 204 17 51;
--color-danger: 255 0 61;
--color-background-primary: 200 215 239;
--color-background-primary: 255 255 255;
--color-text-primary: 255 255 255;
--color-text-secondary: 235 235 245;
}

View File

@@ -3,7 +3,7 @@
"Enable": true,
"Src": "./loadingscreen/images/logo.webp",
"Size": {
"Width": "160px",
"Width": "320px",
"Height": "auto",
"Left" : "50%",
"Top": "50%"
@@ -96,10 +96,10 @@
"Locale": {
"MainTitle": "Loading",
"MainSubtitle": "Screen",
"CardTitle": "Information!",
"CardDescription": "This is default configuration of loading screen. It's impossible to make loadingscreen config on lua side - that's why it's config is at /web/loadingscreen/config.json. You can play youtube video in background, change music, translate etc.. Also don't forget that you can change colors in /web/colors.css",
"LoadingProgress": "Loading... %s",
"PauseMusic": "Press space to pause music",
"PlayMusic": "Press space to play music"
"CardTitle": "Bun venit!",
"CardDescription": "Bine ai venit pe Red Valley Roleplay! Serverul se încarcă, te rugăm să ai răbdare.",
"LoadingProgress": "Se încarcă... %s",
"PauseMusic": "Apasă SPACE pentru a opri muzica",
"PlayMusic": "Apasă SPACE pentru a porni muzica"
}
}

View File

@@ -26,7 +26,7 @@ Config.Blips = {
-- Some settings of menu
Config.NUI = {
GlobalColor = "#ff1a35", -- "Accent" color of menu
GlobalColor = "#cc1133", -- "Accent" color of menu
Logo = "images/logo.webp", -- Path to logo (located into /web) - should be relative path, so should start without "/"
AnnouncementEnabled = true, -- You can toogle displaying of "announcement" tab into header
Tabs = { -- Here you can change path to background images of each "tab"

View File

@@ -8,73 +8,6 @@ elseif GetResourceState("ox_target") ~= "missing" then
Config.TargetSystem = "qtarget" -- OX_Target have a backward compability to qtarget
end
-- Comenzi utile pentru testare animatii + props
-- testanim dict anim [propName] [boneId] [ox oy oz] [rx ry rz]
local testProp = nil
RegisterCommand("testanim", function(_, args)
if not args[1] then
print("^3[testanim]^0 Utilizare:")
print(" testanim dict anim -- doar animatie")
print(" testanim dict anim propName -- prop pe mana dreapta (bone 60309)")
print(" testanim dict anim propName boneId -- prop pe bone custom (zero offsets)")
print(" testanim dict anim propName boneId ox oy oz rx ry rz -- full control")
print("^3Exemple:^0")
print(" testanim amb@code_human_in_bus_passenger_idles@female@tablet@base base prop_cs_tablet")
print(" testanim mp_character_creation@lineup@male_a loop_raised prop_police_id_board 28422")
return
end
-- Opreste animatia/propul anterior
ClearPedTasks(PlayerPedId())
if testProp and DoesEntityExist(testProp) then DeleteEntity(testProp) testProp = nil end
local ped = PlayerPedId()
local dict = args[1]
local anim = args[2] or "base"
-- Joaca animatia
RequestAnimDict(dict)
while not HasAnimDictLoaded(dict) do Wait(10) end
TaskPlayAnim(ped, dict, anim, 2.0, -2.0, -1, 49, 0, false, false, false)
-- Prop optional (arg 3+)
if args[3] then
local model = GetHashKey(args[3])
RequestModel(model)
while not HasModelLoaded(model) do Wait(10) end
local coords = GetEntityCoords(ped)
testProp = CreateObject(model, coords.x, coords.y, coords.z, true, true, true)
local bone = tonumber(args[4]) or 60309
local ox = tonumber(args[5]) or 0.0
local oy = tonumber(args[6]) or 0.0
local oz = tonumber(args[7]) or 0.0
local rx = tonumber(args[8]) or 0.0
local ry = tonumber(args[9]) or 0.0
local rz = tonumber(args[10]) or 0.0
AttachEntityToEntity(testProp, ped, GetPedBoneIndex(ped, bone),
ox, oy, oz, rx, ry, rz, true, true, false, true, 1, true)
end
end, false)
RegisterCommand("stopanim", function()
ClearPedTasks(PlayerPedId())
if testProp and DoesEntityExist(testProp) then DeleteEntity(testProp) testProp = nil end
end, false)
RegisterCommand("testbubble", function(_, args)
local text = table.concat(args, " ")
if text == "" then text = "Test bubble..." end
LocalPlayer.state:set("bubbleText", text, true)
LocalPlayer.state:set("bubbleIcon", "💬", true)
LocalPlayer.state:set("browsingJobs", true, true)
end, false)
RegisterCommand("stopbubble", function()
LocalPlayer.state:set("browsingJobs", false, true)
end, false)
-- Animatie tableta pentru meniul Job Center
local tabletProp = nil
local animDict = "amb@code_human_in_bus_passenger_idles@female@tablet@base"
@@ -93,7 +26,7 @@ Utils.PlayTabletAnim = function()
TaskPlayAnim(ped, animDict, animName, 2.0, -2.0, -1, 49, 0, false, false, false)
-- Creeaza prop tableta
local model = GetHashKey("prop_cs_tablet")
local model = GetHashKey("prop_rv_tablet")
RequestModel(model)
while not HasModelLoaded(model) do
Wait(10)
@@ -103,7 +36,8 @@ Utils.PlayTabletAnim = function()
tabletProp = CreateObject(model, coords.x, coords.y, coords.z, true, true, true)
-- Ataseaza la mana dreapta (bone 60309)
AttachEntityToEntity(tabletProp, ped, GetPedBoneIndex(ped, 60309),
0.03, 0.002, -0.0, 10.0, 160.0, 0.0, true, true, false, true, 1, true)
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, true, true, false, true, 1, true)
SetModelAsNoLongerNeeded(model)
RemoveAnimDict(animDict)
@@ -115,6 +49,7 @@ Utils.StopTabletAnim = function()
-- Opreste animatia
ClearPedTasks(ped)
-- Sterge prop-ul
if tabletProp and DoesEntityExist(tabletProp) then
DeleteEntity(tabletProp)

View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
width: 100vw;
height: 100vh;
background: #0a0a0a;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
img {
max-width: 70%;
max-height: 70%;
object-fit: contain;
filter: drop-shadow(0 0 20px rgba(255, 0, 50, 0.3));
}
</style>
</head>
<body>
<img src="images/logo.webp" alt="Red Valley">
</body>
</html>

View File

@@ -42,13 +42,13 @@ p {
#eye {
text-align: center;
width: 8px;
height: 8px;
width: 16px;
height: 16px;
border: 1px solid #ffffff;
border-radius: 100%;
position: absolute;
top: calc(50% - 4px);
left: calc(50% - 4px);
top: calc(50% - 8px);
left: calc(50% - 8px);
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
@@ -57,14 +57,14 @@ p {
#eye.active {
text-align: center;
width: 8px;
height: 8px;
border: 1px solid #2575ff;
width: 16px;
height: 16px;
border: 1px solid #cc1133;
border-radius: 100%;
background-color: #2575ff;
background-color: #cc1133;
position: absolute;
top: calc(50% - 4px);
left: calc(50% - 4px);
top: calc(50% - 8px);
left: calc(50% - 8px);
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
@@ -123,8 +123,8 @@ p {
}
#options-wrapper li a:hover, #options-wrapper li a:hover .option-icon{
color: #2575ff !important;
text-shadow: 0px 0px 20px #2575ffaa !important;
color: #cc1133 !important;
text-shadow: 0px 0px 20px #cc1133aa !important;
cursor: pointer;
}

View File

@@ -0,0 +1,12 @@
fx_version "cerulean"
game "gta5"
author "Red Valley"
description "Custom props: rv_tablet"
version "1.0.0"
data_file "DLC_ITYP_REQUEST" "stream/prop_rv_tablet.ytyp"
files {
"stream/prop_rv_tablet.ytyp",
}

Binary file not shown.

Binary file not shown.