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

Wysłany: 2014-10-13, 15:08


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

Cze??, pami?tacie jak na PYLife by? pasek z miastem i dzielnic?? Mam pytanie odno?nie tego. Jak nazywa si? funkcja, kt?ra rysowa?a pasek za tekstem? Wydaje mi si?, ?e to funkcja DX, ale dalej nie mam poj?cia. Prosz? o pomoc.



[ Dodano: 2014-10-13, 15:17 ]
Znalaz?em


Więcej informacji znajdziesz w Wikipedii MTA:

DxDrawRectangle


A jak zrobi?, aby to kry?o si? za mapk??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 15:45


Dixers

No-Life






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

Piwa: 412

Respekt: 56,8

xBolekk, podajesz tak? szeroko??, aby wchodzi?a pod mapk?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 15:54


KukiX







Wiek: 34
Na forum: 6718 dni
Posty: 567

Piwa: 17560

Respekt: 160
Respekt: 160Respekt: 160

Jest kilka sposob?w ?eby to zrobi? i ten pasek nie jest zrobiony za pomoc? dxDrawRectagle.
To jest po prostu obrazek stworzony w gimp czy innym programie.
Napis mo?na zrobi? za pomoc?:

Więcej informacji znajdziesz w Wikipedii MTA:

GuiCreateLabel


Więcej informacji znajdziesz w Wikipedii MTA:

DxDrawText


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 20:12


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

A co z tym, aby wchodzi?o pod map??

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 20:21


KukiX







Wiek: 34
Na forum: 6718 dni
Posty: 567

Piwa: 17560

Respekt: 160
Respekt: 160Respekt: 160

"xBolekk" napisał/a:

A co z tym, aby wchodzi?o pod map??

Ten pasek nie jest pod mapk? tylko jest tak uci?ty w jakim? programie graficznym.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 20:31


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

Dobra, da?em rade, ale teraz co? na inny temat.

Mam taki kod, kt?ry pokazuje lokalizacje jednak jak zminimalizuje gr?, i w??czam to czasem (cz?sto) napis znika, musz? restartowa? zas?b, aby pojawi? si?.

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto
 
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
 
    --cienie
    dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) 
    dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
    
    --teksty
    dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) 
    dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka end
 
 function HandleTheRendering ( )
    addEventHandler "onClientRender"rootcreateText end
 
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 20:47


KukiX







Wiek: 34
Na forum: 6718 dni
Posty: 567

Piwa: 17560

Respekt: 160
Respekt: 160Respekt: 160

Bo tworzysz czcionk? co jedn? klatk?.

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto
 
    --cienie
    dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) 
    dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
    
    --teksty
    dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) 
    dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka end
 
 function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )


Podpis
Moje skrypty MTA:
¤PlayDM
¤Mini-Games v0.2
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 20:51


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

Dobra, je?li chcesz mi pom?c (oczywi?cie nie musisz) to powiedz mi jeszcze - bo s?uchaj... Jak jestem powiedzmy w Los Santos (na jego obrze?ach) to w obu linijkach pisze mi Los Santos, a chcia?bym, ?e je?li nie jestem w dzielnicy, tylko samym mie?cie to, aby wy?wietla?o samo miasto, rozumiesz?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 21:00


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto

    dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) --cien
    dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )  -- tekst
    
    if location ~= city then
        dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) --cien
        dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) --tekst
    end
end
 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 21:01


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

Jeste?cie niesamowici, piwka dla obu pan?w, wielkie dzi?ki!

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 21:02


KukiX







Wiek: 34
Na forum: 6718 dni
Posty: 567

Piwa: 17560

Respekt: 160
Respekt: 160Respekt: 160

Nie sprawdza?em, ale powinno dzia?a?:

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto
    if location ~= city then
        --cienie
        dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) 
        dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
        --teksty
        dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) 
        dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )
    else
        --cienie
        dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
        --teksty
        dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )
    end
end
 
function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )




//edit
Sp??ni?em si? troszk? ;D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-13, 21:03


xBolekk







Wiek: 24
Na forum: 4474 dni
Posty: 113
Nick w MP: Bolek.

Piwa: 190

Respekt: 60

"KukiX" napisał/a:

Nie sprawdza?em, ale powinno dzia?a?:

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto
    if location ~= city then
        --cienie
        dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) 
        dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
        --teksty
        dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) 
        dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )
    else
        --cienie
        dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
        --teksty
        dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )
    end
end
 
function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )


Kolega ju? da?, dzi?ki!

[ Dodano: 2014-10-13, 21:03 ]
"KukiX" napisał/a:

Nie sprawdza?em, ale powinno dzia?a?:

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto
    if location ~= city then
        --cienie
        dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) 
        dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
        --teksty
        dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) 
        dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )
    else
        --cienie
        dxDrawText city403screenHeight 103screenWidthscreenHeighttocolor 000255 ), 1.2czcionka ) 
        --teksty
        dxDrawText city400screenHeight 100screenWidthscreenHeighttocolor 255255255255 ), 1.2czcionka )
    end
end
 
function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )


Kolega ju? da?, dzi?ki!

Postaw piwo autorowi tego posta
 

 
Tagi: funkcja?
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