GamingTim Posted February 15, 2014 Posted February 15, 2014 Okay so, i'm not too sure on how to start a gamemode on another diemension, like for example, in the main world there's a lobby, also there's a race gamemode on another dimension and stunts in another dimension. I'm currently looking on this function setElementDimension, what other fucntions, events shall i use?.
cheez3d Posted February 15, 2014 Posted February 15, 2014 You must have different servers for different gamemodes and use redirectPlayer() redirectPlayer()
Bonsai Posted February 15, 2014 Posted February 15, 2014 You gotta create the gamemodes by urself. You can't use existing gamemodes like race for that. They all gotta have a different parent. Players who join a gamemode get childs of it.
GamingTim Posted February 15, 2014 Author Posted February 15, 2014 Well i thought of a multi gamemode but a simplified version, nothing advance etc and not redirecting to another server it's like multi gamemodes in one server I wanted to make gamemodes start on a different dimension that's all i just need the functions/ events needed.
Bonsai Posted February 15, 2014 Posted February 15, 2014 Redirecting to another server is the simplified version. Everything on one server will never be simple.
GamingTim Posted February 15, 2014 Author Posted February 15, 2014 I just need the functions/events needed for this to work.
NeO_DUFFMAN Posted February 15, 2014 Posted February 15, 2014 Knowing the events and functions is not enough to create such a complex script. Infact, you need to create a lot of your own custom events and functions. I'm speaking from personal experience. Others might have a different perspective.
myonlake Posted February 16, 2014 Posted February 16, 2014 (edited) I wouldn't call it complex at all. You can even make a system like that in five minutes or less depending on your needs. Simply put, you create a system that divides gamemodes into dimensions. If you want to use the default gamemodes in it, that's not a problem, you just have to check the player's gamemode and only trigger events and functions for those that are in that specific gamemode. There's nothing more to that really. @Bonsai: Well, since you're the expert - how did FFS got it to work with the default race script? Because they did, and there was no need to make their own. Edited February 16, 2014 by Guest
.:HyPeX:. Posted February 16, 2014 Posted February 16, 2014 @Bonsai: I wonder how FFS got it to work with the default race script. Because they did, and there was no need to make their own. I wanna call fake here, default race will tp you and make you play, it is by force, edited.
FuriouZ Posted February 16, 2014 Posted February 16, 2014 10minutes.. client: exports.scoreboard:scoreboardAddColumn("World") addEventHandler("onClientPlayerJoin", getRootElement(), function() setElementData(localPlayer, "World", "Lobby") end) --#Draw World Gui function drawWorldGUI() lobby = guiCreateWindow(0.26, 0.39, 0.48, 0.21, "World GUI", true) guiWindowSetMovable(lobby, false) guiWindowSetSizable(lobby, false) guiSetVisible(lobby,false) FreeroamBtn = guiCreateButton(0.04, 0.59, 0.30, 0.35, "Freeroam", true, lobby) StuntBtn = guiCreateButton(0.35, 0.59, 0.30, 0.35, "Stunt", true, lobby) FunBtn = guiCreateButton(0.67, 0.59, 0.30, 0.35, "FUN", true, lobby) lobbyBtn = guiCreateButton(0.66, 0.36, 0.08, 0.03, "Lobby", true) guiSetVisible(lobbyBtn,false) Info = guiCreateLabel(0.05, 0.13, 0.90, 0.42, "Welcome\nSelect world to play", true, lobby) guiSetFont(Info, "default-bold-small") guiLabelSetHorizontalAlign(Info, "center", false) guiLabelSetVerticalAlign(Info, "center") end addEventHandler("onClientResourceStart", resourceRoot, drawWorldGUI) --#Bind GUI bindKey("F1", "down", function() if guiGetVisible(lobby) == true then guiSetVisible(lobby,false) guiSetVisible(lobbyBtn,false) showCursor(false) else guiSetVisible(lobby,true) guiSetVisible(lobbyBtn,true) showCursor(true) end end) addEventHandler("onClientGUIClick", root, function() if source == FreeroamBtn then outputChatBox("Succesfully joined Freeroam World", 0, 200, 0, true) setElementData(localPlayer, "World", "Freeroam") triggerServerEvent("onPlayerFreeroamEnter", getLocalPlayer()) elseif source == StuntBtn then outputChatBox("Succesfully joined Stunt World", 0, 200, 0, true) setElementData(localPlayer, "World", "Stunt") triggerServerEvent("onPlayerStuntEnter", getLocalPlayer()) elseif source == FunBtn then outputChatBox("Succesfully joined Fun World", 0, 200, 0, true) setElementData(localPlayer, "World", "Fun") triggerServerEvent("onPlayerFunEnter", getLocalPlayer()) elseif source == LobbyBtn then outputChatBox("Succesfully joined Lobby", 0, 200, 0, true) setElementData(localPlayer, "World", "Lobby") triggerServerEvent("onPlayerLobbyEnter", getLocalPlayer()) end end) server: --#Freeroam World Functions addEvent("onPlayerFreeroamEnter", true) addEventHandler("onPlayerFreeroamEnter", getRootElement(), function() setElementDimension(source, 0) setElementInterior(source, 0) end) --#Stunt World Functions addEvent("onPlayerStuntEnter", true) addEventHandler("onPlayerStuntEnter", getRootElement(), function() setElementDimension(source, 1) setElementInterior(source, 0) end) --#Fun World Functions addEvent("onPlayerFunEnter", true) addEventHandler("onPlayerFunEnter", getRootElement(), function() setElementDimension(source, 2) setElementInterior(source, 0) end)
Moderators Citizen Posted February 16, 2014 Moderators Posted February 16, 2014 Ok so first, it didn't take you only 10 minutes, then your code is just the begining, because you need to modify the gamemodes that you want to make them work in only one world. Additionnaly, I would use only one event for the world selection.
FuriouZ Posted February 16, 2014 Posted February 16, 2014 Ok so first, it didn't take you only 10 minutes, then your code is just the begining, because you need to modify the gamemodes that you want to make them work in only one world. Additionnaly, I would use only one event for the world selection. I know, i did example to him. And yes, i did it with 10 minutes, i took some functions from my own gamemode.
myonlake Posted February 16, 2014 Posted February 16, 2014 @Hypex: I think it's obvious, that it's edited. But Bonsai says the following: You gotta create the gamemodes by urself. You can't use existing gamemodes like race for that. Which is wrong, because all the race servers use the default race gamemode (some don't, because they wanted to revamp everything to correspond their own methods of making things), which obviously is edited. But the point is, you don't need to make your own, you just have to place enough stuff around to make it work with your own system. @Citizen: His example was just to show how easy it is to make one. The rest is simply just edits to the gamemodes so that they only fetch the players within that gamemode, which on the other hand is just dimension or element data or whatever you use to do that. It's nothing "complex", as mentioned above...
NeO_DUFFMAN Posted February 16, 2014 Posted February 16, 2014 Like i said, others might have a different perspective. I find it pretty complex. Perhaps cause i have a different method of dealing with something like this. But honestly, i guess segregating the different gamemodes among the players and creating a simple system to manage and handle all these gamemodes definitely seems like a better alternative. Wish, someone would have brought this topic up a month back lol.
Bonsai Posted February 16, 2014 Posted February 16, 2014 @Hypex: I think it's obvious, that it's edited. But Bonsai says the following:You gotta create the gamemodes by urself. You can't use existing gamemodes like race for that. Which is wrong, because all the race servers use the default race gamemode (some don't, because they wanted to revamp everything to correspond their own methods of making things), which obviously is edited. But the point is, you don't need to make your own, you just have to place enough stuff around to make it work with your own system. @Citizen: His example was just to show how easy it is to make one. The rest is simply just edits to the gamemodes so that they only fetch the players within that gamemode, which on the other hand is just dimension or element data or whatever you use to do that. It's nothing "complex", as mentioned above... Using existing gamemodes like race and do all the editing seems way more complicated to me than just creating your own one. Of course there are functions you can take from there without much editing, but basically just doing edits without knowing exactly what is done in every line and why, because you didn't write it, will cause much more trouble. However, I only know the race gamemode, and its in my opinion not worth to be used for that, since there is a lot of weird stuff inside which can be handled much easier.
vEnom.sk Posted February 16, 2014 Posted February 16, 2014 I wouldn't call it complex at all. You can even make a system like that in five minutes or less depending on your needs. Simply put, you create a system that divides gamemodes into dimensions.If you want to use the default gamemodes in it, that's not a problem, you just have to check the player's gamemode and only trigger events and functions for those that are in that specific gamemode. There's nothing more to that really. @Bonsai: Well, since you're the expert - how did FFS got it to work with the default race script? Because they did, and there was no need to make their own. Yep. That will definitely work. NOT. But what do I know about multigamemodes anyway...
Bonsai Posted February 16, 2014 Posted February 16, 2014 I wouldn't call it complex at all. You can even make a system like that in five minutes or less depending on your needs. Simply put, you create a system that divides gamemodes into dimensions.If you want to use the default gamemodes in it, that's not a problem, you just have to check the player's gamemode and only trigger events and functions for those that are in that specific gamemode. There's nothing more to that really. @Bonsai: Well, since you're the expert - how did FFS got it to work with the default race script? Because they did, and there was no need to make their own. I'm not sure if you are trolling or actually serious about what you are saying. Therefore, I won't pay attention to this topic anymore.
myonlake Posted February 17, 2014 Posted February 17, 2014 I wouldn't call it complex at all. You can even make a system like that in five minutes or less depending on your needs. Simply put, you create a system that divides gamemodes into dimensions.If you want to use the default gamemodes in it, that's not a problem, you just have to check the player's gamemode and only trigger events and functions for those that are in that specific gamemode. There's nothing more to that really. @Bonsai: Well, since you're the expert - how did FFS got it to work with the default race script? Because they did, and there was no need to make their own. Yep. That will definitely work. NOT. But what do I know about multigamemodes anyway... Not like I haven't made three lobbies in my life.
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