Login spawn point
#1
Is there some way to always has the user spawn at a certain point when login in?
As it is (per default?) the server remembers the position, and I don't want that.

/Charlie
Reply
Thanks given by:
#2
DiamondToaster might have a plugin for that. When I join his server I always end up at the spawn.
Reply
Thanks given by:
#3
Yep, that's part of my Smash Bros. plugin. I could take just that section and turn it into a small plugin.
Reply
Thanks given by:
#4
It does make sense to separate it from each other Wink
Reply
Thanks given by:
#5
I originally made it to keep people out of the arenas when the plugin reloaded. Tongue

Here you go. Open the script and change the spawn values accordingly.


Attached Files
.zip   LoginTeleport.zip (Size: 816 bytes / Downloads: 246)
Reply
Thanks given by:
#6
Wouldn't this work fine:
function OnPlayerSpawned(a_Player)
   if (not --[[ Is In Arena]]) then
      return false
   end

   -- Teleport to spawn
end
cPluginManager:AddHook(cPluginManager.HOOK_PLAYER_SPAWNED, OnPlayerSpawned)
Reply
Thanks given by:
#7
Well, if a Player relogs, then the plugin kicks him from the arena automatically to prevent him from being able to log back in and win. When the entire plugin is reloaded, the current game data is lost and kicks everyone to prevent interference with people being stuck/entering arenas. A very rough and hackish solution to a weird problem. Tongue Also, the Smash Bros. plugin had a more "dedicated server" approach so it doesn't expect any other plugins to be present. That will be fixed with my rewrite.

Also, I'm having a really weird bug that I can't seem to fix, if anyone wants to look at the GitHub repo, feel free to point stuff out. Smile

https://github.com/DevToaster/MCArena

EDIT: Never mind, I found the problem. I forgot tables passed values in reference and not in pure values which caused the auto-updating. Silly me. Big Grin
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)