Wysłany: 2014-10-13, 15:08
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
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
A jak zrobi?, aby to kry?o si? za mapk??
Wysłany: 2014-10-13, 15:45
Dixers
No-Life
Wiek: 26 Na forum: 4313 dni Posty: 549
Nick w MP: Dixers
Piwa : 412
xBolekk , podajesz tak? szeroko??, aby wchodzi?a pod mapk?.
Wysłany: 2014-10-13, 15:54
KukiX
Wiek: 34 Na forum: 6718 dni Posty: 567
Piwa : 17560
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: DxDrawText
Wysłany: 2014-10-13, 20:12
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
A co z tym, aby wchodzi?o pod map??
Wysłany: 2014-10-13, 20:21
KukiX
Wiek: 34 Na forum: 6718 dni Posty: 567
Piwa : 17560
"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.
Wysłany: 2014-10-13, 20:31
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
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 x , y , z = getElementPosition ( localPlayer ) -- pobieramy pozycje
local location = getZoneName ( x , y , z ) -- pobieramy dzielnice
local city = getZoneName ( x , y , z , true ) -- pobieramy miasto
czcionka = dxCreateFont ( "yellowc.ttf" , 20 ) -- ladujemy czcionki
-- cienie
dxDrawText ( location , 423 , screenHeight - 153 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( location , 420 , screenHeight - 150 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
end
function HandleTheRendering ( )
addEventHandler ( "onClientRender" , root , createText )
end
addEventHandler ( "onClientResourceStart" , resourceRoot , HandleTheRendering )
Wysłany: 2014-10-13, 20:47
KukiX
Wiek: 34 Na forum: 6718 dni Posty: 567
Piwa : 17560
Bo tworzysz czcionk? co jedn? klatk?.
function createText ( )
local x , y , z = getElementPosition ( localPlayer ) -- pobieramy pozycje
local location = getZoneName ( x , y , z ) -- pobieramy dzielnice
local city = getZoneName ( x , y , z , true ) -- pobieramy miasto
-- cienie
dxDrawText ( location , 423 , screenHeight - 153 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( location , 420 , screenHeight - 150 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
end
function HandleTheRendering ( )
czcionka = dxCreateFont ( "yellowc.ttf" , 20 ) -- ladujemy czcionki
addEventHandler ( "onClientRender" , root , createText )
end
addEventHandler ( "onClientResourceStart" , resourceRoot , HandleTheRendering )
Wysłany: 2014-10-13, 20:51
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
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?
Wysłany: 2014-10-13, 21:00
dudeks
Wiek: 31 Na forum: 6576 dni Posty: 171
Piwa : 89
function createText ( )
local x , y , z = getElementPosition ( localPlayer ) -- pobieramy pozycje
local location = getZoneName ( x , y , z ) -- pobieramy dzielnice
local city = getZoneName ( x , y , z , true ) -- pobieramy miasto
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka ) -- cien
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka ) -- tekst
if location ~= city then
dxDrawText ( location , 423 , screenHeight - 153 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka ) -- cien
dxDrawText ( location , 420 , screenHeight - 150 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka ) -- tekst
end
end
Wysłany: 2014-10-13, 21:01
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
Jeste?cie niesamowici, piwka dla obu pan?w, wielkie dzi?ki!
Wysłany: 2014-10-13, 21:02
KukiX
Wiek: 34 Na forum: 6718 dni Posty: 567
Piwa : 17560
Nie sprawdza?em, ale powinno dzia?a?:
function createText ( )
local x , y , z = getElementPosition ( localPlayer ) -- pobieramy pozycje
local location = getZoneName ( x , y , z ) -- pobieramy dzielnice
local city = getZoneName ( x , y , z , true ) -- pobieramy miasto
if location ~= city then
-- cienie
dxDrawText ( location , 423 , screenHeight - 153 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( location , 420 , screenHeight - 150 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
else
-- cienie
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
end
end
function HandleTheRendering ( )
czcionka = dxCreateFont ( "yellowc.ttf" , 20 ) -- ladujemy czcionki
addEventHandler ( "onClientRender" , root , createText )
end
addEventHandler ( "onClientResourceStart" , resourceRoot , HandleTheRendering )
//edit
Sp??ni?em si? troszk? ;D
Wysłany: 2014-10-13, 21:03
xBolekk
Wiek: 24 Na forum: 4474 dni Posty: 113
Nick w MP: Bolek.
Piwa : 190
"KukiX" napisał/a :Nie sprawdza?em, ale powinno dzia?a?:
function createText ( )
local x , y , z = getElementPosition ( localPlayer ) -- pobieramy pozycje
local location = getZoneName ( x , y , z ) -- pobieramy dzielnice
local city = getZoneName ( x , y , z , true ) -- pobieramy miasto
if location ~= city then
-- cienie
dxDrawText ( location , 423 , screenHeight - 153 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( location , 420 , screenHeight - 150 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
else
-- cienie
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
end
end
function HandleTheRendering ( )
czcionka = dxCreateFont ( "yellowc.ttf" , 20 ) -- ladujemy czcionki
addEventHandler ( "onClientRender" , root , createText )
end
addEventHandler ( "onClientResourceStart" , resourceRoot , HandleTheRendering )
Kolega ju? da?, dzi?ki!
[ Dodano : 2014-10-13, 21:03 ]
"KukiX" napisał/a :Nie sprawdza?em, ale powinno dzia?a?:
function createText ( )
local x , y , z = getElementPosition ( localPlayer ) -- pobieramy pozycje
local location = getZoneName ( x , y , z ) -- pobieramy dzielnice
local city = getZoneName ( x , y , z , true ) -- pobieramy miasto
if location ~= city then
-- cienie
dxDrawText ( location , 423 , screenHeight - 153 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( location , 420 , screenHeight - 150 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
else
-- cienie
dxDrawText ( city , 403 , screenHeight - 103 , screenWidth , screenHeight , tocolor ( 0 , 0 , 0 , 255 ), 1.2 , czcionka )
-- teksty
dxDrawText ( city , 400 , screenHeight - 100 , screenWidth , screenHeight , tocolor ( 255 , 255 , 255 , 255 ), 1.2 , czcionka )
end
end
function HandleTheRendering ( )
czcionka = dxCreateFont ( "yellowc.ttf" , 20 ) -- ladujemy czcionki
addEventHandler ( "onClientRender" , root , createText )
end
addEventHandler ( "onClientResourceStart" , resourceRoot , HandleTheRendering )
Kolega ju? da?, dzi?ki!
Tagi: funkcja?
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: