Wysłany: 2018-10-28, 16:43
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Witam pomo?e mi kto? doda? id do hudu np ?e obok godziny wy?wietla id bo nwm jak to zrobi? za dobr? odpowied? stawiam zimne
setPlayerHudComponentVisible ( "ammo" , false )
setPlayerHudComponentVisible ( "armour" , false )
setPlayerHudComponentVisible ( "clock" , false )
setPlayerHudComponentVisible ( "health" , false )
setPlayerHudComponentVisible ( "money" , false )
setPlayerHudComponentVisible ( "vehicle_name" , false )
setPlayerHudComponentVisible ( "weapon" , false )
local sx , sy = guiGetScreenSize ()
local px , py = ( sx / 1366 ),( sy / 768 )
bindKey ( "f11" , "down" , function()
if map == true then
map = false
setElementData ( localPlayer , "hud:enabled" , true )
showChat ( true )
setPlayerHudComponentVisible ( "all" , false )
setPlayerHudComponentVisible ( "radar" , true )
setPlayerHudComponentVisible ( "crosshair" , true )
setElementData ( localPlayer , "logged" , true )
else
map = true
setElementData ( localPlayer , "hud:enabled" , false )
showChat ( false )
setPlayerHudComponentVisible ( "all" , false )
setElementData ( localPlayer , "logged" , false )
end
end )
--[[ addEventHandler ( "onClientRender" , root ,
function()
local godzina , minuty = getRealTime (). hour , getRealTime (). minute
dxDrawImage ( 652 * px , 0 * py , 714 * px , 112 * py , "hud.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( getElementData ( localPlayer , "player:reputation" ), 701 * px , 19 * py , 823 * px , 35 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.35 * px , "sans" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getPlayerMoney (), 859 * px , 19 * py , 981 * px , 35 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.35 * px , "sans" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%.0f" , getElementHealth ( localPlayer )).. "%" , 1026 * px , 19 * py , 1148 * px , 35 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.35 * px , "sans" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%02d:%02d" , godzina , minuty ), 701 * px , 64 * py , 749 * px , 84 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "sans" , "left" , "top" , false , false , false , false , false )
end
)--]]
tik = getTickCount ()
addEventHandler ( "onClientRender" , root ,
function()
local godzina , minuty = getRealTime (). hour , getRealTime (). minute
if not getElementData ( localPlayer , "logged" ) then return end
if getKeyState ( "tab" ) then return end
dxDrawImage ( 764 * px , 0 * py , 714 * px , 112 * py , "hud.png" )
dxDrawText ( getElementData ( localPlayer , "player:reputation" ), 820 * px , 22 * py , 934 , 36 , tocolor ( 255 , 255 , 255 , 255 ), 1.25 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getPlayerMoney (), 977 * px , 22 * py , 1091 * px , 36 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.25 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%.0f" , getElementHealth ( localPlayer )).. "%" , 1146 * px , 22 * py , 1260 * px , 36 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.25 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%02d:%02d" , godzina , minuty ), 820 * px , 54 * py , 868 * px , 73 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawImage ( 1256 * px , 14 * py , 74 * px , 64 * py , "hud/" .. tostring ( getPedWeapon ( localPlayer )).. ".png" )
end )
Wysłany: 2018-10-28, 16:56
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2018-10-28, 16:58
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
50 linijka ukazuje Ci godzin?,
dxDrawText ( string . format ( "%02d:%02d" , godzina , minuty ), 820 * px , 54 * py , 868 * px , 73 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
A, Ty prosisz o,
Cytat: pomo?e mi kto? doda? id do hudu np ?e obok godziny wy?wietla id
A, wi?c musisz po prostu pobawi? si? pozycjami, aby Ci pasowa?o te ID obok tej godziny ... I dodaj pod kodem godziny taki kod,
dxDrawText ( getElementData ( localPlayer , "player:id" ), 820 * px , 54 * py , 868 * px , 73 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
Je?eli nie dzia?a to zobacz jak? masz elementData na ID gracza ... Przypuszczam, ?e taka, cho? mog? si? myli? ... A, jak co? to ID i Czas b?d? na Siebie nachodzi? dlatego pozmieniaj Sobie pozycje
Wysłany: 2018-10-28, 17:19
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Dzi?ki za pomys? da?em moj? element dat? i nic dalej nie dzia?a
Wysłany: 2018-10-28, 17:19
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"Pyrek24" napisał/a :Dzi?ki za pomys? da?em moj? element dat? i nic dalej nie dzia?a
Sprawd?,
Kod:
Podaj z niego b??dy jakie wyst?puj?
Wysłany: 2018-10-28, 19:15
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
Wysłany: 2018-10-29, 16:36
Ciastuuś
Truck soon...
Wiek: 26 Na forum: 3071 dni Posty: 799
Nick w MP: Ciastuuś
Piwa : 4297
"Pyrek24" napisał/a :https://imgur.com/6jx7xrS
Pierwszy argument w linijce 51 jest nieodpowiedni. Poka? kod
Wysłany: 2018-10-29, 17:19
Pyrek24
Wiek: 25 Na forum: 3438 dni Posty: 546
Nick w MP: Pyrek
Piwa : 10
setPlayerHudComponentVisible ( "ammo" , false )
setPlayerHudComponentVisible ( "armour" , false )
setPlayerHudComponentVisible ( "clock" , false )
setPlayerHudComponentVisible ( "health" , false )
setPlayerHudComponentVisible ( "money" , false )
setPlayerHudComponentVisible ( "vehicle_name" , false )
setPlayerHudComponentVisible ( "weapon" , false )
local sx , sy = guiGetScreenSize ()
local px , py = ( sx / 1366 ),( sy / 768 )
bindKey ( "f11" , "down" , function()
if map == true then
map = false
setElementData ( localPlayer , "hud:enabled" , true )
showChat ( true )
setPlayerHudComponentVisible ( "all" , false )
setPlayerHudComponentVisible ( "radar" , true )
setPlayerHudComponentVisible ( "crosshair" , true )
setElementData ( localPlayer , "logged" , true )
else
map = true
setElementData ( localPlayer , "hud:enabled" , false )
showChat ( false )
setPlayerHudComponentVisible ( "all" , false )
setElementData ( localPlayer , "logged" , false )
end
end )
--[[ addEventHandler ( "onClientRender" , root ,
function()
local godzina , minuty = getRealTime (). hour , getRealTime (). minute
dxDrawImage ( 652 * px , 0 * py , 714 * px , 112 * py , "hud.png" , 0 , 0 , 0 , tocolor ( 255 , 255 , 255 , 255 ), false )
dxDrawText ( getElementData ( localPlayer , "player:reputation" ), 701 * px , 19 * py , 823 * px , 35 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.35 * px , "sans" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getPlayerMoney (), 859 * px , 19 * py , 981 * px , 35 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.35 * px , "sans" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%.0f" , getElementHealth ( localPlayer )).. "%" , 1026 * px , 19 * py , 1148 * px , 35 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.35 * px , "sans" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%02d:%02d" , godzina , minuty ), 701 * px , 64 * py , 749 * px , 84 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "sans" , "left" , "top" , false , false , false , false , false )
end
)--]]
tik = getTickCount ()
addEventHandler ( "onClientRender" , root ,
function()
local godzina , minuty = getRealTime (). hour , getRealTime (). minute
if not getElementData ( localPlayer , "logged" ) then return end
if getKeyState ( "tab" ) then return end
dxDrawImage ( 764 * px , 0 * py , 714 * px , 112 * py , "hud.png" )
dxDrawText ( getElementData ( localPlayer , "player:reputation" ), 820 * px , 22 * py , 934 , 36 , tocolor ( 255 , 255 , 255 , 255 ), 1.25 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getPlayerMoney (), 977 * px , 22 * py , 1091 * px , 36 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.25 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%.0f" , getElementHealth ( localPlayer )).. "%" , 1146 * px , 22 * py , 1260 * px , 36 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.25 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( string . format ( "%02d:%02d" , godzina , minuty ), 820 * px , 54 * py , 868 * px , 73 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawText ( getElementData ( localPlayer , "player:id" ), 820 * px , 54 * py , 868 * px , 73 * py , tocolor ( 255 , 255 , 255 , 255 ), 1.40 * px , "default-bold" , "left" , "top" , false , false , false , false , false )
dxDrawImage ( 1256 * px , 14 * py , 74 * px , 64 * py , "hud/" .. tostring ( getPedWeapon ( localPlayer )).. ".png" )
end )
Tagi: hudu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: