Garrys Mod DarkRP Server Hopper + Coordinate and Job checking to switch

Hey guys! I’m not looking to hire a coder (I know scriptfodder is there) But i am looking for someone to point me in the right direction of setting this up. So heres my plan…

I own a Black Mesa Roleplay Server and want to make it so that when you go in a certain portal on the map, it connects you to the other server where XEN is (an alien world).

So heres what i need to find out specifically…

1.) How to set it so that money and stuff are the same on both server ( I hooked both servers up to MySQL data base, not sure what to do after that)

2.) Checking current player model and killing the player if they are not the correct player model ( an HEV Suit to enter XEN ), and sending them to the server if they are in fact wearing the player model ( HEV Suit ).

3.) Connecting them to the XEN server in a location they enter ( The portal on the server sends you to a box where i could somehow run a console command to send them to the server ).

4.) Heres the hard part… when leaving XEN ( The second server ) it connects you back to the original server, HOWEVER instead of sending you back to the spawn where everyone usually spawns, it sends you too a different location on the server with the job you entered in ( Survey Team ).

TL:DR, i need help coding something where if you enter a certain area as a certain player model it sends you to the second server, and then when leaving the second server i need it to connect you to a certain area on the map that is not the general spawn where people usually spawn at.

Thanks :smiley:

i had never tried something like that. so take everything with a grant of salt

1-) iirc its already done, because you use mysql instead of sqlite

2.) [lua] local tbl = {“model/green.mdl”, “model/blue.mdl”}
if !table.HasValue( tbl, ply:GetModel() ) then ply:Kill() end
[/lua]
that should be the basic “kill” part. for the backconnect, you’ll need to check the model serverside, but the back connect needs to be clientside. so grab your net and send an empty kicker to him, so that then it executes the connect to the server.

4.) puh… you will need to check if he is the team, on the position and then you will need to save an pdata on him. Now you could check on Player Spawn if the pdata flag is present, set the job and set his position to your new disired one.