RAGECOOP / RAGECOOP-V

Drive around the interstate with your buddy, enjoy GTAs environment, make own missions and events or just chill in Grove Street! 🌐
https://ragecoop.com
MIT License
57 stars 17 forks source link

How to auto connect to a selected server when game open? #41

Open shamim4s opened 1 year ago

shamim4s commented 1 year ago

I want to load game with auto connect to my selected server . How can i do that?

Sardelka9515 commented 1 year ago

Sorry for the late response, You can write a script and use the scripting API to connect to the server you want

shamim4s commented 11 months ago

@Sardelka9515 its ok, thanks for your reply. It's working. Now I can connect to server press key without ragecoop menu from a simple basic mod. I tried apibridge connect (address). But it's gives an error after connect and basic mod goes disable after connect. Connection is working but for the first time. ragecoop_error

myakkes commented 2 weeks ago

So can you share your Script?

myakkes commented 2 weeks ago

local rageconnect ={}

local RageCoop.Client ={} function rageconnect.tick() if get_key_pressed(Keys.F4) then _serverConnectItem.Activated += (sender, item) => { Networking.ToggleConnection(Main.Settings.LastServerAddress); }; end return rageconnect

help me with script