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

Wysłany: 2014-07-29, 23:29


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
Witam zrobi?em skrypt na prace dorywcza i chce doda? napis na samochodzie jak si? ze spawni ?eby by? na g?rze a nie ma o to kawa?ek kodu

function(samochod)
        local betoniarka auto[source] -- ?aduje auto (daje)
        if betoniarka then -- sprawdza
            if isElementbetoniarka then
                destroyElementbetoniarka )
            end
            auto[source]= nil -- czyste
        end
        
        if isElement(sourcethen
            local betoniarka createVehicle 524780.799987792978386.9000000953674 ) -- betoniarka xz
            setElementData(betoniarka,"message","Praca Dorywcza - Kopalnia")
            warpPedIntoVehicle sourcebetoniarka ) -- tepa gracza do pojazdu 
            auto[source]= betoniarka -- zapisuje 
        end
    end
)


da?em w kodzie takie co?
setElementData(betoniarka,"message","Praca Dorywcza - Kopalnia")
 
ale nie daje tekstu na samochodzie

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-29, 23:48


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

function(samochod)


co to jest ?...

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-30, 11:36


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
ale mi chodzi o napis bo tworzy pojazd mi ale nie tworzy napisu na pojezdzie

o ten kawa?ek kodu

 local betoniarka createVehicle 524780.799987792978386.9000000953674 ) 
          setElementData(betoniarka,"message","Praca Dorywcza - Kopalnia")


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-30, 14:44


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Poka? funkcj? mojego kodu na 3dtexty.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-30, 15:53


kubak14







Wiek: 24
Na forum: 5205 dni
Posty: 119
Nick w MP: Heavy

Piwa: 149

Respekt: 45,8

Ostrzeżeń: 20%
function samochod()
        local betoniarka auto[source] -- ?aduje auto (daje)
        if betoniarka then -- sprawdza
            if isElementbetoniarka then
                destroyElementbetoniarka )
            end
            auto[source]= nil -- czyste
        end
        
        if isElement(sourcethen
            local betoniarka createVehicle 524780.799987792978386.9000000953674 ) -- betoniarka xz
            setElementData(betoniarka,"message","Praca Dorywcza - Kopalnia")
            warpPedIntoVehicle sourcebetoniarka ) -- tepa gracza do pojazdu 
            auto[source]= betoniarka -- zapisuje 
        end
    end
)


Tak apropo powinna wygl?da? funkcja samochod

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-30, 16:08


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Bo?e, m?j kod na 3dtext. Samo setElementData Ci nic nie da..


-- License: Do whatever you want to with it

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""center""center" )
                    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"default""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.1)
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
                        dxDrawRectanglesx 5sy 110htocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1"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 isLineOfSightClearxyzpxpypz 1.1truetruetruetruefalsefalsetruelocalPlayer ) ) then
                    local sxsy getScreenFromWorldPositionpxpypz 1.8 )
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
                        dxDrawRectanglesx 5sy 110htocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1"default""center""center" )
                    end
                end
            end
        end
    end    
    for keyobject in ipairs getElementsByType"object" ) ) do
        if getElementDimension( object ) == dimension then
            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 1.1 )
                    if sx and sy then
                        local w dxGetTextWidthtostringtext ) )
                        local h = ( text and or ) * dxGetFontHeight( )
                         dxDrawRectanglesx 5sy 110htocolor000200 ) )
                        dxDrawTexttostringtext ), sxsysxsytocolor255255255255 ), 1"default""center""center" )
                    end
                end
            end
        end
    end    
end
addEventHandler"onClientRender"getRootElement( ),renderIng)


c-side

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-30, 16:32


Jeey

Lua, Grafik






Wiek: 27
Na forum: 4339 dni
Posty: 98
Nick w MP: Jeey

Piwa: 383

Respekt: 80

Ostrzeżeń: 100%
kubak14, nie chodzi mi o funkcje ona nie jest do tego potrzebna xD
PanMaszyna, ja dawno mia?em twoje 3dtext , ale i tak nie dawa?o napisu na samochodzie :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-07-30, 20:56


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4394 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

To zapewne co? ?le robisz.

Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: tekst
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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