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

Wysłany: 2014-10-22, 20:35


xBolekk







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

Piwa: 190

Respekt: 60

Cze??.
Mam kod, kt?ry wy?wietla dzielnic?, miasto, lecz je?li jestem w interiorze pisze unkown. Mo?na zrobi?, ?e kiedy jestem w interiorze to nie wy?wietla w og?le si? ten napis?

Kod

local screenWidthscreenHeight guiGetScreenSize ( ) --skalujemy
 
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
 
 
 function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )

showPlayerHudComponent("area_name"false)
showPlayerHudComponent("vehicle_name"false)
showPlayerHudComponent("radio"false)


I jeszcze co?... Na dole kodu wida?, ?e ukrywaj? si? hudy, jednak po minimalizowaniu gry komponent area_name si? pojawia. Jak temu zapobiec?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-22, 20:42


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

xBolekk, 1. problem

local screenWidthscreenHeight guiGetScreenSize ( ) --skalujemy
 
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
        if not location == "unkown" then
        dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) --cien
        dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) --tekst
        end
  end
end
 
 
 function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )

showPlayerHudComponent("area_name"false)
showPlayerHudComponent("vehicle_name"false)
showPlayerHudComponent("radio"false)

2. nie wiem.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-22, 21:23


MeeShuffle

Programista/Grafik






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

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Ma?a poprawka :

local screenWidthscreenHeight guiGetScreenSize ( ) --skalujemy
 
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
if not location then return end
        if not location == "unknown" then
        dxDrawText location423screenHeight 153screenWidthscreenHeighttocolor (000255 ), 1.2czcionka ) --cien
        dxDrawText location420screenHeight 150screenWidthscreenHeighttocolor (255255255255 ), 1.2czcionka ) --tekst
        end
  end
end
 
 
 function HandleTheRendering ( )
    czcionka dxCreateFont"yellowc.ttf"20 ) --ladujemy czcionki
    addEventHandler "onClientRender"rootcreateText end
addEventHandler "onClientResourceStart"resourceRootHandleTheRendering )

showPlayerHudComponent("area_name"false)
showPlayerHudComponent("vehicle_name"false)
showPlayerHudComponent("radio"false)


Podpis

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

 
Wysłany: 2014-10-23, 16:22


xBolekk







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

Piwa: 190

Respekt: 60

Nie dzia?a.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-23, 18:33


luki123luki123

Place Game






Wiek: 28
Na forum: 5275 dni
Posty: 1948
Nick w MP: LuKiO

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

xBolekk, sprawdz moje.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-10-23, 18:54


dudeks







Wiek: 31
Na forum: 6576 dni
Posty: 171

Piwa: 89

Respekt: 105,3
Respekt: 105,3

Nie ma pokazywa? tylko lokacji, czy oby dw?ch tekst?w? Je?eli dw?ch to:

function createText ( )
    local xygetElementPosition localPlayer ) --pobieramy pozycje
    local location getZoneName xy) --pobieramy dzielnice
    local city getZoneName xyztrue ) --pobieramy miasto
    
    if string.lower(location) == "unknown" then return end
    
    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-23, 20:30


Oski

LUA Scripter






Wiek: 30
Na forum: 5246 dni
Posty: 428
Nick w MP: Oski

Piwa: 56

Respekt: 75,1

Jest jeszcze opcja pobrania interioru w kt?rym znajduje si? localPlayer, je?li r?wna si? on zero (if interior==0) to w takim wypadku rysujemy napis jesli nie to rysujemy w tek?cie nazwy interiora pobranea z PA

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: wyświetlanie :: nazwy :: unkown :: interiorze.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » nie wyświetlanie nazwy unkown w interiorze. 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