Jump to content

need little help :)


Lachuks

Recommended Posts

Posted

How do to Markers and text should be above the player? And how do everything to open with the command... :?:

local screenX, screenY = guiGetScreenSize () 
local marker = createMarker ( 645.57184, 874.22052, -36, "arrow", 3, 0, 255, 0, 170 ) 
  
function leaderText() 
    local xm,ym,zm = getElementPosition(marker) 
    local x,y = getScreenFromWorldPosition(xm,ym,zm-3.5) 
    local camX,camY,camZ = getCameraMatrix() 
        if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, xm,ym,zm) <= 80) then 
           dxDrawText ("Hello!", x,y,x,y, tocolor (0, 255, 0, 180) , ( screenX / 1000 ) * 1.8 , "default-bold" , "center" , "center" , false , true , false ) 
    end 
end 
addEventHandler ("onClientPreRender", root,leaderText) 

Posted
Use
addCommandHandler 

for the command and

Use

attachElements 

to attach the marker to the head

can you put it in pzz :) I rly dont know ho to do it... I one time try and all script dont work

Posted
Use
addCommandHandler 

for the command and

Use

attachElements 

to attach the marker to the head

can you put it in pzz :) I rly dont know ho to do it... I one time try and all script dont work

Post what you made and we will fix it.

Posted

All what you need is

isElementOnScreen() 
getElementPosition() 
getPedBonePosition() 
getDistanceBetweenPoints3D() 
getScreenFromWorldPosition() 
isLineOfSightClear() 
dxGetTextWidth() 
dxDrawText() 

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