hello i want to make marker and when player hits that marker,it shows him text(dxDrawText)
and it should output on chat test 9835
so i dont know how to script,i have just looked on wiki some examples and i tried doing this funny code but like i though,it isnt working.
i dont know how to use dxdrawtext with just regular text because on wiki there is just 1 example which gets zone name by itself but i just want to make my own text,i hope that you understand me.
here is my lua
local myMarker = createMarker(2043.8688964844, 838.22564697266, 6.7421550750732, 'corona', 2.0, 255, 0, 0, 150)
function MarkerHit( hitElement, matchingDimension )
local elementType = getElementType( hitElement )
outputChatBox( elementType.." test 9835", getRootElement(), 0, 175, 255 )
dxDrawText ( 9835, tocolor ( 0, 175, 255, 255 ), 1.02, "pricedown" )
end
addEventHandler( "onMarkerHit", myMarker, MarkerHit )
function HandleTheRendering ( )
addEventHandler ( "onClientRender", root, createText )
end
addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering )
and meta
"9835" type="script" name="dxdrawtextmarker" />