COndor
1
Hi,
I’m trying to get the hashkey/displayname from the car im setting in:
local Veh = GetVehiclePedIsIn(GetPlayerPed(-1), true)
local VehType = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(Veh)))
This works perfectly when I’m in a stock car but when I’m in one of my add-ons it say’s null.
Any suggestions?
KR,
1 Like
Do you set up GXT names for your add-ons vehicles?
1 Like
COndor
3
GXT names? What is that?
I was hoping that I could get hold on one of the .meta values:
modelName>I8
txdName>I8
handlingId>I8
gameName>BMW I8
1 Like
COndor
4
Im aware of the GTX names now, but how should the be set? Don’t each add-on come with a predefined hex?
1 Like
COndor
5
This fixed it:
function AddTextEntry(key, value)
Citizen.InvokeNative(GetHashKey(“ADD_TEXT_ENTRY”), key, value)
end
Citizen.CreateThread(function()
AddTextEntry(‘m2’, ‘m2’)
AddTextEntry(‘m4’, ‘m4’)
end)
1 Like
COndor
6
And ofcause Im still getting null values in 1/20 add-ons. Could this be due to some flaw in the add-on itself?
1 Like
COndor
7
Awesome having a conversation with my self here.
1 Like
COndor
8
Thanks @MarkViolla. I got my first like from this
1 Like
There’s a bug with GXT keys and one function not being patched, this will be fixed in the future.
COndor
10
So a new bug of today or? Because I havent been able to get it to work at all after update.