Wysłany: 2018-12-03, 19:07
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Jak doda? ,?e po zrespieniu si? dopiero wida? walute[size=18][/size]
[player:spawn]
local czcionka = dxCreateFont ( "a/cz.ttf" , 24 )
if not czcionka then czcionka = "default" end
local screenW , screenH = guiGetScreenSize ()
addEventHandler ( "onClientRender" , root , function()
local hajs = string . format ( "%08d" , getPlayerMoney ( getLocalPlayer ()))
showPlayerHudComponent ( "money" , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) - 2 , ( screenH * 0.2070 ) - 2 , ( screenW * 0.9531 ) - 2 , ( screenH * 0.2904 ) - 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) + 2 , ( screenH * 0.2070 ) - 2 , ( screenW * 0.9531 ) + 2 , ( screenH * 0.2904 ) - 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) - 2 , ( screenH * 0.2070 ) + 2 , ( screenW * 0.9531 ) - 2 , ( screenH * 0.2904 ) + 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) + 2 , ( screenH * 0.2070 ) + 2 , ( screenW * 0.9531 ) + 2 , ( screenH * 0.2904 ) + 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , screenW * 0.7758 , screenH * 0.2070 , screenW * 0.9531 , screenH * 0.2904 , tocolor ( 0 , 80 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
end )
Podpis
Jeśli ci pomogłem zostaw zimne
Wysłany: 2018-12-03, 19:14
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Wykorzystaj ustawianie elementDaty i jej odczytywanie.
W walucie dodaj co? takiego:
if not getElementData ( localPlayer , "graczSieZalogowal" ) then return end
Po zalogowaniu natomiast co? takiego:
setElementData ( gracz , "graczSieZalogowal" , true )
Więcej szczegółów
Wystawiono 1 piw(a):Krzemo1234
Wysłany: 2018-12-03, 19:40
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Zrobi?em co? takiego tylko ,?e nie pokazuje wgl
if not getElementData ( localPlayer , "player:logged" ) then return end
local czcionka = dxCreateFont ( "a/cz.ttf" , 24 )
if not czcionka then czcionka = "default" end
local screenW , screenH = guiGetScreenSize ()
addEventHandler ( "onClientRender" , root , function()
local hajs = string . format ( "%08d" , getPlayerMoney ( getLocalPlayer ()))
showPlayerHudComponent ( "money" , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) - 2 , ( screenH * 0.2070 ) - 2 , ( screenW * 0.9531 ) - 2 , ( screenH * 0.2904 ) - 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) + 2 , ( screenH * 0.2070 ) - 2 , ( screenW * 0.9531 ) + 2 , ( screenH * 0.2904 ) - 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) - 2 , ( screenH * 0.2070 ) + 2 , ( screenW * 0.9531 ) - 2 , ( screenH * 0.2904 ) + 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) + 2 , ( screenH * 0.2070 ) + 2 , ( screenW * 0.9531 ) + 2 , ( screenH * 0.2904 ) + 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , screenW * 0.7758 , screenH * 0.2070 , screenW * 0.9531 , screenH * 0.2904 , tocolor ( 0 , 80 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
end )
[ Dodano : 2018-12-03, 19:40 ]
?adnego b??du
Podpis
Jeśli ci pomogłem zostaw zimne
Wysłany: 2018-12-03, 19:41
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Warunek sprawdzaj?cy t? elementDat? wrzu? do eventu 'onClientRender'.
Takie sprawdzanie poza funkcj? czy eventem nie ma najmniejszego sensu.
local czcionka = dxCreateFont ( "a/cz.ttf" , 24 )
if not czcionka then czcionka = "default" end
local screenW , screenH = guiGetScreenSize ()
addEventHandler ( "onClientRender" , root , function()
if not getElementData ( localPlayer , "player:logged" ) then return end
local hajs = string . format ( "%08d" , getPlayerMoney ( getLocalPlayer ()))
showPlayerHudComponent ( "money" , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) - 2 , ( screenH * 0.2070 ) - 2 , ( screenW * 0.9531 ) - 2 , ( screenH * 0.2904 ) - 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) + 2 , ( screenH * 0.2070 ) - 2 , ( screenW * 0.9531 ) + 2 , ( screenH * 0.2904 ) - 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) - 2 , ( screenH * 0.2070 ) + 2 , ( screenW * 0.9531 ) - 2 , ( screenH * 0.2904 ) + 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , ( screenW * 0.7758 ) + 2 , ( screenH * 0.2070 ) + 2 , ( screenW * 0.9531 ) + 2 , ( screenH * 0.2904 ) + 2 , tocolor ( 0 , 0 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
dxDrawText ( "PLN " .. hajs , screenW * 0.7758 , screenH * 0.2070 , screenW * 0.9531 , screenH * 0.2904 , tocolor ( 0 , 80 , 0 , 255 ), 1.00 , czcionka , "center" , "center" , false , false , false , false , false )
end )
Wysłany: 2018-12-03, 20:56
Krzemo1234
Wiek: 26 Na forum: 3751 dni Posty: 387
Nick w MP: Krzemo
Piwa : 16
Do zamkni?cia leci piwko
Podpis
Jeśli ci pomogłem zostaw zimne
Tagi: wyświetlenie :: waluty :: zrespieniu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: