I’m looking for a way to fix this
How are you calling the native?
Citizen.CreateThread(function()
while true do
for i=0,256 do
N_0x31698aa80e0223f8(i)
end
for id = 0, 256 do
if ((NetworkIsPlayerActive( id )) and GetPlayerPed( id ) ~= GetPlayerPed( -1 )) then
ped = GetPlayerPed( id )
blip = GetBlipFromEntity( ped )
x1, y1, z1 = table.unpack( GetEntityCoords( GetPlayerPed( -1 ), true ) )
x2, y2, z2 = table.unpack( GetEntityCoords( GetPlayerPed( id ), true ) )
distance = math.floor(GetDistanceBetweenCoords(x1, y1, z1, x2, y2, z2, true))
if(ignorePlayerNameDistance) then
if NetworkIsPlayerTalking( id ) then
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id), 247,124,24)
else
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id), 255,255,255)
end
end
if ((distance < disPlayerNames)) then
if not (ignorePlayerNameDistance) then
if NetworkIsPlayerTalking( id ) then
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id), 247,124,24)
else
DrawText3D(x2, y2, z2+1, GetPlayerServerId(id), 255,255,255)
end
end
end
end
end
Citizen.Wait(0)
end
end)
this?
CustomScripts / gameUi-client
if cfg.playerTalking then
local t = 0
for i = 0,256 do
if(GetPlayerName(i))then
if(NetworkIsPlayerTalking(i))then
t = t + 1
if(t == 1)then
drawTxt(0.515, 0.95, 1.0,1.0,0.4, "~y~말하는중", 255, 255, 255, 255)
end
drawTxt(0.520, 0.95 + (t * 0.023), 1.0,1.0,0.4, "" .. GetPlayerName(i), 255, 255, 255, 255)
end
end
end
end
Reference
add “set onesync_enabled 1”
And it didn’t work
Where in the world do you see ‘set onesync_enabled 1’ on this topic!?
Used in server.cfg to use 100 slots
server.cfg
resources\CustomScripts " gameui-client "
resources\CustomScripts " names-client "
Search “NetworkIsPlayerTalking”
._.
You’re getting errors because you’re passing a non-player to a native that is expecting a player. So ensure the param is a player before calling the native. So use GET_ACTIVE_PLAYERS or NETWORK_IS_PLAYER_ACTIVE.
I just needed a talking UI for the default UI and it worked
I can’t understand what I mean by my poor English and lua
I need help.
I’m not here to teach you Lua.
That works fine unless you use set onesync_enabled 1.
I don’t know why
I’ve told you why.