Samking Posted May 1, 2019 Posted May 1, 2019 local screenWidth,screenHeight = guiGetScreenSize() function renderDisplay ( ) local streamedPlayers = getElementsByType ("player", root, true) if streamedPlayers and #streamedPlayers ~= 0 then local lpos = {getElementPosition(localPlayer)} for _,p in ipairs (streamedPlayers) do if p and isElement (p) then if getElementData (p, "invincible") then local ppos = {getElementPosition(p)} dxDrawImage(520, 250, 50, 50, 'logo.png', getTickCount() / 36 % 360) end end end end end function HandleTheRendering ( ) addEventHandler("onClientRender", root, renderDisplay) end addEventHandler("onClientResourceStart",resourceRoot, HandleTheRendering) How I can draw a logo with player nametag when you enable safe mode it will be visible to all the player. Nametag : https://community.multitheftauto.com/index.php?p=resources&s=details&id=13923 Sorry for my English...
Moderators IIYAMA Posted May 1, 2019 Moderators Posted May 1, 2019 @Samking See example on this page: https://wiki.multitheftauto.com/wiki/GetScreenFromWorldPosition Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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