Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: drawtextonelement
1. drawTextOnElement
Siemson;) Nie wiem co robi? ?le, dlatego udaj? si? po pomoc do Was. Mam pojazdy w server.lua, i chc? po stronie klienckiej doda? dla nich tekst(bo ta funkcja dzia?a tylko po stronie klienta(chyba). No i stworzy?em taki kod, tylko nie dzia?a :P Jakie? rady kto?? ;>

[lua]function mytext()
for k, v in ipairs(getElementsByType("vehicle")) do
if (getElementModel(v)==407) then
dt = dxDrawTextOnElement(v,"test",1,20,30,30,30,255,1,"default")
end
end
addEventHandler("onClientResourceStart", root, mytext)

function dxDrawTextOnElement(TheElement,text,height,distance,R,G,B,alpha,size,font,checkBuildings,checkVehicles,checkPeds,checkDummies,seeThroughStuff,ignoreSomeObjectsForCamera,ignoredElement)
local x, y, z = getElementPosition(TheElement)
local x2, y2, z2 = getElementPosition(localPlayer)
local distance = distance or 20
local height = height or 1
local checkBuildings = checkBuildings or true
local checkVehicles = checkVehicles or false
local checkPeds = checkPeds or false
local checkObjects = checkObjects or true
local checkDummies = checkDummies or true
local seeThroughStuff = seeThroughStuff or false
local ignoreSomeObjectsForCamera = ignoreSomeObjectsForCamera or false
...