Are you retarded?
You just created a string with the native written into it…
Use this:
AddTextEntry('FE_THDR_GTAO', '~b~Daylight~r~RP | ' .. GetPlayerServerId(PlayerId()))
Are you retarded?
You just created a string with the native written into it…
Use this:
AddTextEntry('FE_THDR_GTAO', '~b~Daylight~r~RP | ' .. GetPlayerServerId(PlayerId()))
Lad, Not everyone knows lua like you might lol. no need to call me retarded
I mean, it should be pretty obvious that you can’t put a Native inside a string and expect it to work…
Not to someone who doesn’t really understand lua lmao, still enough to get called retarded on a forum but ok sir o7
Well, let’s keep this topic on-topic.
hey i want it to be like this but i cant get is to work how it want it to
here is a image of how i want it to be
Please help me
that is just the id not the name
it works whit this code here
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~m~| ~b~ Discord~m~:~b~ x7u54NH ~m~| ~r~ User ~m~ ' .. (GetPlayerName(i)))
and it works whit this code here
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~m~| ~b~ Discord~m~:~b~ x7u54NH ~m~| ~r~ User ~m~ ' .. GetPlayerServerId(PlayerId()))
But how can i get both to work at the same time?
i want it to be like this but i cant get it to work
Hi,
Test with :
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~m~| ~b~ Discord~m~:~b~ x7u54NH ~m~| ~r~ User ~m~ ' .. GetPlayerServerId(PlayerId()) .. 'ID :' .. (GetPlayerName(i)))
yeah thanks it work now but it looks a bit fucked up there whit the id
EDIT
i fixed it thanks for the help m8
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~m~| ~b~Discord~m~: ~b~x7u54NH~m~ | ~r~ID~m~ ' .. GetPlayerServerId(PlayerId()) .. ' ~m~| ~r~Name: ~b~' .. (GetPlayerName(i)))
ahh okay thanks i had fixed it but thanks for the help
So, I don’t know why but if you look at image 1, you see that it works. But when the script has been on for a while, it changes to the way you see in image 2. To fix it I have to restart the script, can you please help me?
Config
function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end
Citizen.CreateThread(function()
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~t~| ~g~Discord: x7u54NH~t~ | ~b~ID: ' .. GetPlayerServerId(PlayerId()) .. ' ~t~| ~b~Name: ~b~' .. (GetPlayerName(i)))
end)
Wouldn’t this work?
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~t~| ~g~Discord: x7u54NH~t~ | ~b~ID: ' .. GetPlayerServerId(PlayerId()) .. ' ~t~| ~b~Name: ~b~' .. GetPlayerName(PlayerId()))
im gonna try that thanks for the help
i have the same problem
Edit:
Mabye if i add so the script updates so the script holds the player names uptodate for example it checks for updates evry 5 or 10 min idk
idk how to add it thoe but i saw other scripts has it like that
Try this should work fine
function SetTitle(key, value)
local name = GetPlayerName(PlayerId())
local id = GetPlayerServerId(PlayerId())
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), 'FE_THDR_GTAO', "~y~TGA Roleplay ~c~| ~g~Discord: x7u54NH ~c~| ~b~ID: " .. id .. " ~c~| ~w~Name: ~r~" .. name)
end
Citizen.CreateThread(function()
SetData()
while true do
Citizen.Wait(2500)
SetTitle()
end
end)
Thanks im gonna test that
EDIT:
That did not work
Edit2:
So i changed the code and now it works but now i need to wait if i have the same problem or not
here is the code that i use now
function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey("ADD_TEXT_ENTRY"), key, value)
end
Citizen.CreateThread(function()
AddTextEntry('FE_THDR_GTAO', '~y~TGA Roleplay ~t~| ~g~Discord: x7u54NH~t~ | ~b~ID: ' .. GetPlayerServerId(PlayerId()) .. ' ~t~| ~b~Name: ~b~' .. GetPlayerName(PlayerId()))
end)
Citizen.CreateThread(function()
SetData()
while true do
Citizen.Wait(2500)
SetTitle()
end
end)
Edit3:
now i have the same problem
it works for me allso but when it has take some time it gets fucked