Jump to content
  • 0

Auto teleport player if disconnect inside a area/dome?


HellWalker

Question

Hey guys,

i'm building a AI island with custom loot, etc. Just like origins Sector B.. And I also want to teleport the players if they disconnect inside the island (or inside a triggered dome).

 

Does anyone knows how to do that? Or if there is any tutorial to do that?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I am not sure how Origins is doing it...

How i would do it is setting a variable on the player with a sensor when he enters the sector. Like inSector=1 and when he leaves set it back to 0.

Now in player disconnect if the variable is set to 1 then set a specific location to be teleported to and update the database, if not just update the database with the normal current location.....

Just from my head, but i think that should work

Link to comment
Share on other sites

  • 0

I posted a pretty simple way to do this on OpenDayz before, when someone asked this question.

 

The way I would do it is get the grid coordinates of the entire area you want to blacklist.

Then in server_playerSetup.sqf you can capture the worldposition the player is logging in at, use mapGridPosition to turn it into grid coordinates, then compare it to an array of blacklisted grid coordinates and change the players worldspace if they are inside of it.

Link to comment
Share on other sites

  • 0

I posted a pretty simple way to do this on OpenDayz before, when someone asked this question.

 

The way I would do it is get the grid coordinates of the entire area you want to blacklist.

Then in server_playerSetup.sqf you can capture the worldposition the player is logging in at, use mapGridPosition to turn it into grid coordinates, then compare it to an array of blacklisted grid coordinates and change the players worldspace if they are inside of it.

 

Do you still have the tuto to do that? I'm looking there, but can't find it...

If you still have it or if you can give a tuto about that, would be better, because i'm new to scripting

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...