Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-09-16, 17:37


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

Witam,
Chcia?bym si? dowiedzie? jak zrobi? napis nad g?ow? pod ACL. Chcia?bym, aby ten napis by? w kolorze (rgb). Pozycj? powinienem sam ogarn?? raczej. Prosz? o podanie funkcji jakie b?d? musia? u?y?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 20:07


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
Funkcje:
dxDrawText
getPlayerName
getCameraMatrix
getScreenFromWorldPosition
getDistanceBetweenPoints3D


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:17


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

A jak to teraz w ca?o?? z?o?y??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:28


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
strona klienta;

addEventHandler("onClientRender"root, function()
        local nametagFont "bankghotic"
        local nametagScale2 1
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)                                            
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local konto getAccount(player)
                    local level
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "RCON" ) ) then
                    local level "RCON"
                    end
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "Admin" ) ) then
                    local level "Admin"
                    end
                    if level == "RCON" then
                    dxDrawText("RCON"sxcsycsxcsyctocolor(01020255), nametagScale2nametagFont"center""center")
                    end
                    if level == "Admin" then
                    dxDrawText("ADMIN"sxcsycsxcsyctocolor(25500255), nametagScale2nametagFont"center""center")
                    end
                  end
                end
            end
        end
    end


Ostatnio zmieniony przez eject 2016-09-16, 21:30, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:34


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

[2016-09-16 21:33] ERROR: Loading script failed: ranganadglowa/ranga_s.lua:1: unexpected symbol near ']'

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:36


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
Wklej ten kod i ustaw kodowanie na UTF-8
addEventHandler("onClientRender"root, function()
        local nametagFont "bankghotic"
        local nametagScale2 1
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)                                            
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local konto getAccount(player)
                    local level getElementData(player,"level")
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "RCON" ) ) then
                    setElementData(player,"level") = "RCON"
                    end
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "Admin" ) ) then
                    setElementData(player,"level") = "Admin"
                    end
                    if level == "RCON" then
                    dxDrawText("RCON"sxcsycsxcsyctocolor(01020255), nametagScale2nametagFont"center""center")
                    end
                    if level == "Admin" then
                    dxDrawText("ADMIN"sxcsycsxcsyctocolor(25500255), nametagScale2nametagFont"center""center")
                    end
                  end
                end
            end
        end
    end


Ostatnio zmieniony przez eject 2016-09-16, 21:39, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:37


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

Wklei?em teraz po tym jak zmieni?e? na cytat i mam taki b??d:

[2016-09-16 21] ERROR: Loading script failed: ranganadglowa/ranga_s.lua:33: 'end' expected (to close 'function' at line 1) near '<eof>'

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:40


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
dodaj jednego end na ko?cu i zmie? kodowanie na UTF-8

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:40


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

To co pisa?e? z tym kodowaniem mam b??d:

[2016-09-16 21:40] SCRIPT ERROR: ranganadglowa/ranga_s.lua:17: unexpected symbol near '='
[2016-09-16 21:40] ERROR: Loading script failed: ranganadglowa/ranga_s.lua:17: unexpected symbol near '='

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:41


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
i to ma by? strona klienta zmie? w meta.xml

[ Dodano: 2016-09-16, 21:42 ]
Ca?y dzia?aj?cy kod:

addEventHandler("onClientRender"root, function()
        local nametagFont "bankghotic"
        local nametagScale2 1
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)                                            
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local konto getAccount(player)
                    local level getElementData(player,"level")
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "RCON" ) ) then
                    setElementData(player,"level","RCON")
                    end
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "Admin" ) ) then
                    setElementData(player,"level","Admin")
                    end
                    if level == "RCON" then
                    dxDrawText("RCON"sxcsycsxcsyctocolor(01020255), nametagScale2nametagFont"center""center")
                    end
                    if level == "Admin" then
                    dxDrawText("ADMIN"sxcsycsxcsyctocolor(25500255), nametagScale2nametagFont"center""center")
                    end
                  end
                end
            end
        end
    end
    end
    


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:46


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

Nadal b??dy wyskakuj? w DB3.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:48


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
Je?li dzia?a prosi?bym o :piwo:

[ Dodano: 2016-09-16, 21:48 ]
daj mi tw?j kod i ss b?ed?w

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:52


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

Kod:

addEventHandler("onClientRender"root, function()
        local nametagFont "bankghotic"
        local nametagScale2 1
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)                                            
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local konto getAccount(player)
                    local level getElementData(player,"level")
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "RCON" ) ) then
                    setElementData(player,"level","RCON")
                    end
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "Admin" ) ) then
                    setElementData(player,"level","Admin")
                    end
                    if level == "RCON" then
                    dxDrawText("RCON"sxcsycsxcsyctocolor(01020255), nametagScale2nametagFont"center""center")
                    end
                    if level == "Admin" then
                    dxDrawText("ADMIN"sxcsycsxcsyctocolor(25500255), nametagScale2nametagFont"center""center")
                    end
                  end
                end
            end
        end
    end
    end


SS b??d?w: http://imgur.com/a/NQSyb

Ostatnio zmieniony przez iksik 2016-09-16, 21:53, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:55


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
addEventHandler("onClientRender"root, function()
        local nametagFont "bankghotic"
        local nametagScale2 1
        local rootxrootyrootz getCameraMatrix()--getElementPosition(getLocalPlayer())
        for iplayer in ipairs(getElementsByType("player",root,true)) do
            if player ~= localPlayer and getElementDimension(localPlayer)==getElementDimension(player) and getElementInterior(localPlayer)==getElementInterior(player) and getElementAlpha(player)>0 then
                local x,y,getPedBonePosition(player,8)
                local sxsy getScreenFromWorldPosition(xyz+0.43)
                local sxc,syc =getScreenFromWorldPosition(xyz+0.68)
                if sx and sy and sxc and syc then
                local distance getDistanceBetweenPoints3D(rootxrootyrootzxyz)                                            
                if(distance <= 22then
                  if isLineOfSightClearrootx,rooty,rootzx,y,ztruefalsefalsetruefalsefalsetrue,localPlayer then
                    local konto getAccount(player)
                    local level getElementData(player,"level")
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "RCON" ) ) then
                    setElementData(player,"level","RCON")
                    end
                    if isObjectInACLGroup ("user."..kontoaclGetGroup "Admin" ) ) then
                    setElementData(player,"level","Admin")
                    end
                    if level == "RCON" then
                    dxDrawText("RCON"sxcsycsxcsyctocolor(01020255), nametagScale2nametagFont"center""center")
                    end
                    if level == "Admin" then
                    dxDrawText("ADMIN"sxcsycsxcsyctocolor(25500255), nametagScale2nametagFont"center""center")
                    end
                  end
                end
            end
        end
    end
    end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-09-16, 21:58


iksik







Wiek: 26
Na forum: 3571 dni
Posty: 37



Respekt: 50

B??d?w nie pokazuje, ale, aby zobaczy? czy dzia?a musz? poczeka? na koleg?, dzi?ki za pomoc oczywi?cie dam zimne piwko jak b?dzie dzia?a?.

Postaw piwo autorowi tego posta
 

 
Tagi: napis :: nad :: głową :: pod :: acl
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku