Pivity

Server redirect

Last read Never
#1

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.

Dumb x 1
#2

Wrong section.

Moved to off topic.

#3

Why don't you try spawning a point_clientcommand? https://developer.valvesoftware.com/wiki/Point_clientcommand

Winner x 1
#4

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.

#5

Have this redirect addon I generally give customers: https://crident.is-fi.re/069d04.zip

Friendly x 4
Users viewing this thread
Nobody