Simple OOC!

Hello! Iv’e Made another lua thing.
Please Comment on this thread saying what I should code next, first who comments will be chosen! so be quick!!


hook.Add( "PlayerSay", "ChatCommand1", function( ply, text, team )

	if (string.sub( text, 1, 4 ) ) == "/ooc"   then 
	PrintMessage( HUD_PRINTTALK, "[Simple-OOC] " .. Entity( 1 ):GetName() .. ":" .. string.sub( text, 5) )
	return false


So you made 6 lines of extremely simple code? Wow, good for you. Congratulations.

I’m not sure that it’s worth anyone’s time here, though.

Sell it on scriptfodder, you deserve the money.

Hey, it’s not a bad place to start if you’re newer to Lua. The first thing I made was some simple 3D2D scoreboard that looked like ass.

return “”

Anyone else going to mention how it will always just print the name of whichever player has entity 1’s slot, or error of there isn’t anyone?

Wow. I’m sure you’re AMAZING at what you do. You fuckin inbred

(User was banned for this post ("Flaming" - Novangel))

I Agree, its a good start. Better than 90% of us who started.

Well since no one has told this guy what do next, how about you use that same hook to do other things like setting your health or changing colors of entites, idk. Take it to the next level. See what you can do with it.

I just fail to see the point of this thread. This isn’t even WAYWO material. Writing six lines of (apparently broken) code does not validate the existence of this thread.

It’s just how you make it seem like you know everything that TRIGGERS me.
And the code actually does work, just shows how skilled you are :smiley:

Plus, this guy is most likely a beginner and is proud of what he did, even if you think it’s small, it might be pretty big to him.

Just wanna let you know, might wanna change Entity(1):Nick() to ply:Nick().
What you’re using well return the first player’s name instead of the actual player who sent the message

your a fucking funny cunt aye, 10x better than what my first script was

why do you always shitpost when someone who’s better than you at coding points out shit code

who even are you?
and what makes you think he’s better than me?

wow nice you can make money printer boxes!1!11!1

The reason is because people who are better clearly already know this simple shit and don’t need to shitpost about it people who might not know how to do it can maybe learn some new things but cancerous shit like “this is so simple to make congrats” is not what the author of the post intended people to comment about.

If anything this author wanted people to say “it might be better if you added this” or “Damn man how did you do this?” with out being sarcastic or being a rude fuck you know it amazing if you really need to get attention from people online like this you really need to grow the fuck up.

Why are you using Entity(1) when there’s a ply variable lying there just waiting to be used?

No one wanted to hear negativity from your mouth shut the fuck up if you “know” this already

“negativity”… “shut the fuck up”…
You’re not helping the situation…

Anyway, to the OP if you want to code something cool, how 'bout… a music player entity?

Oh sorry for using big boy words it appears to me that theres virgin ears here still?

*No one wanted to hear negativity from your mouth shut up if you “know” this already

This is why I say not to learn Lua as your first language, and not to use GMod to learn programming. This doesn’t even use any complex structures or abstractions, and op still managed to fuck it up.

People do a system test in single player, and if it works, hey it must work for everyone!

I know there’s that saying about the cathedral and the bazaar, and GMod is certainly more of a bazaar, but it should be a bazaar, not a crack house with dribbling retards occasionally passing through.