Wysłany: 2020-10-26, 22:23
Lucky!!! :)
Wiek: 20 Na forum: 2373 dni Posty: 121
Nick w MP: Lucky
Piwa : 1163
Potrzebuje pomocy w zrobieniu, gdy kto? zmniejsza b?d? zwi?ksza rozdzielczo?? to mu si? nie zmienia widok hudu, poni?ej wklejam linijk? kodu!
Daje piwka za pomoc!
function hud ()
if getElementData ( localPlayer , "player:sid" ) and getElementData ( localPlayer , "player:logged" ) then
local money = string . format ( "%0d" , getPlayerMoney ( getLocalPlayer ()))
local hp = getElementHealth ( getLocalPlayer ())
local kev = getPedArmor ( getLocalPlayer ())
local mag = getPedAmmoInClip ( localPlayer , getPedWeaponSlot ( localPlayer ))
local all = getPedTotalAmmo ( localPlayer )- mag
dxDrawRectangle ( x * 1120 , y * 20 , x * 230 , y * 120 , tocolor ( 0 , 0 , 0 , 100 ), false )
dxDrawRectangle ( x * 1120 , y * 20 , x * 1 , y * 120 , tocolor ( 0 , 102 , 255 , 255 ), false )
dxDrawText ( getPlayerName ( getLocalPlayer ()).. "#FFFFFF - (" .. getElementData ( getLocalPlayer (), "id" ).. ")" , x * 1114 , y * 25 , x * 1366 , y * 40 , white , 1.2 , font , "center" , "center" , false , false , false , true )
dxDrawText ( "Pieni?dze: #6e6eff" .. dot ( money ).. " #FFFFFFPLN\nReputacja: #6e6eff" .. getElementData ( getLocalPlayer (), "player:srp" ).. " #FFFFFFRP\nUID: #6e6eff" .. getElementData ( getLocalPlayer (), "player:sid" ).. " #FFFFFF" , x * 1134 , y * 120 , x * 1366 , y * 20 , white , 1 , font , "left" , "center" , false , false , false , true )
dxDrawText ( "FPS: " .. getElementData ( localPlayer , "fps" ).. " | PING: " .. getPlayerPing ( localPlayer ).. "" , x * 1255 , y * 5 , x * 1366 , y * 10 , white , 1 , "default" , "left" , "center" , false , false , false , true )
dxDrawText ( "Zdrowie:" , x * 1134 , y * 199 , x * 1366 , y * 20 , white , 1 , font , "left" , "center" , false )
dxDrawRectangle ( x * 1195 , y * 104 , x * 145 , y * 10 , tocolor ( 0 , 0 , 0 , 150 ), false )
dxDrawRectangle ( x * 1195 , y * 104 , x * 145 / getPedMaxHealth ( localPlayer )* hp , y * 10 , tocolor ( 230 , 0 , 0 , 255 ), true )
dxDrawText ( "Pancerz:" , x * 1134 , y * 229 , x * 1366 , y * 20 , white , 1 , font , "left" , "center" , false )
dxDrawRectangle ( x * 1195 , y * 120 , x * 145 , y * 10 , tocolor ( 0 , 0 , 0 , 150 ), false )
dxDrawRectangle ( x * 1195 , y * 120 , x * 145 / 100 * kev , y * 10 , tocolor ( 100 , 100 , 100 , 255 ), false )
if getPedWeapon ( getLocalPlayer ())~= 0 then
dxDrawRectangle ( x * 1120 , y * 150 , x * 230 , y * 60 , tocolor ( 0 , 0 , 0 , 100 ), false )
dxDrawRectangle ( x * 1120 , y * 150 , x * 1 , y * 60 , tocolor ( 0 , 102 , 255 , 255 ), false )
dxDrawBorderedText ( mag .. "\n" .. all , x * 1280 , y * 155 , x * 100 , y * 60 , tocolor ( 190 , 190 , 190 , 255 ), 1 , "pricedown" , "left" , "top" , false , false , false )
dxDrawImage ( x * 1120 , y * 160 , x * 128 , y * 43 , "img/" .. getPedWeapon ( getLocalPlayer ()).. ".png" )
end
else
end
end
Wysłany: 2020-10-27, 07:10
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Gdzie masz zdefiniowane zmienne 'x' i 'y'?
Wysłany: 2020-10-27, 09:43
Lucky!!! :)
Wiek: 20 Na forum: 2373 dni Posty: 121
Nick w MP: Lucky
Piwa : 1163
Wilq , Na samej g?rze, tutaj Ci to wklejam:
local screenW , screenH = guiGetScreenSize ()
local resW = 1366
local resH = 767
local x , y = ( screenW / resW ),( screenH / resH )
Wysłany: 2020-10-27, 13:00
Szyszka947
ASP NET Core / Lua
Wiek: 19 Na forum: 2579 dni Posty: 288
Piwa : 16
Nie wiem o co dok?adnie chodzi, ale wydaje mi si?, ?e nie skalujesz wielko?ci czcionki. Dodaj sobie takie co?:
local zoomx = resW / screenW
i potem r?b co? takiego:
dxDrawText ( "FPS: " .. getElementData ( localPlayer , "fps" ).. " | PING: " .. getPlayerPing ( localPlayer ).. "" , x * 1255 , y * 5 , x * 1366 , y * 10 , white , 1 / zoomx , "default" , "left" , "center" , false , false , false , true )
[/lua]
Więcej szczegółów
Wystawiono 1 piw(a):Lucky!!! :)
Tagi: rozdzielczość
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: