Jump to content

[Help]scoreboard and Hud


Recommended Posts

I want your help for 2 things, no matter how much I searched, I couldn't find it. I'm building a team on the scoreboard, but it is deleted after shutting down the server.

TrgtY4J.png

Secondly, I can't add a flag after the Name side, I couldn't understand the problem, I would appreciate it if you could help :)

57vSVHf.png

It conflicts because the 2 sides are dxdrawimage. After getting the armor, I want the armor png to come instead of life, how can I get this?

PbSOvK8.png

Link to comment
8 hours ago, BalPorsugu said:

I want your help for 2 things, no matter how much I searched, I couldn't find it. I'm building a team on the scoreboard, but it is deleted after shutting down the server.

TrgtY4J.png

Secondly, I can't add a flag after the Name side, I couldn't understand the problem, I would appreciate it if you could help :)

57vSVHf.png

It conflicts because the 2 sides are dxdrawimage. After getting the armor, I want the armor png to come instead of life, how can I get this?

PbSOvK8.png

well for last picture where u talk about hud u need something like this, u just have to add this lines in your script

local hp = getElementHealth(localPlayer)
local armour = getPedArmor(localPlayer)
if armour > 0 then 
  -- draw armor img
  dxDrawImage(x,y,w,h,"armour.png") -- write  the image name and extension and location u should have the image and the script in the same folder 
else 
  --draw health image
  dxDrawImage(x,y,w,h,"health.png")
end 

And for the part where u create a team u just write on a server side script

local your_team_name = createTeam("Your team name",r,g,b)  -- r,g,b your team color after name

it should work i tried on the basic mta server it works.

For the country part i dont know, i dont have experience with this, i hope someone better who knows will help you.

Edited by FlorinSzasz
  • Like 1
Link to comment
9 hours ago, BalPorsugu said:

y7Lq67T.png

2 pictures overlap

my mistake we need a variable 

local hp_armor

if armour > 0 then 

 hp_armor = dxDrawImage(x,y,w,h,"armor.png")
else
 hp_armor = dxDrawImage(x,y,w,h,"health.png")

end

 

local hp 

local armour 

Also you keep this variables from last time just add the local hp_armor and replace the old lines with the new lines it should work. 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...