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

Wysłany: 2016-07-31, 14:01


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Mam problem oto kody



local sw,sh guiGetScreenSize()

local font dxCreateFont("epikk.ttf"18)
if not font then dxfont0_tekst "sans" end


addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local ulica getZoneName(x,y,zfalse)
    local ulica2 getZoneName(x,y,ztrue)
    if ulica2~=ulica then ulica "   "..ulica.."\n"..ulica2 else ulica "   "..ulica end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(ulicasw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255,255), 0.50font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)
---------------------------------



addEventHandler"onClientRender"getRootElement(), 
    function ()
    local xygetElementPosition(getLocalPlayer())
    local ulica getZoneName(xyz)
    local ulica2 ""
        if miasto == "Las Venturas" then
        nazwa "Warszawa"
    elseif miasto "Los Santos" then
    nazwa "Bla bla"
        end
         dxDrawText(nazwa00100100tocolor(255255255,255), 0.50font"left""center")
    end
)    




Chodzi o to ze 1 kod jest m?j a 2 liki123

I nei moge tego jako? zrobic zeby Zamiast w 1 kodzie pisa?o Las Venturas jak jestem tam pisa?o Warszawa

Ewentualnie 2 kod przerobic pod to oto server:


--[[
]]
setPlayerHudComponentVisible "area_name"false )



Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-07-31, 16:23


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

local sw,sh guiGetScreenSize()

local font dxCreateFont("epikk.ttf"18)
if not font then dxfont0_tekst "sans" end


addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local ulica getZoneName(x,y,zfalse)
    local ulica2 getZoneName(x,y,ztrue)
    if ulica2~=ulica then ulica "   "..ulica.."\n"..ulica2 else ulica "   "..ulica end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(ulicasw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255,255), 0.50font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)
---------------------------------



addEventHandler"onClientRender"getRootElement(), 
    function ()
    local xygetElementPosition(getLocalPlayer())
    local ulica getZoneName(xyz)
    local ulica2 ""
        if miasto == "Las Venturas" then
        nazwa "Warszawa"
    elseif miasto "Los Santos" then
    nazwa "Bla bla"
        end
         dxDrawText(nazwa00100100tocolor(255255255,255), 0.50font"left""center")
    end
)  

addEventHandler("onClientResourceStart"getResourceRootElement(getThisResource()),
function ()
setPlayerHudComponentVisible(localPlayer"area_name"false )
end)  


Je?li o to chodzi.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 11:09


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Nic w tym nie zmieni?es, Chodzi mi o to ze 1 kod dza?a ze jak jestem w lv to pisze mi na lewo na dole Las Venturas \n Miasto jakie? a ja chce zeby pisa?o Warszawa \n Miasto jakies

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 12:20


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

No to ci da?em wy?ej kod z wy??czeniem oryginalnych nazw.

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 12:31


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

marcin778, Co ty niby tam zmieni?e? ?

mixLoLmix2, zobacz tak:

local sw,sh guiGetScreenSize()

local font dxCreateFont("epikk.ttf"18)
if not font then dxfont0_tekst "sans" end


addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local miasto getZoneName(x,y,zfalse)
    local dzielnica getZoneName(x,y,ztrue)
        local city ""
            if miasto == "Las Venturas" then
            city "Warszawa"
        elseif miasto == "Los Santos" then
            city "Wroc?aw"
            else
            city miasto
            end
            
    if city~=dzielnica then text "   "..city.."\n"..dzielnica else text "   "..city end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(citysw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255,255), 0.50font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 13:59


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3



local sw,sh guiGetScreenSize()

local font dxCreateFont("epikk.ttf"18)
if not font then dxfont0_tekst "sans" end


addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local miasto getZoneName(x,y,zfalse)
    local dzielnica getZoneName(x,y,ztrue)
        local city ""
            if miasto == "Las Venturas" then
            city "Warszawa"
        elseif miasto == "Los Santos" then
            city "Wroc?aw"
            else
            city miasto
            end
            
    if city~=dzielnica then text "   "..city.."\n"..dzielnica else text "   "..city end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(citysw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255,255), 0.50font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)




Niby ok. Ale jest 1 ale

Widze ze jest warszawa ale pod tym powino by? miasto a jest tak:

Nie ma tego warszawa ani LV tylko ulica i pisze np:
Ulica

A ma by?

Miasto
Ulica

i w miejscach gdzie nie ma miasta pisze Warszawa

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 14:17


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

mixLoLmix2, nie ogarniam.
Zr?b ss'a

[ Dodano: 2016-08-01, 14:20 ]
mixLoLmix2, tak:
local sw,sh guiGetScreenSize()

local font dxCreateFont("epikk.ttf"18)
if not font then dxfont0_tekst "sans" end


addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local miasto getZoneName(x,y,zfalse)
    local dzielnica getZoneName(x,y,ztrue)
        local city ""
            if miasto == "Las Venturas" then
            city "Warszawa"
        elseif miasto == "Los Santos" then
            city "Wroc?aw"
            else
            city miasto
            end
            
    if city~=dzielnica then text "   "..city.."\n"..dzielnica else text "   "..city end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(textsw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255,255), 0.50font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 14:20


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

https://zapodaj.net/87dfcd4c72391.png.html

Na dole na lewo pisze jaka? ulica a nad ni? powino pisa? Warszawa

W niekt?rych miejscach w lv pisze zamiast ulicy Warszawa

[ Dodano: 2016-08-01, 14:22 ]
https://zapodaj.net/67e5e5d08a2c7.png.html

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 14:22


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

Bo w kodzie masz tylko tak, ?e ma zamienia? Las Venturas na Warszawa a jak wida? na ss nie jeste? w Las Venturas tylko w redsands east czyli dzielnicy w LV.

[ Dodano: 2016-08-01, 14:23 ]
local sw,sh guiGetScreenSize()

local font dxCreateFont("epikk.ttf"18)
if not font then dxfont0_tekst "sans" end


addEventHandler("onClientPreRender"root, function()
    local x,y,getElementPosition(localPlayer)
    local miasto getZoneName(x,y,zfalse)
    local dzielnica getZoneName(x,y,ztrue)
        local city ""
            if miasto == "Las Venturas" or miasto == "Redsands East" then
            city "Warszawa"
        elseif miasto == "Los Santos" then
            city "Wroc?aw"
            else
            city miasto
            end
            
    if city~=dzielnica then text "   "..city.."\n"..dzielnica else text "   "..city end
    if dxSetAspectRatioAdjustmentEnabled then
        dxSetAspectRatioAdjustmentEnabled(true)
    end
    if isPlayerHudComponentVisible("radar") and getElementInterior(localPlayer) == 0 then
        dxDrawText(textsw*4.2/20sh*18/20sw*4/20sh*18/20+sh*1/21.9tocolor(255255255,255), 0.50font"left""center")
        dxDrawRectangle(sw*2.5/20sh*18/20sw*0.7/4sh*1/21.9tocolor(inDMZone and 100 or 000100))
    end
end)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Ostatnio zmieniony przez marcin778 2016-08-01, 14:24, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 14:24


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Uda?o mi sie naprawic ale zamiast Warszawa Pisze Las Venturas

[ Dodano: 2016-08-01, 14:30 ]
https://zapodaj.net/f5bdca02feef4.png.html

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 14:34


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

mixLoLmix2, podmie? to:
  if dzielnica == "Las Venturas" then
            city "Warszawa"
        elseif dzielnica == "Los Santos" then
            city "Wroc?aw"
            else
            city dzielnica
            end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 14:48


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

Pisze
Warszawa
Las Venturas

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 15:01


luki123luki123

Place Game






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

Piwa: 6101

Respekt: 611
Respekt: 611Respekt: 611

marcin778,
if miasto~=dzielnica then text "   "..city.."\n"..dzielnica else text "   "..city end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 15:32


mixLoLmix2

Programista






Wiek: 35
Na forum: 4113 dni
Posty: 454
Nick w MP: TomeQmix

Piwa: 1915

Respekt: 47,3

To samo

Podpis
Zajmuję się pisaniem zaawansowanych skryptów lua na zamówienie za bardzo niską cene.
Oraz pomoc przy serwerze mta/forum i tym podobnych.
Discord: TomeQmix#7106
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-01, 21:19


BlackTen

LUA Dev.






Wiek: 28
Na forum: 4329 dni
Posty: 698

Piwa: 2080

Respekt: 157
Respekt: 157Respekt: 157


  if dzielnica == "Las Venturas" then
            city "Warszawa"
        elseif dzielnica == "Los Santos" then
            city "Wroc?aw"
            else
            dzielnica city
            end


Postaw piwo autorowi tego posta
 

 
Tagi: miasta
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