ali Posted August 23, 2016 Share Posted August 23, 2016 addCommandHandler("texts",function(cmd,...) Newmsgg = table.concat({...}," ") setElementData(localPlayer,"localMsg",false) setElementData(localPlayer,"localMsg",Newmsgg) addEventHandler("onClientRender",root,drawText) if not isTimer(removeChatBubble) then removeChatBubble = setTimer(function() removeEventHandler("onClientRender",root,drawText) end,10000,1) else killTimer(removeChatBubble) removeChatBubble = setTimer(function() removeEventHandler("onClientRender",root,drawText) setElementData(localPlayer,"localMsg",false) end,10000,1) end end) local screenWidth, screenHeight = guiGetScreenSize ( ) -function drawText() for i,v in ipairs(getElementsByType("player")) local playerX, playerY, playerZ = getElementPosition ( localPlayer ) dxDrawRectangle(500,screenHeight - 550,275,75,tocolor(255,255,255,80)) dxDrawText(Newmsgg,500,screenHeight - 550 ,screenWidth,screenHeight,tocolor(0,0,0,255),1,"pricedown") end I want the dxdrawings to be seen by everyone in a short distance Link to comment
Walid Posted August 23, 2016 Share Posted August 23, 2016 All what you need : getScreenFromWorldPosition() getCameraMatrix() getDistanceBetweenPoints3D() Link to comment
idarrr Posted August 23, 2016 Share Posted August 23, 2016 use getDistanceBetweenPoints3D if you want to get player in short distance. 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