Piorun Posted March 25, 2011 Share Posted March 25, 2011 I've got this code: function biznesOne() addEventHandler ( "onClientClick", getRootElement(), function ( button, state, absoluteX, absoluteY, wx, wy, wz, clickedElement ) if state == "up" then outputChatBox(wx.." "..wy.." "..wz) addEventHandler("onClientRender",getRootElement(), function() local px, py, pz = getElementPosition (getLocalPlayer()) dist = getDistanceBetweenPoints3D ( px, py, pz, wx, wy, wz ) if dist < 20.0 then if isLineOfSightClear(px,py,pz,wx,wy,wz,false,false,false,true,false,false,true,nil) then local x, y = getScreenFromWorldPosition ( wx, wy, wz, true ) if x then dxDrawText("Biznes",x,y+2,x+2,y,tocolor(0,0,0),1,"default-bold","center","center") dxDrawText("Biznes",x,y,x,y,tocolor(49,140,231),1,"default-bold","center","center") end end end end) end end) end addEvent("biznesCreatingOne", true) addEventHandler("biznesCreatingOne", getRootElement(), biznesOne) And i want to create some "3d text item" i world x,y,z cursor position (wx, wy, wz). After when i click on the world i see nothing (i know there is a dist, but i'm really near this pos). Please help. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now