Server redirect
So I tried multiple things but
--goes in autorun/redirect.lua if SERVER then AddCSLuaFile"autorun/redirect.lua" else hook.Add("InitPostEntity","redirect",function() RunConsoleCommand"connect 1.1.1.1:27015" end) --obv i tried putting my ip end
I also tried
if SERVER then AddCSLuaFile"autorun/redirect.lua" else hook.Add("InitPostEntity","redirect",function() RunConsoleCommand("connect 1.1.1.1:27015") end) --obv i tried putting my ip end
Edited I'm switching vps's and I have like 7 days left on the old one and I just want it to run this for now for the players to find the new ip.
Wrong section.
Moved to off topic.
Why don't you try spawning a point_clientcommand? https://developer.valvesoftware.com/wiki/Point_clientcommand
I could be wrong but don't you need to use commas to seperate the connect and the IP, that's always how I've used RunConsoleCommand ¯_(ツ)_/¯
Edited You should also probably verify the script is actually running with a print statement if you haven't done so. AddCSLuaFile for a script in autorun is unnecessary.
Have this redirect addon I generally give customers: https://crident.is-fi.re/069d04.zip