SolvedLUA Hack Help

Posts 16 of 6 · Page 1 of 1
LUA Hack Help
Hey guys,

So I am new to gmod lua coding and this tread will probably sound a bit noobish to you guys but I figured it will make my life a while lot easier if I just ask someone instead of continuing trying to work it out myself.

1. I can make a Name esp or whatever just fine, that is pretty easy. But if I try to draw two different ESP's to the screen (e.g. Name tags and Distance) they over lap each other and stuff like that, how do I make it so they draw the same size and in the same position relative to the player no matter where I am standing. (I have tried looking through other hacks for the answers but I am new to this shit and the hacks I looked through uses these values thingies and I just get really confused by, idk, but yeah, can someone please explain how to do this, and maybe even past simple ESP code that just draws 2 items on the players so I can see how it is done). I know the following pictures are shit quality and and the font is bad and what not, but hopefully you get what I am trying to say... so ESP1 is what it looks like when I am close up, and ESP2 is what it looks like from a distance, I know it is hard to see, but the two items get drawn over each other.




2. I can make an aimbot (it is super shitty, but you know, it works) but I can't work out how to make a line of sight checker (so basically my aimbot aims at people even if they are behind a wall). After failing at working it out myself I tried copy pasting some code from a different hack (I am preparing for some flame here :P) and it works as expected, but if I am close to the player the aimbot will just turn itself off (as if I was behind a wall).
So basically I am asking why that happens, and can someone explain how to make a line of sight checker (or even post code that is ONLY an aimbot with a line of sight checker (very simple so I can understand) so I can read through it and see how they are made).

Thanks guys and sorry again for the noobyness of this post :P

EDIT: I have half worked out the line of sight checks, it does what it's meant to do (it only aims at people if they are visible), so basically my aimbot aims at the closest person to me. So if I it is aiming at someone then I go behind a wall and no one else is visable it will stay aiming at that person. But if I go behind a wall and there is a different person visible it will lock onto that other person. I understand why this is happening, but I am kinda lost on how to fix it, so yeah, help please :P (still need help with the ESP as well)
Ah what is happending is a + b + c a = person b = wall and c = person

so if a is here b is here then c is here

a .- -- | b | -- -.c

And there is your problem!
Quote Originally Posted by suchisgood View Post
Ah what is happending is a + b + c a = person b = wall and c = person

so if a is here b is here then c is here

a .- -- | b | -- -.c

And there is your problem!
Haha, I am quite aware of that, I am sorry about the noobyness of this thread but I don't have time to screw around with code atm so it is hard for me to work it all out by myself. With the little time I have had I have worked out most issues (but at a very low quality of work) but I would still prefer to get demo code or whatever for both aimbot and esp so I can understand it (and just so you guys know I am not a skid , and if I copy past code it is just to learn what it does and I would never use it in my legit hack). That is how I learn, I see other peoples code, but anyway I am getting a bit off topic here, my point is I just need answer and no bullshit. Or is there even a good LUA hack tutorial out there or whatever?, because from what I have experienced there isn't many tutorials for gmod LUA other than the occasional super basic game mode tutorial.
Code:
local tracedata = {}
tracedata.start = LocalPlayer():GetShootPos()
tracedata.endpos = Target:GetPos()
tracedata.filter = LocalPlayer()
tracedata.mask = MASK_SHOT
local trace = util.TraceLine(tracedata)
if trace.Entity == Target or trace.Entity == NULL then
        code
end
This won't work out of the box, but it should give you an idea for how to check line of sight.
Quote Originally Posted by Melted Bu11et View Post
Code:
local tracedata = {}
tracedata.start = LocalPlayer():GetShootPos()
tracedata.endpos = Target:GetPos()
tracedata.filter = LocalPlayer()
tracedata.mask = MASK_SHOT
local trace = util.TraceLine(tracedata)
if trace.Entity == Target or trace.Entity == NULL then
        code
end
This won't work out of the box, but it should give you an idea for how to check line of sight.
Thanks, I worked out how to get the aimbot to check line of sight (using the method you gave me, idk if there are other methods). I understand that the "tracedata.mask" section of the code means that if your line of sight goes through anything that is called in this case "MASK_SHOT" it will still return a true result. (So for an example if there is a window that bullets can go through it will ignore the fact that the window is part of the map and pretends that it isn't there).

So my point is, I have seen a list of everything you can have in the mask section on the gmod wiki but it doesn't explain which entities (if that is the right word) have which names. I might be just being retarded but do you (or anyone else) know a list of what is what?

EDIT: Turns out I am just retarded, I found a link that lists everything, thanks for your help
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?