Jump to content

I need a little help


Recommended Posts

I need a little help for my script
So I want to make a "gamemode" and add an another "gamemode" to that first one

local marker = createMarker(2151.09692, -100.14128, 1.68205, "cylinder", 192, 203, 6)
setMarkerSize(marker, 2,5)
setMarkerColor(marker, 192, 203, 6)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function handlePlayerMarker(hitElement)
    local elementType = getElementType(hitElement)

    setElementPosition(hitElement, 2155.25220, -1799.30273, 13.54016)
    outputChatBox("#F70000[Info] #FFFFFFBeléptél a freeroam játékmódba!", hitElement, 247, 0, 0, true)
    setGameType("Freeroam")
    setElementDimension(hitElement, 2)
end
addEventHandler("onMarkerHit", marker, handlePlayerMarker)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function MessageByCommand(thePlayer)
  if (getElementDimension(source) == 2) then
    outputChatBox("#F70000[Info] #FFFFFFAktíváltad a DM mode-ot, így már le tudnak lőni!", thePlayer, 247, 0, 0, true)
    setElementDimension(thePlayer, 4)
    setElementPosition(thePlayer, 1877.86292, -1366.51123, 14.64062)
   end
  else
  outputChatBox("You can only use this function if you are in freeroam")
  end
end
addCommandHandler("dm", MessageByCommand)

so if someone go into my marker he get teleported to LS and change dimension to 2, but if someone in FREEROAM then he can use "dm" command to set dimension and change pos
I want to make that to "dm" command only avalaible for players in freeroam mode/dimension 2

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...