Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO3.0] Check player map and warp


Tic Tac 2
 Share

Recommended Posts

I've put this code in Sub LeftGame

```
If GetPlayerMap(Index) = 33 Then
Call PlayerWarp(Index, 1, 1, 1)
End If

```
It's supposed to warp player to map 1 x = 1 y = 1 if the player is on map 33 when exiting the game.

But it doesn't work. When i log out i still find myself on map 33.

**EDIT: The actual map check works works. There's something wrong with the warp code.**

**I changed the warp code to a globalmsg "test", and that strangely works when you log out on the map. But not the playerwarp part.**

**EDIT2: I placed Call PlayerWarp(Index, 1, 1, 1) in a custom script for events, and it works.**

**It seems that my placement of the script in Sub Leftgame is wrong. Where do i put it to make the player get warped upon logging out in map 33?**

**EDIT3: Fixed. I put the code in JoinGame instead. The problem was that the account gets unloaded before executing the script. When putting it at the bottom of JoinGame i can check if the player spawns in map 33 and send him away. I'm using this for my boat script where you wait on a boat for 5 minutes before arriving at your destination. But if you log out during this time the events timer will stop, and you will be stuck on the boat when you log in.**
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...