Con questa DX Element non ho provato, ho provato con le GUI e mi hanno detto di sostituire dxText:create con dxDrawColorText:create.
Funzione:
function initRace(vehicle, checkpoints, objects, pickups, mapoptions, ranked, duration, gameoptions, mapinfo, playerInfo)
outputDebug( 'MISC', 'initRace start' )
unloadAll()
g_Players = getElementsByType('player')
g_MapOptions = mapoptions
g_GameOptions = gameoptions
g_MapInfo = mapinfo
g_PlayerInfo = playerInfo
triggerEvent('onClientMapStarting', g_Me, mapinfo )
g_dxGUI.mapdisplay:text("Map: "..g_MapInfo.name)
fadeCamera(true)
showHUD(false)
g_Vehicle = vehicle
setVehicleDamageProof(g_Vehicle, true)
OverrideClient.updateVars(g_Vehicle)
--local x, y, z = getElementPosition(g_Vehicle)
setCameraBehindVehicle(vehicle)
--alignVehicleToGround(vehicle)
updateVehicleWeapons()
setCloudsEnabled(g_GameOptions.cloudsenable)
setBlurLevel(g_GameOptions.blurlevel)
g_dxGUI.mapdisplay:visible(g_GameOptions.showmapname)
if engineSetAsynchronousLoading then
engineSetAsynchronousLoading( g_GameOptions.asyncloading )
end
Dopo questo ci sono altre funzioni però sono relative all'healthbar speedbar e time, se ti servono anche quelle dimmelo