Jump to content

nametag ped


BorderLine

Recommended Posts

Posted

hi forum

well i was mading

a nametag for peds

but dont work

i dont know where is the error

debug dont show errors

  
local sx,sy = guiGetScreenSize() 
  
function drawPedTags() 
    for i,v in ipairs(getElementsByType("ped")) do 
        local name = getElementData(v,"name") 
        if name then 
            local x,y,z = getElementPosition(v) 
            local cx,cy,cz = getCameraMatrix() 
            local r,g,b      = getPlayerNametagColor(attached) 
            local nameLength = dxGetTextWidth(pname,textScale,textFont) 
            if isLineOfSightClear(cx,cy,cz,x,y,z,true,true,false,true,false,true,false,v) then 
                if getDistanceBetweenPoints3D(cx,cy,cz,x,y,z) <= 45 then 
                    local px,py = getScreenFromWorldPosition(x,y,z+0.3,0.06) 
                    if px then 
                        local hp = getElementHealth(v) 
                        if hp > 0 then 
                            local width = dxGetTextWidth(name,1,default) 
  
                            dxDrawColorText(name, px + 1, py + 1, px + 1, py + 1, tocolor(r,g,b,255), 1, "pricedown", "center", "center", false, false) 
                            dxDrawColorText(name, px, py, px, py, tocolor(r,g,b,255), 1, "pricedown", "center", "center", false, false) 
                        end 
                    end 
                end 
            end 
        end 
    end 
end 
addEventHandler("onClientRender",getRootElement(),drawPedTags) 
  

thanks so much

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted
local sx,sy = guiGetScreenSize() 
  
function drawPedTags() 
    for i,v in ipairs(getElementsByType("ped")) do 
        local name = getElementData(v,"name") 
        if name then 
            local x,y,z = getElementPosition(v) 
            local cx,cy,cz = getCameraMatrix() 
            local r,g,b      = 0,255,0 
            local nameLength = dxGetTextWidth(name,textScale,textFont) 
            if isLineOfSightClear(cx,cy,cz,x,y,z,true,true,false,true,false,true,false,v) then 
                if getDistanceBetweenPoints3D(cx,cy,cz,x,y,z) <= 45 then 
                    local px,py = getScreenFromWorldPosition(x,y,z+0.3,0.06) 
                    if px then 
                        local hp = getElementHealth(v) 
                        if hp > 0 then 
                            local width = dxGetTextWidth(name,1,default) 
  
                            dxDrawColorText(name, px + 1, py + 1, px + 1, py + 1, tocolor(r,g,b,255), 1, "pricedown", "center", "center", false, false) 
                            dxDrawColorText(name, px, py, px, py, tocolor(r,g,b,255), 1, "pricedown", "center", "center", false, false) 
                        end 
                    end 
                end 
            end 
        end 
    end 
end 
addEventHandler("onClientRender",getRootElement(),drawPedTags) 

The code seems familiar, I'm pretty sure you didn't script this.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

honestly i take from my clients resources

im not pro in script and just im learning editing some scripts

in this just i want show color, dont show code hex

and put the pricedown front

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted
How did u manage to get 40 players in your server with that low scripting skills?

editing scripts from comunity

but no all is edited from comunity

and sorry for off topic.

i dont know why players want the server.. i guess is because have skin mods and other thinks

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

So, you steal scripts from other servers? are you f**** kidding me? we don't help people who steal scripts!

P.S: Part of that script is mine, I'm pretty sure, that's why It seem familiar.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted
So, you steal scripts from other servers? are you f**** kidding me? we don't help people who steal scripts!

Yeah, played his server, got me bored 2 minutes of playing it, left it.

Just weapons + player skins from RE4. Absolutely no code is fully made by himself, as I can see.

And still cannot get why people like this server; it's really boring (not just because he stole scripts, it's SERIOUSLY boring). People is stupid :(

@Jaysds1: There is no need to say you are kinda pro (and you're not even "kinda", you're like medium-low xD)

Posted

:S well if you say im stolen.. okey is good.. but people dont see if ur server have a great scripts

just wanna fun. and have a nice time

and i listen all sugestion

and make thiks aboout that

and sorry for stolen ur script castillo.. my bad.. dont was my intenccion

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted
So, you steal scripts from other servers? are you f**** kidding me? we don't help people who steal scripts!

Yeah, played his server, got me bored 2 minutes of playing it, left it.

Just weapons + player skins from RE4. Absolutely no code is fully made by himself, as I can see.

And still cannot get why people like this server; it's really boring (not just because he stole scripts, it's SERIOUSLY boring). People is stupid :(

@Jaysds1: There is no need to say you are kinda pro (and you're not even "kinda", you're like medium-low xD)

you are right. but people that want

new things.. not same skin of gta , or same weapons.

close topic please.. this is offtopic

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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