Jump to content

Marker script


Nerses

Recommended Posts

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Man it's client side

translated to the client again does not work, decided to open the debug and this is what is written

bad argument @, getDistanceBetweenPoints3D' [expected vector3 at argument 4, got nill] 

this is how you ca fix it you must edit it by your self

local Text = { 
    -- text , position { x , y ,z } , color { r, g, b} 
    {text="put text here", tx = , ty = , tz = ,r = 255, g = 0, b = 0},   
} 
  
local screenX , screenY = guiGetScreenSize () 
  
function DrawText() 
    for a,b in pairs(Text) do 
        local x,y = getScreenFromWorldPosition(b["tx"], b["ty"], b["tz"]+0.2) 
        local camX,camY,camZ = getCameraMatrix() 
        if (x and y and getDistanceBetweenPoints3D(camX, camY, camZ, b["tx"], b["ty"], b["tz"]) <= 20) then 
           dxDrawText ( b["text"] , x , y , x , y , tocolor (b["r"], b["g"], b["b"], 255) , ( screenX / 1440 ) * 2 , "default-bold" , "center" , "center" , false , true , false ) 
        end 
    end 
end 
addEventHandler("onClientPreRender", root, DrawText) 

Edited by Guest
Link to comment
Man it's client side

translated to the client again does not work, decided to open the debug and this is what is written

bad argument @, getDistanceBetweenPoints3D' [expected vector3 at argument 4, got nill] 

thank you bro :D

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