turbonet
Kradnę kody uważaj :)
Wiek: 28 Na forum: 2903 dni Posty: 30
Nick w MP: AJgorEx
Piwa : 464
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)