Jump to content

Small image or icon in png above the players head (inside a car)


strauss

Recommended Posts

Hello to the MTA community,

 

I want to create a script where a small image/icon appears over the player as soon as the player (only inside a car) touches a marker. The image dissapears after 2 seconds. Im starting this lua learning thing so if you can explain the script that would be better! (not necessary ofc).

Link to comment

You will need it:

dxDrawMaterialLine3D - For display image/icon in 3D space

getPedBonePosition - For get the player head position

onClientRender - For rendering material line 3D

getTickCount - For count visibility time for the material line

isPedInVehicle

onClientMarkerHit

You can also use getScreenFromWorldPosition with dxDrawImage instead of material line 3D but the final effect will be less neat.

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