I know about the Lua virus that caused garry to disable it. I need to get this entity to function normally for my map to be worth anything. I assume by means of lua coding? The map will trigger a client to run the command "connect [SERVER IP]" when they walk through specific doors. Or, if you have any blinding insights on how to cause a player to join a server by walking through a door on another, please inform me. This is crucial to a network of servers I am trying to create. Thank you very much.
Create an point entity called point_clientcommand, and use this as a guide for sending the player wherever: [url]https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/base/entities/entities/base_point.lua[/url]
I am confused. Garry disabled point_clientcommand from using any inputs or outputs. But you are telling me to create the entity? Sorry if I'm missing the mark.
You can recreate the entity on Lua, although it was disabled for a reason, and you should consider your options before recreating it, as it may be dangerous for your server or its clients.
I am not going to have anything whatsoever on this server. It's just for walking around. However, if anyone can help me figure out how to make a doorway that connects a client to one of my servers via another method, I'd immensely appreciate it. I'm thinking on collision with a brush, ply:ConCommand ("connect ipgoeshere") but I have only studied other codes and edited. I am not experienced with Lua. Please help. Thanks for the read.
the brush idea is a good idea, or you set 2 vector points which create an cubic area, and when the player is found in it, the concommand will be ran.
Could someone please help me with what whitestar said? I'm a massive Lua noob but I'll do my best. Thank you guys.
We only point you in the direction, so read a bit about lua tables(which is simple), then you get the coordinates either by console or create a console command, and put those coordinates inside the table, (2 corner points), making it an 'cubic' area, then you simply check with a timer if a player is inside those coordinates, such an script had been talked about a few pages back, with literally the same purpose.
So this is my first code from scratch. I will add this to a simple prop entity with a door model. Will this make you connect to another server when you press e on it? I'm sure there's big errors.
function ENT:Use(activator, caller)
self:TriggerOutput("OnUse", activator)
if IsValid(activator) then
self:ConCommand("connect SERVERIPHERE", activator )
end
If I recall correctly, connect is blocked on serverside Player:ConCommand, you need to do some networking and run LocalPlayer():ConCommand( "connect ip" )
Sorry, you need to Log In to post a reply to this thread.