Hello,
I've made a small addon to help people see what are the class names of the entities they are dealing with.
When toggled it seeks out all the entities in the world and show the class name above them.
entity_seeker - Toggles the display of the entities.
ZIP:
[url]https://dl.dropboxusercontent.com/u/22849732/Entity%20Seeker/Entity%20Seeker.zip[/url]
LUA:
[url]https://dl.dropboxusercontent.com/u/22849732/Entity%20Seeker/entity_seeker.lua[/url]
Picture:
[img]http://i1297.photobucket.com/albums/ag28/berkonvo/Hovering_zps0a7783f7.png[/img]
Hope it is of use to you as much as it was to me!
[lua]
bind m "lua_run_cl chat.AddText(Color(255,0,0), LocalPlayer():GetEyeTrace().Entity:GetClass())"
[/lua]
?
Probably the most useless script of 2013
The picture looks like text has been added to a print screen using paint ;S
At least you're trying though.
He just told us how to make an ESP, skiddies are going to be all over gmod now.
If you think that the script useless, leave it this way. You don't need to make him down like this, everyone started small. And people are getting bitched at for trying. I mean, I personally won't need it either - But people like him is what facepunch needs. People that like to share their things, everyone started small. We should improve or give him tips not being a dick to him. But I probabbly shouldn't have said that because noone can change anything ^^
[CODE]local workState = 0[/CODE]
Instead of using integers, you can and should use a boolean.
[CODE]
local coloralpha = 250
local activeColor = Color(200,25,25,coloralpha)
[/CODE]
Why is the alpha in an external variable? And why do you even have alpha when your value is 250? (max is 255), that barely makes a difference.
You can just leave this parameter out.
[CODE]
local targetDistance = math.floor((LocalPlayer():GetPos():Distance( targetPos ))/40)
-one-lined-snip-
if(targetDistance<16)then
draw.SimpleText(target:GetClass(), "TheDefaultSettings", tonumber(targetScreenpos.x), tonumber(targetScreenpos.y), activeColor, TEXT_ALIGN_CENTER)
end
[/CODE]
Okay I don't understand this one. Why do you divide it with 40? And why do you use math.floor, you can use the "<" with your float there, there's no need to use this function.
Another thing I noticed: You don't need to use tonumber() here, they are always numbers.
Also you could just add the color you defined in "activeColor" here as parameter, you wouldn't need to declare a variable.
[QUOTE=freakyy;42755649]If you think that the script useless, leave it this way. You don't need to make him down like this, everyone started small. And people are getting bitched at for trying. I mean, I personally won't need it either - But people like him is what facepunch needs. People that like to share their things, everyone started small. We should improve or give him tips not being a dick to him. But I probabbly shouldn't have said that because noone can change anything ^^
[CODE]local workState = 0[/CODE]
Instead of using integers, you can and should use a boolean.
[CODE]
local coloralpha = 250
local activeColor = Color(200,25,25,coloralpha)
[/CODE]
Why is the alpha in an external variable? And why do you even have alpha when your value is 250? (max is 255), that barely makes a difference.
You can just leave this parameter out.
[CODE]
local targetDistance = math.floor((LocalPlayer():GetPos():Distance( targetPos ))/40)
-one-lined-snip-
if(targetDistance<16)then
draw.SimpleText(target:GetClass(), "TheDefaultSettings", tonumber(targetScreenpos.x), tonumber(targetScreenpos.y), activeColor, TEXT_ALIGN_CENTER)
end
[/CODE]
Okay I don't understand this one. Why do you divide it with 40? And why do you use math.floor, you can use the "<" with your float there, there's no need to use this function.
Another thing I noticed: You don't need to use tonumber() here, they are always numbers.
Also you could just add the color you defined in "activeColor" here as parameter, you wouldn't need to declare a variable.[/QUOTE]
Hey Thanks for the feedback,
I should have tried to polish my code and I am still getting used to Lua so your feedback and examples actually do help me understand code optimization.
Thank you!
[QUOTE=LennyPenny;42747463]He just told us how to make an ESP, skiddies are going to be all over gmod now.[/QUOTE]
If anyone wanted to make an ESP, they could have simply googled how to do it, if I remember correctly there is a blog about Gmod Hacks too.
[QUOTE=KnoxvilleLAD;42747256]The picture looks like text has been added to a print screen using paint ;S
At least you're trying though.[/QUOTE]
Yeah, it does look like that, I suppose It's because the way the font looks and how I just put up a text with no Background.
[QUOTE=Netheous;42746115]Probably the most useless script of 2013[/QUOTE]
There is not a question mark in my post.
And no feedback or useful criticism in your post.
[QUOTE=KillerLUA;42743482][lua]
bind m "lua_run_cl chat.AddText(Color(255,0,0), LocalPlayer():GetEyeTrace().Entity:GetClass())"
[/lua]
?[/QUOTE]
Sure, whatever floats your boat :3 .
dont feel bad. i tried lua coding once. it crashed gmod every time it booted up with the script. im not even sure how thats possible.
Sorry, you need to Log In to post a reply to this thread.