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

Wysłany: 2016-01-28, 18:55


Querex







Wiek: 32
Na forum: 4290 dni
Posty: 79
Nick w MP: Querex

Piwa: 41

Respekt: 50

Witam, mam problem gdy? podczas pr?by zmiany czcionki na nie standardow? poprostu ustawia deafultow? co mo?e by? tego problemem? Strona clienta


]]

    @author Bingwin <mickarol@o2.pl>
    @copyright 2014-2015 Bingwin <mickarol@o2.pl>
    You have no right to use this code without my permission.
]]

local screenWidth, screenHeight = guiGetScreenSize ( )
 
function napisy ( )
    local x, y, z = getElementPosition ( localPlayer )
    local dzielnica = getZoneName ( x, y, z )
    local miasto = getZoneName ( x, y, z, true )

    dxDrawText ( miasto, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.2, "czcionka" ) --cien
    dxDrawText ( miasto, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1.2, "czcionka" )  -- tekst
    
    if dzielnica ~= miasto then
         dxDrawText ( dzielnica, 200, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.2, "czcionka" ) --cien
         dxDrawText ( dzielnica, 200, screenHeight - 41, screenWidth, screenHeight, tocolor (255, 255, 255, 255 ), 1.2, "czcionka" ) --tekst
    end
end
 
 function font ( )
    czcionka = dxCreateFont( "czcionka.ttf", 20 ) 
    addEventHandler ( "onClientRender", root, napisy ) 
end
addEventHandler ( "onClientResourceStart", resourceRoot, font )



Ostatnio zmieniony przez Querex 2016-01-28, 19:02, w całości zmieniany 2 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 18:59


_Wicek_

Majstersztyk






Wiek: 26
Na forum: 4401 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1842

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Po pierwsze kod wpisujemy w znacznikach [lua][/lua] po drugie to je?eli chcesz ustawi? w?asn? czcionk? to bez ""

Przyk?ad :

dxDrawText ( dzielnica, 200, screenHeight - 41, screenWidth, screenHeight, tocolor (255, 255, 255, 255 ), 1.2, nazwa_zdefiniowanej_czcionki ) --tekst 


Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 19:03


Querex







Wiek: 32
Na forum: 4290 dni
Posty: 79
Nick w MP: Querex

Piwa: 41

Respekt: 50

Tym razem wog?le tekstu nie wy?wietla :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 19:05


_Wicek_

Majstersztyk






Wiek: 26
Na forum: 4401 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1842

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Poka? plik o nazwie : meta.xml

Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 19:12


Querex







Wiek: 32
Na forum: 4290 dni
Posty: 79
Nick w MP: Querex

Piwa: 41

Respekt: 50


<script src="client.lua" type="client"/>
    <script src="server.lua" type="server"/>
    <file src="czcionka.ttf" />



Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 19:17


_Wicek_

Majstersztyk






Wiek: 26
Na forum: 4401 dni
Posty: 747
Nick w MP: Wicek

Piwa: 1842

Respekt: 360,5
Respekt: 360,5Respekt: 360,5Respekt: 360,5Respekt: 360,5

Ostrzeżeń: 40%
Spr?buj tak :

]]
    @author Bingwin <mickarol@o2.pl>
    @copyright 2014-2015 Bingwin <mickarol@o2.pl>
    You have no right to use this code without my permission.
]]

local screenWidth, screenHeight = guiGetScreenSize ( )
czcionka = dxCreateFont( "czcionka.ttf", 20 ) 
 
function napisy ( )
    local x, y, z = getElementPosition ( localPlayer )
    local dzielnica = getZoneName ( x, y, z )
    local miasto = getZoneName ( x, y, z, true )

    dxDrawText ( miasto, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.2, czcionka ) --cien
    dxDrawText ( miasto, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1.2, czcionka )  -- tekst
    
    if dzielnica ~= miasto then
         dxDrawText ( dzielnica, 200, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.2, czcionka ) --cien
         dxDrawText ( dzielnica, 200, screenHeight - 41, screenWidth, screenHeight, tocolor (255, 255, 255, 255 ), 1.2, czcionka ) --tekst
    end
end
 
 function font ( )
    addEventHandler ( "onClientRender", root, napisy ) 
end
addEventHandler ( "onClientResourceStart", resourceRoot, font )


Podpis

Support-Team: 25.01.2016
Moderator: 10.07.2016




GG: 51274621
Skype : kuba_wicinski
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-28, 19:27


Querex







Wiek: 32
Na forum: 4290 dni
Posty: 79
Nick w MP: Querex

Piwa: 41

Respekt: 50

Dzia?a :piwo:

Postaw piwo autorowi tego posta
 

 
Tagi: czcionka
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






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