@gononono64
This commit is contained in:
1 parent
380312cc12
commit
d3ea437dfb
5 files changed
+9
-5
No files matched your search
@@ -112,7 +112,7 @@ end
|
|||||||
function Clothing.OpenMenu(src)
|
function Clothing.OpenMenu(src)
|
||||||
src = src and tonumber(src)
|
src = src and tonumber(src)
|
||||||
assert(src, "src is nil")
|
assert(src, "src is nil")
|
||||||
TriggerClientEvent('qb-clothing:client:openMenu', src)
|
TriggerClientEvent('qb-clothing:client:openMenu', src) -- does this event work while on esx?
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Event handler for when a player loads into the server
|
--- Event handler for when a player loads into the server
|
||||||
@@ -120,7 +120,7 @@ end
|
|||||||
AddEventHandler('community_bridge:Server:OnPlayerLoaded', function(src)
|
AddEventHandler('community_bridge:Server:OnPlayerLoaded', function(src)
|
||||||
src = src and tonumber(src)
|
src = src and tonumber(src)
|
||||||
assert(src, "src is nil")
|
assert(src, "src is nil")
|
||||||
local Player = QBCore.Functions.GetPlayer(src)
|
local Player = QBCore.Functions.GetPlayer(src) -- this locks it to qbcore, we should either just call Framework.identifier or do the require.
|
||||||
if not Player then return end
|
if not Player then return end
|
||||||
local citId = Player.PlayerData.citizenid
|
local citId = Player.PlayerData.citizenid
|
||||||
if not citId then return end
|
if not citId then return end
|
||||||
@@ -201,6 +201,7 @@ RegisterCommand('clothing:openmenu', function(source, args, rawCommand)
|
|||||||
end, false)
|
end, false)
|
||||||
|
|
||||||
|
|
||||||
|
-- This should be moved into unit tests
|
||||||
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
-- RegisterCommand('clothing:crowley', function(source, args, rawCommand)
|
||||||
-- local src = source
|
-- local src = source
|
||||||
-- Clothing.SetAppearance(src, {
|
-- Clothing.SetAppearance(src, {
|
||||||
|
|||||||
@@ -39,3 +39,5 @@
|
|||||||
-- function Clothing.ConvertData(data)
|
-- function Clothing.ConvertData(data)
|
||||||
-- return data
|
-- return data
|
||||||
-- end
|
-- end
|
||||||
|
|
||||||
|
-- This still needed?
|
||||||
@@ -123,7 +123,7 @@ end
|
|||||||
AddEventHandler('community_bridge:Server:OnPlayerLoaded', function(src)
|
AddEventHandler('community_bridge:Server:OnPlayerLoaded', function(src)
|
||||||
src = src and tonumber(src)
|
src = src and tonumber(src)
|
||||||
assert(src, "src is nil")
|
assert(src, "src is nil")
|
||||||
local Player = QBCore.Functions.GetPlayer(src)
|
local Player = QBCore.Functions.GetPlayer(src) -- this locks it to qbcore, we should either just call Framework.identifier or do the require.
|
||||||
if not Player then return end
|
if not Player then return end
|
||||||
local citId = Player.PlayerData.citizenid
|
local citId = Player.PlayerData.citizenid
|
||||||
if not citId then return end
|
if not citId then return end
|
||||||
@@ -162,7 +162,7 @@ Callback.Register('community_bridge:cb:GetAppearance', function(source)
|
|||||||
return Clothing.GetAppearance(src)
|
return Clothing.GetAppearance(src)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
-- The below Should go to unit test
|
||||||
RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
RegisterCommand('clothing:debug', function(source, args, rawCommand)
|
||||||
local src = source
|
local src = source
|
||||||
Clothing.SetAppearance(src, {
|
Clothing.SetAppearance(src, {
|
||||||
|
|||||||
@@ -219,3 +219,4 @@
|
|||||||
-- ]
|
-- ]
|
||||||
-- }
|
-- }
|
||||||
|
|
||||||
|
-- this still needed?
|
||||||
@@ -4,7 +4,7 @@ Clothing.Players = {}
|
|||||||
|
|
||||||
Callback = Callback or Require("lib/utility/shared/callbacks.lua")
|
Callback = Callback or Require("lib/utility/shared/callbacks.lua")
|
||||||
Table = Table or Require('lib/utility/shared/tables.lua')
|
Table = Table or Require('lib/utility/shared/tables.lua')
|
||||||
QBCore = QBCore or exports['qb-core']:GetCoreObject()
|
QBCore = QBCore or exports['qb-core']:GetCoreObject() -- probably easiest for now to call the Framework module
|
||||||
|
|
||||||
--- Internal function to get the full appearance data including skin, model, and converted format
|
--- Internal function to get the full appearance data including skin, model, and converted format
|
||||||
--- @param src number The server ID of the player
|
--- @param src number The server ID of the player
|
||||||
|
|||||||
Reference in new issue
Block a user