ConnectToServer
From Onset Developer Wiki
Description
Connects the game to another server. The connection will happen on the next game tick.
Syntax
ConnectToServer(Address, Port [, Password])
Parameters
- Address
Server IP or hostname. - Port
Server port. - Password (optional)
Optional server password.
Return Value
- This function does not return anything.
Example
function OnKeyPress(key)
if key == "J" then
ConnectToServer("127.0.0.1", 7777, "")
end
end
AddEvent("OnKeyPress", OnKeyPress)