Sockylite Posted April 18, 2020 Share Posted April 18, 2020 Hello everyone! I just saw this resource https://community.multitheftauto.com/index.php?p=resources&s=details&id=22 And I've been wondering if I could replace the "coronas" with a image, like this I've tried to edit the client to this Spoiler --[[function onSpawn (team) if (team) then removeCommandHandler ("color") command = false r, g, b = getTeamColor ( team ) elseif command == false then command = addCommandHandler ( "color", setColor) end end]] --[[function setColor (cmd, r2, g2, b2) if r2 then if tonumber (r2) >= 0 and tonumber (r2) <= 255 then r = tonumber (r2) end end if g2 then if tonumber (g2) >= 0 and tonumber (g2) <= 255 then g = tonumber (g2) end end if b2 then if tonumber (b2) >= 0 and tonumber (b2) <= 255 then b = tonumber (b2) end end end]] function weaponfired (weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) local marker = dxDrawImage ( hitX, hitY, hitZ, "hitmarker.png" ) --setTimer ( destroyElement, delay, 1, marker ) end addEventHandler("onClientRender", root, marker) addEventHandler ( "onClientPlayerSpawn", getLocalPlayer(), onSpawn ) command = addCommandHandler ( "color", setColor) addEventHandler ( "onClientPlayerWeaponFire", getRootElement(), weaponfired ) But it did not work, can anyone help me to make this work? Link to comment
#\_oskar_/# Posted April 18, 2020 Share Posted April 18, 2020 use .. getScreenFromWorldPosition Link to comment
Geo Posted April 23, 2020 Share Posted April 23, 2020 On 18/04/2020 at 19:23, #\_oskar_/# said: use .. getScreenFromWorldPosition From the wiki: ...This is useful for attaching 2D gui elements to parts of the world Can you simulate 3D in 2D GUI elements? Link to comment
#\_oskar_/# Posted April 23, 2020 Share Posted April 23, 2020 4 hours ago, Geo said: From the wiki: ...This is useful for attaching 2D gui elements to parts of the world Can you simulate 3D in 2D GUI elements? I think that you mean this https://community.multitheftauto.com/index.php?p=resources&s=details&id=11836 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