Jump to content

[HELP] Create 3D Hitmarks


Sockylite

Recommended Posts

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

J2T85mU.png

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...