So Ronald is dev now?

Status
Not open for further replies.

jb

Atom
B A N N E D
Joined
May 16, 2016
Messages
3,590
Nebulae
10,264
everyone knows the only good way to code HUDs is to do
  • all calculations inside of the hook
  • no ScrW() or ScrH()
  • every line max. 3 characters
  • local material/texture definitions outside of the painting hook? who needs those, just make them global inside of your hook
donde estoy biblioteca
 
Reactions: List
Joined
Apr 26, 2016
Messages
2,395
Nebulae
3,692
everyone knows the only good way to code HUDs is to do
  • all calculations inside of the hook
  • no ScrW() or ScrH()
  • every line max. 3 characters
  • local material/texture definitions outside of the painting hook? who needs those, just make them global inside of your hook
woah woah woah, who uses hook commands these days? I don't have think events to just toss around pal. Just put it all inside a console command, then bind it to mouse1
 

karl-police

Nucleus
Joined
Jul 3, 2016
Messages
1,607
Nebulae
3,299
everyone knows the only good way to code HUDs is to do
  • all calculations inside of the hook
  • no ScrW() or ScrH()
  • every line max. 3 characters
  • local material/texture definitions outside of the painting hook? who needs those, just make them global inside of your hook
How do you want calculate others screens people position without ScrW and ScrH
 
Reactions: List

jamEs

fqjdlkmsbvqfgkhpoiuaeazer
Joined
Apr 26, 2016
Messages
1,155
Nebulae
3,345
How do you want calculate others screens people position without ScrW and ScrH
????

I don't even know what you mean

the closest I can get to interpreting that sentence is you requiring the position of a player applied onto your screen

ofc with this it's gonna be at their feet and you'll be included, too

Code:
hook.Add("HUDPaint", "playerPosition", function()
    for _, ply in pairs(player.GetAll()) do
        local pos = ply:GetPos():ToScreen()
      
        draw.SimpleText(ply:Nick(), "ChatFont", pos.x, pos.y, Color(255, 255, 255), TEXT_ALIGN_CENTER)
    end
end)
 

karl-police

Nucleus
Joined
Jul 3, 2016
Messages
1,607
Nebulae
3,299
????

I don't even know what you mean

the closest I can get to interpreting that sentence is you requiring the position of a player applied onto your screen

ofc with this it's gonna be at their feet and you'll be included, too

Code:
hook.Add("HUDPaint", "playerPosition", function()
    for _, ply in pairs(player.GetAll()) do
        local pos = ply:GetPos():ToScreen()
    
        draw.SimpleText(ply:Nick(), "ChatFont", pos.x, pos.y, Color(255, 255, 255), TEXT_ALIGN_CENTER)
    end
end)
holy shit that complete more different that I thought.


alright tell me where the hell I can define x and y what is this it returns vector then x and y from what what is x and y the screen size what the hell is this.
 
Last edited:
Reactions: List

Postino

Atom
Joined
Apr 26, 2016
Messages
2,775
Nebulae
4,524
holy shit that complete more different that I thought.


alright tell me where the hell I can define x and y what is this it returns vector then x and y from what what is x and y the screen size what the hell is this.
the game picks the x and y for you, with pos.x it returns the x position of the ply entity
[doublepost=1492880652][/doublepost]
everyone knows the only good way to code HUDs is to do
  • all calculations inside of the hook
  • no ScrW() or ScrH()
  • every line max. 3 characters
  • local material/texture definitions outside of the painting hook? who needs those, just make them global inside of your hook
what can i use for scrw() and scrh()

what do you mean by every line max. 3 characters?

why so? i mean wouldn't the performance be the same or is it actually better
 

jamEs

fqjdlkmsbvqfgkhpoiuaeazer
Joined
Apr 26, 2016
Messages
1,155
Nebulae
3,345
the game picks the x and y for you, with pos.x it returns the x position of the ply entity
[doublepost=1492880652][/doublepost]
what can i use for scrw() and scrh()

what do you mean by every line max. 3 characters?

why so? i mean wouldn't the performance be the same or is it actually better
ITS A MEME

:(
 

karl-police

Nucleus
Joined
Jul 3, 2016
Messages
1,607
Nebulae
3,299
the game picks the x and y for you, with pos.x it returns the x position of the ply entity
[doublepost=1492880652][/doublepost]
what can i use for scrw() and scrh()

what do you mean by every line max. 3 characters?

why so? i mean wouldn't the performance be the same or is it actually better
yes but I don't want to place entities on my map I want to place them on my screen.
 

karl-police

Nucleus
Joined
Jul 3, 2016
Messages
1,607
Nebulae
3,299
Well, I think he doesn't lead a random support thing

lv4qmgB.png


People actually want my help.
 
Status
Not open for further replies.