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

Wysłany: 2018-07-14, 15:32


turbonet

Kradnę kody uważaj :)






Wiek: 28
Na forum: 2903 dni
Posty: 30
Nick w MP: AJgorEx

Piwa: 464

Respekt: 50

Witam, wgra?em nowy HUD na serwer, ale stary nie znika. Doda?em takie co? do kodu:
Kod:

function Start ()
showPlayerHudComponent("clock",false)
showPlayerHudComponent("money",false)
showPlayerHudComponent("health",false)
showPlayerHudComponent("armour",false)
showPlayerHudComponent("weapon",false)
showPlayerHudComponent("ammo",false)
showPlayerHudComponent("wanted",false)
showPlayerHudComponent("breath",false)
end
addEventHandler( "onClientResourceStart", root, Start )
resetuj? skrypt i stary HUD znika wi?c jest wszystko pi?knie p?ki nie zrobi? reconnecta. Wtedy znowu HUD'y si? nak?adaj?. Prosz? o pomoc.
Oto ca?y skrypt:
Kod:

--[[
Autor: DylemaT929 <dylemat9292@gmail.com>
Copyright (c) 2017. Zakaz u?ywania kodu bez mojej zgody.
Zakaz u?ywania kodu bez mojej zgody.
]]
function Start ()
showPlayerHudComponent("clock",false)
showPlayerHudComponent("money",false)
showPlayerHudComponent("health",false)
showPlayerHudComponent("armour",false)
showPlayerHudComponent("weapon",false)
showPlayerHudComponent("ammo",false)
showPlayerHudComponent("wanted",false)
showPlayerHudComponent("breath",false)
end
addEventHandler( "onClientResourceStart", root, Start )

local sW, sH = guiGetScreenSize()

addEventHandler("onClientRender", root, function()
local gracz = getPlayerName(localPlayer)
local godzina, minuty = getRealTime().hour, getRealTime().minute
local kasa = getPlayerMoney(localPlayer)
local hp = getElementHealth(localPlayer)
local reputacja = getElementData(localPlayer, "player:reputation")
dxDrawImage(sW*1078/1280, sH*42/1024, sW*192/1280, sH*48/1024, "hudzik/ar.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(sW*868/1280, sH*42/1024, sW*207/1280, sH*180/1024, "hudzik/crc.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(sW*1078/1280, sH*90/1024, sW*192/1280, sH*48/1024, "hudzik/hp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(sW*1078/1280, sH*135/1024, sW*192/1280, sH*48/1024, "hudzik/mn.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawImage(sW*1078/1280, sH*183/1024, sW*192/1280, sH*48/1024, "hudzik/mp.png", 0, 0, 0, tocolor(255, 255, 255, 255), false)
dxDrawText(string.gsub(gracz, "#%x%x%x%x%x%x", ""), sW*1120/1280, sH*57/1024, sW*1261/1280, sH*72/1024, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false)
dxDrawText(string.format("%02d:%02d", godzina, minuty), sW*922/1280, sH*99/1024, sW*1024/1280, sH*171/1024, tocolor(255, 255, 255, 255), 1.50, "pricedown", "center", "center", false)
dxDrawText(string.format("%d%%", hp), sW*1120/1280, sH*105/1024, sW*1261/1280, sH*120/1024, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false)
dxDrawText(string.format("%d PLN", kasa),sW*1120/1280, sH*150/1024, sW*1261/1280, sH*165/1024, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false)
dxDrawText(string.format("%d RP", reputacja),sW*1119/1280, sH*198/1024, sW*1261/1280, sH*213/1024, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false)
end)

addEventHandler("onClientResourceStart", resourceRoot, function()
end)

function niepobieraj ()
if fileExists("c_hud.lua") then
fileDelete("c_hud.lua")
end
end
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), niepobieraj)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-07-14, 18:44


Hades.

Łiiiiiiiiii






Wiek: 22
Na forum: 4699 dni
Posty: 372
Nick w MP: Hades

Piwa: 3214

Respekt: 337,8
Respekt: 337,8Respekt: 337,8Respekt: 337,8

Nast?pnym razem kod daj w "[lua]"

A co do kodu to

showPlayerHudComponent


zamie? na:

Więcej informacji znajdziesz w Wikipedii MTA:

setPlayerHudComponentVisible


[ Dodano: 2018-07-14, 18:45 ]
Oraz w panelu logowania wstaw setPlayerHudComponentVisible w funkcji resultu zalogowania.

Podpis
Skrypty/Grafiki na zamówienie!
Kontakt: Discord R35#5507

Discord związany z pomocą: https://discord.gg/ttkQTsc
Postaw piwo autorowi tego posta
 

 
Tagi: jak :: usunąć :: hud?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Jak usunąć hud? 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