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

Wysłany: 2014-12-26, 05:03


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Witam prosi?bym o kod albo wskaz?wki na napis nad markerem
Za pomoc respekt i piwo.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-26, 10:05


monio







Wiek: 30
Na forum: 4887 dni
Posty: 319
Nick w MP: Monio99

Piwa: 3565

Respekt: 120,5
Respekt: 120,5

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-26, 11:05


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

Nadal nic , napisz mi jakiej funkcji musz? u?y? ?eby zrobi? tekst w powietrzu kt?ry zawsze jest skierowany w moim kierunku, to sam wykminie.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-26, 12:42


TheTroll

Pan Majster






Wiek: 38
Na forum: 4764 dni
Posty: 219
Nick w MP: TheTroll

Piwa: 1114

Respekt: 120
Respekt: 120

Mo?esz pobra? pozycj? markera funkcj? getElementPosition, nast?pnie u?ywasz funkcji getScreenFromWorldPosition a potem ju? tworzysz tekst funkcj? dxDrawText.

Ma?y przyk?ad
addEventHandler("onClientRender",getRootElement(),function ()
local x,y,getElementPosition(element) -- element marker
local xs,ys,ds getScreenFromWorldPosition(x,y,z+2)
dxDrawText("Jaki? tam tekst",xs,ys+15,xs,ys,tocolor(255,255,255),1.2,"default","center")
end)


Nie testowane ale powinno dzia?a? :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-26, 12:59


LordKamis







Wiek: 26
Na forum: 4340 dni
Posty: 107

Piwa: 190

Respekt: 60

TheTroll, Niestety nie dzia?a :{ , a w db3 nic nie ma.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-26, 15:09


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Zr?b to skryptem na 3dtexty dajac pozycje troch? wyzsza od markera, jak si? tekst nie poja znaczy, ze musisz wy?ej podnie?? gdy? teksty jak s? nisko to teleportuja si? przez market tak jak gracze. Je?eli to chodzi o marker teleportujacy. Skrypt 3dtext byl gdzie? na forum jakby co.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-26, 17:52


Bingwin

LUA MTA






Wiek: 27
Na forum: 4191 dni
Posty: 95
Nick w MP: Bingwin

Piwa: 2070

Respekt: 98

Ostrzeżeń: 40%
Ja to mam zrobione w 2 osobnych plikach od strony Client .

Tu masz same napisy i pozycje napis?w

local marker1 createMarker ( -2178.84058651.2059349.43750"cylinder"1.50000)
 
setElementData marker1 "message""**Regulamin Licytacji w ciemno**\n 1.Jesli wylicytowales garaz , a nie chcesz zaplacic za pojazd ktory wygrales = ban 7dni \n 2.Jak wyjdziesz z serwera [Quit] a nie zakupisz wygranego garazu = ban 7dni \n\n ** Informacje *** \n Licytujesz w ciemno ,raz trafisz super auto \n raz zlom , nie wiesz jaki ma przebieg oraz jaki to pojazd.\n Do wyboru masz tylko jeden garaz : ZIELONY oraz CZERWONY \n Licytujac zgadzasz sie na regulamin Licytajci. \n Licytacja moze byc codziennie ,jak tylko osoba ktora prowadzi\nlicytacje jest na serwerze.\n Licytacje prowadzi : Pingwin799e" )

 local marker2 createMarker ( -2184.32031711.0112353.89063"cylinder"1.50000)
 
setElementData marker2 "message""== ZIELONY ==" )
local marker3 createMarker ( -2178.85303711.0083053.89063"cylinder"1.502552550)
 
setElementData marker3 "message""== CZERWONY ==" )

local marker4 createMarker ( -2243.72461643.4600249.0"cylinder"1.50000)
 
setElementData marker4 "message"">> LICYTACJE <<" )


A tu masz reszcze tego skryptu | pokazuje tez czy gra jest zminimalizowana



 
 -- Edit dla SecondLife (2014by Pingwin799

function isEmptyvehicle )
    local passengers getVehicleMaxPassengersvehicle )
    if typepassengers ) == 'number' then
        for seat 0passengers do
            if getVehicleOccupantvehicleseat then
                return false
            end
        end
    end
    return true
end

function renderIng( )
    local xygetCameraMatrix( )
    local dimension getElementDimensionlocalPlayer )
    for keypickup in ipairs getElementsByType"pickup" ) ) do
        if getElementDimensionpickup ) == dimension then
            local pxpypz getElementPositionpickup )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
            if distance <= 20 then
                local text getElementDatapickup"message" )    
                if text and ( distance or isLineOfSightClearxyzpxpypz 0.7truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 0.7 )
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
--                         dxDrawRectanglesx 5sy 51010tocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1"default-bold""center""center" )
                    end
                end
            end
        end
    end
    
        for keyvehicle in ipairs getElementsByType"player" ) ) do -- infa
        if getElementDimensionvehicle ) == dimension then
            local pxpypz getElementPositionvehicle )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
             if distance <= 10 then

                if ( distance or isLineOfSightClearxyzpxpypz 1.1truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 1.5)
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )


                        -- dxDrawRectanglesx 200sy 2539515tocolor000200 ) )
