Tic Tac 2 Posted April 27, 2015 Author Share Posted April 27, 2015 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 More sharing options...
DarkDino Posted May 28, 2015 Share Posted May 28, 2015 Nice haha i prepared to answer.. when ii see your last comment. Good for you!, Never put set or add data to player on LEFTGame because this sub is for UNLOAD, not Load. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now