五米
local loaded = false
function loadTxd(source, args, raw)
local txd = CreateRuntimeTxd('duiTxd')
local duiObj = CreateDui('https://media.discordapp.net/attachments/813996951066116097/854844624114548786/lcd_sign1.gif', 4096, 1024)
_G.duiObj = duiObj
local dui = GetDuiHandle(duiObj)
local tx = CreateRuntimeTextureFromDuiHandle(txd, 'duiTex', dui)
AddReplaceTexture('bus', 'lcd_sign_1', 'duiTxd', 'duiTex')
end)
Citizen.CreateThread function loadTxd(source, args, raw)
while loaded == false do
Wait(0)
local playerCar = GetVehiclePedIsIn(GetPlayerPed(-1))
if playerCar ~= 0 then
if GetEntityModel(playerCar) == GetHashKey('bus') then
loadTxd()
loaded = true
end
end
if not loaded then
local veh = nil
for veh in EnumerateVehicles() do
if GetEntityModel(playerCar) == GetHashKey('bus') then
loadTxd()
loaded = true
break
end
end
end
end
end)
说它 lua5.3: ...Desktop/rextester_linux_2.0/usercode/29524824/source.lua:10: ')' 附近的意外符号,但我什至在任何地方都找不到它,我什至尝试删除整个第 10 行并粘贴所有代码放回,然后结束)在第 10 行