SteeLRO Posted February 28, 2014 Posted February 28, 2014 Hi all Why dont work resource https://community.multitheftauto.com/in ... ils&id=734 Please help me
Moderators Citizen Posted February 28, 2014 Moderators 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.
Mr_Moose Posted March 1, 2014 Posted March 1, 2014 dxDrawText onClientRender setPlayerNametagShowing That's all functions you need.
SteeLRO Posted March 1, 2014 Author Posted March 1, 2014 dxDrawText onClientRender setPlayerNametagShowing That's all functions you need. An example please. I am noob in scripting.
Moderators Citizen Posted March 1, 2014 Moderators 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)
SteeLRO Posted March 2, 2014 Author 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
WhoAmI Posted March 2, 2014 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.
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