Hard Coded Code??!?!?!

Hey guys I was just curious if it’s possible to implement code into a map. For example I press a button and in return the player says Hi. I would obviously put a script/function that makes players say hi, but where would I input the actual function on the map and how would I do it?

Is this similar to what you want? http://www.moddb.com/games/half-life-2/tutorials/trigger-a-console-command-when-the-player-enters-a-trigger-brush

Perfect thanks, and also thanks for posting!

You’d have more luck with the lua_run entity. If I recall correctly, you won’t be able to run console commands on a server.

Yes you can. I believe that people used to hide lua_run entities in their map to be able to get admin on some servers.

And to be honest, I once tried, just for the sake of trying, having a lua_run entity that’d download lua file and run it, so I could change it if I needed.