SteeLRO Posted February 28, 2014 Share Posted February 28, 2014 Hi all Why dont work resource https://community.multitheftauto.com/in ... ils&id=734 Please help me Link to comment
Moderators Citizen Posted February 28, 2014 Moderators Share Posted February 28, 2014 This resource is broken, and the author probably won't fix it. Try to find another one or do it yourself. Link to comment
Mr_Moose Posted March 1, 2014 Share Posted March 1, 2014 dxDrawText onClientRender setPlayerNametagShowing That's all functions you need. Link to comment
SteeLRO Posted March 1, 2014 Author Share Posted March 1, 2014 dxDrawText onClientRender setPlayerNametagShowing That's all functions you need. An example please. I am noob in scripting. Link to comment
Moderators Citizen Posted March 1, 2014 Moderators Share Posted March 1, 2014 Sure: local screenW, screenH = guiGetScreenSize() addEventHandler("onClientResourceStart", resourceRoot, function () for k, player in ipairs (getElementsByType("player")) do setPlayerNametagShowing(player, false) end end) function drawMyName() local myName = getPlayerName(localPlayer) local x, y = screenW/2, screenH/2 dxDrawText(tostring(myName), x, y) end addEventHandler("onClientRender", root, drawMyName) Link to comment
SteeLRO Posted March 2, 2014 Author Share Posted March 2, 2014 Sure: local screenW, screenH = guiGetScreenSize() addEventHandler("onClientResourceStart", resourceRoot, function () for k, player in ipairs (getElementsByType("player")) do setPlayerNametagShowing(player, false) end end) function drawMyName() local myName = getPlayerName(localPlayer) local x, y = screenW/2, screenH/2 dxDrawText(tostring(myName), x, y) end addEventHandler("onClientRender", root, drawMyName) Ty Link to comment
WhoAmI Posted March 2, 2014 Share Posted March 2, 2014 But It won't draw text above your head. You have to get player position every render, and use this function: getScreenFromWorldPosition. 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