How do I get this to restart a map?
[IMG]http://puu.sh/ku18h/de7fe61106.png[/IMG]
The point_servercommand entity doesn't work and I have no knowledge in lua, please help me.
point_servercommand does work, the gamemode just has to have it as an entity to be interpreted and ran.
[QUOTE=TFlippy;48797882]What gamemode are you making the map for?[/QUOTE]
Shoot, yeah, totally forgot to say. It's Garry's Mod.
[QUOTE=Nick78111;48798137][URL="http://wiki.garrysmod.com/page/Global/RunConsoleCommand"]http://wiki.garrysmod.com/page/Global/RunConsoleCommand[/URL][/QUOTE]
Yes? I've tried this, but it always makes the server crash.
[QUOTE=code_gs;48798338]point_servercommand does work, the gamemode just has to have it as an entity to be interpreted and ran.[/QUOTE]
It does work... just not in garry's mod because they disabled it for some reason. I think map makers were using it to give themselves admin status on rp servers or something, or ban people that they hated from using the servers that ran their maps.
[QUOTE=Gabezilla97;48799868]It does work... just not in garry's mod because they disabled it for some reason. I think map makers were using it to give themselves admin status on rp servers or something, or ban people that they hated from using the servers that ran their maps.[/QUOTE]
Again, it works fine in Garry's Mod if you have an point entity to interpret it.
Here's a [URL="http://puu.sh/kujIi/0d38230943.vmf"]VMF[/URL] I whipped up, can you tell me what I am doing wrong?
That looks perfect map side. Now just have this an entity to run the command:
[code]ENT.Type = "point"
function ENT:AcceptInput( name, activator, caller, data )
data = string.Explode( " ", data:lower() )
RunConsoleCommand( data[1], data[2] ) -- Note that this is just a hacky way of calling the commands you specified; with single word commands or ones with multiple arguments, you'll need to account for that in the command run.
end[/code]
Define "Entity," like the ones in hammer or an actual entity file in the /lua folder?
/lua/entities/point_servercommand.lua
Can also be defined as a gamemode entity.
... I placed it in /autorun/...
Anways, it works now. Thank [I]so much[/I] for helping me.
Sorry, you need to Log In to post a reply to this thread.