I'm trying to add different gamemode for each world in core. I added this in gotoworld.lua
what's wrong with this code? Nothing happens. Gamemode doesn't change. I try with /gotoworld creative and /gotoworld world but it doesn't work
Code:
if( Player:MoveToWorld(Split[2]) == creative ) then
Player:SetGamemode(1)
return true
end
if( Player:MoveToWorld(Split[2]) == world ) then
Player:SetGamemode(0)
return true
end