if getElementData vehicle"afk"then 
                         dxDrawTexttostring"Gra zminimalizowana" ), sxsysxsytocolor(247245188200), 2.2"default-bold""center""center" )


end
                end
            end
        end
end
end 
    for keymarker in ipairs getElementsByType"marker" ) ) do
        if getElementDimensionmarker ) == dimension then
            local pxpypz getElementPositionmarker )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
            if distance <= 20 then
                local text getElementDatamarker"message" )    
                if text and ( distance or isLineOfSightClearxyzpxpypz 1.7truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 1.7 )
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
--                         dxDrawRectanglesx 5sy 51010tocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1.0"default-bold""center""center" )
                    end
                end
            end
        end
    end
    for keyplayer in ipairs getElementsByType"player" ) ) do
        if getElementDimensionplayer ) == dimension then
            local pxpypz getElementPositionplayer )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
            if distance <= 20 then
                local text getElementDataplayer"message" )    
                if text and ( distance or isLineOfSightClearxyzpxpypz 1.1truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 0.2)
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
                        -- dxDrawRectanglesx 5sy 51010tocolor000200 ) )
                         dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1.2"default""center""center" )
                    end
                end
            end
        end
    end        
    for keyped in ipairs getElementsByType"ped" ) ) do
        if getElementDimensionped ) == dimension then
            local pxpypz getElementPositionped )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
            if distance <= 20 then
                local text getElementDataped"message" )    
                if text and ( distance or isLineOfSightClearxyzpxpypz 0truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 0.2)
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
--                         dxDrawRectanglesx 5sy 110htocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 2"default""center""center" )
                    end
                end
            end
        end
    end    
    for keyvehicle in ipairs getElementsByType"vehicle" ) ) do
        if getElementDimensionvehicle ) == dimension then
            local pxpypz getElementPositionvehicle )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
            if distance <= 20 then
                local text getElementDatavehicle"message" )    
                if text and ( distance or isLineOfSightClearxyzpxpypz1.1truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz )
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
                        --dxDrawRectanglesx 5sy 110htocolor000200 ) )
dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ),1.0"default-bold""center""center" )
                    end
                end
            end
        end
    end    
    for keyobject in ipairs getElementsByType"object" ) ) do
            local pxpypz getElementPosition( object )
            local distance getDistanceBetweenPoints3Dpxpypzxy)
            if distance <= 20 then
                local text getElementDataobject"message" )    
                if text and ( distance or isLineOfSightClearxyzpxpypz 1.1truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 0.0)
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
--                         dxDrawRectanglesx 0.85sy 21150htocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1"default-bold""center""center" )
                    end
                end
            end
        end
    end    
addEventHandler"onClientRender"getRootElement( ),renderIng)



Licze na piwo ;-)

Podpis


RolePlayGaming - KLIKNIJ (ZEBRAKI)
Numer GG: 49514852|Skype: parabol235
Postaw piwo autorowi tego posta
 

 
Więcej szczegółów
Wystawiono 1 piw(a):
Prever77
Wysłany: 2014-12-26, 22:37


Dixers

No-Life






Wiek: 26
Na forum: 4312 dni
Posty: 549
Nick w MP: Dixers

Piwa: 412

Respekt: 56,8

Bingwin, super. Je?li pozwolisz te? skorzystam z tego kodu.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-27, 01:04


Bingwin

LUA MTA






Wiek: 27
Na forum: 4191 dni
Posty: 95
Nick w MP: Bingwin

Piwa: 2070

Respekt: 98

Ostrzeżeń: 40%
Dixers, No spoko nie ma sprawy :D

Podpis


RolePlayGaming - KLIKNIJ (ZEBRAKI)
Numer GG: 49514852|Skype: parabol235
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-27, 23:36


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

Bingwin, te opisy dzia?aj?, ale "Gra zminimalizowana" nie dzia?a. Gracz ma zminimalizowan? i stoi przede mn? lecz ja tego nie widze, ?e ma zminimalizowan?. Mam folder, a w nim 2 pliki i meta. S-side i C-side, w meta mam to wpisane i oby dwa po stronach clienta. Prosi?bym o pomoc, dlaczego nie wy?wietla si? to.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-28, 09:14


Bingwin

LUA MTA






Wiek: 27
Na forum: 4191 dni
Posty: 95
Nick w MP: Bingwin

Piwa: 2070

Respekt: 98

Ostrzeżeń: 40%
w DB3 co? pisze ?

Podpis


RolePlayGaming - KLIKNIJ (ZEBRAKI)
Numer GG: 49514852|Skype: parabol235
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-12-28, 12:20


Fanciak

BOT






Wiek: 25
Na forum: 4446 dni
Posty: 728
Nick w MP: Fanciak

Piwa: 1572

Respekt: 500
Respekt: 500

W?a?nie nie. DB3 nie pokazuje ?adnego b??du. Napisy si? pojawiaj?, ale jedyny b??d to ten z gr? zminimalizowan?. Albo ja co? robie ?le, albo nie wiem. Je?eli mo?esz to prosi?bym o zapakowanie tego do zipu i podes?anie mi nawet na PM lub tutaj. Mo?e wtedy si? uda.

Postaw piwo autorowi tego posta
 

 
Tagi: napis :: nad :: markerem
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Napis nad markerem 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