kukimuki Posted May 8, 2023 Share Posted May 8, 2023 hey! How can I do that if someone went in marker set player gamemode, but only for that player who entered cuz btw I want to make tdm mode with lobby and in lobby there is a marker and if he go in the marker the dimension and gamemode change for him Link to comment
Shady1 Posted May 11, 2023 Share Posted May 11, 2023 On 08/05/2023 at 19:01, kukimuki said: hey! How can I do that if someone went in marker set player gamemode, but only for that player who entered cuz btw I want to make tdm mode with lobby and in lobby there is a marker and if he go in the marker the dimension and gamemode change for him i will tell you in a simple way,this is a simple code, you can continue through this code according to your game mode and you can set the dimensions side as you want. function onMarkerHit(hitElement, matchingDimension) if hitElement and getElementType(hitElement) == "player" and matchingDimension then setElementDimension(hitElement, 1) -- Change the dimension for the player setElementData(hitElement, "game_mode", "tdm") -- Change the gamemode for the player end end lobbyMarker = createMarker(x, y, z, "cylinder", 2, 255, 0, 0, 100) -- Create the marker addEventHandler("onMarkerHit", lobbyMarker, onMarkerHit) -- Attach the event handler to the marker Link to comment
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