Jump to content

how to make static image at ped head?


Recommended Posts

local px,py,pz = getElementPosition(vehicle)

local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz )

if pdistance <= 133 then

local sx,sy = getScreenFromWorldPosition( px, py, pz + 0.3 )

if not sx or not sy then break end

local awatarid = getElementData(player, "omg.avek")

dxDrawImage(sx-27,sy-55, 55, 64 , 'img/'..awatarid..'.png', 0, 0, 0, tocolor ( 255, 255, 255, 140 ) )

end

It works flawlessy but when i'm near to opponent the image is normal, but when im driving out the image is bigger. How can i make it normal-size all the time? Thanks!

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...