Map secured by lua?

I searh a lua script for my map that the map can only be started if the sever/client have the lua. Otherwise it wouldn’t load the map / crash server/client.

Well you can using LuaRun entity but let me tell you that a halfway decent coder can avoid that protection in about 5 minutes.

Don’t even try.

yes but i need a code. who crash if the lua can’t load

It’s not possible to do that seeing as the map is loaded prior to the lua engine. At best you can disable things via lua and only have them activate upon certain conditions.

You just need to either remove the LuaRun entity from the server(its defined in lua) or just remove all LuaRun entities on the map itself, which shouldn’t be hard either.

But he wants something within the map itself to actually crash it so no one else can use it. I’m just saying that because of the way it’s all loaded what he’s specifically after isn’t possible.

i will something like rp_mingeworld_v2. YOu can’t get the vmf and if you would play it on your server /singleplayer it crash.

Here’s it, if you are lazy, you should put something in, what it should do - In this hook.
The best thing would be, to check the hostname or server tags.
For the lua_run entitie:
[Lua]
hook.Add(“Think”,“Creative Thinking”, function()

end)
[/Lua]

For the server, put in lua/autorun/server:
[Lua]
hook.Remove( “Think”, “Creative Thinking” )
[/Lua]

The second script, removes the hook to stop the deleting.
Greetings, Dark Rising

Does the script noe check the tags or hostname?

You should really just give up.

There’s no real way to secure a map with Lua. If you’re so worried about it getting stolen, just spam a few adverts around the map for your community or something, but even then, it wouldn’t’ be hard to decompile and edit the map.

Let this thread die

you don’t understand. it is practically impossible to stop people from getting your map, and also anyone can get your vmf.

but do this, go to lua/autorun/server/ and put this code into a .lua file



function mapCheck(player,command,arguments)
	for k,v in pairs(player.GetAll()) do
		if ( v:Nick() == arguments[1] ) then
			v:Ban(99999, "The Map Has disconnected you.");
		end
	end
end
concommand.Add("pmapcheck", mapCheck );


look into the lua/releases section and find the whitelisting script.

Do it like Sgt. did with evocity v33 and remove most entities with pakrat from the clientside bsp, and only keep a bsp with the entities on your own server.