kukimuki Posted May 7, 2023 Share Posted May 7, 2023 I want to make a tdma gamemode and I started with the basic but I dont know how to do that to change dimension if he went in tdma marker and auto change map after 5 min, some one cna help me? local marker = createMarker(2102.52344, -104.24178, 1.27317, "cylinder", 255, 255, 0) setMarkerSize(marker, 2,5) setMarkerColor(marker, 255, 255, 0) ---------------------------------------------------------------------------------------------------------------------------------------- function handlePlayerMarker(hitElement, giveWeapon) local elementType = getElementType(hitElement) setElementPosition(hitElement, 977.28174, -760.51526, 112.20312) outputChatBox("#F70000[Info] #FFFFFFYou joined to TDMA!", thePlayer, 247, 0, 0, true) setGameType("TDMA") giveWeapon(thePlayer, 5, 9999, true) end addEventHandler("onMarkerHit", marker, handlePlayerMarker, giveWeapon(thePlayer, 31, 9999)) ----------------------------------------------------------------------------------------------------------------------------------------------------- function onMarkerHit(hitElement, matchingDimension) if isElement(hitElement) and getElementType(hitElement) == "player" and matchingDimension then -- Give the player a weapon giveWeapon(hitElement, 31, 500) -- Output a message to the player outputChatBox("#F70000[Info] #FFFFFFYou got a weapon with bullets!", thePlayer, 247, 0, 0, true, hitElement) end end addEventHandler("onMarkerHit", marker, onMarkerHit) I already did that the marker and the weapon Link to comment
Doongogar Posted May 7, 2023 Share Posted May 7, 2023 you can use this functions: onMarkerHit setTimer setElementDimension 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