Jump to content

Draqon

Members
  • Posts

    2
  • Joined

  • Last visited

Details

  • Gang
    Stoners
  • Location
    Area 420
  • Occupation
    Dealer
  • Interests
    Selling Drugs

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Draqon's Achievements

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody.

I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody. (2/54)

0

Reputation

  1. marker = createMarker(2498.1, -1657.1, 13.1, "corona", 2.0, 255, 0, 0, 255) function markerhits (source, matchingDimension) if isElementWithinMarker(source, marker) then local resource = getResourceFromName("race") startResource(resource) end end addEventHandler ( "onMarkerHit", getRootElement(), markerhits ) function markerLeave( leaveElement, matchingDimension ) if (not isElementWithinMarker(source, marker)) then local resource = getResourceFromName("DraqMap") startResource(resource) end end addEventHandler( "onMarkerLeave", marker, markerLeave ) using if isElementWithinMarker(source, marker) directly after markerhits or markerLeave gets it working -closed
  2. Idea: Creating a marker on Map "Draqonlife" (gamemode play), which leads you to to another map. In this case "DraqonDocks" (gamemode race). known issues to be ignored: event triggers any marker known issues to be fixed: after gamemode change, the map wont change. Marker.lua : >Creates a marker (works) >Triggers player on entering and leaving any Marker (works) >Starts gamemode race (works) ! Does not start Map ! !! No error when map does not start !! !! ERROR: lobby/ChangeMode.lua:7: attempt to call global 'changeGamemodeMap' (a nil value) !! resourceRoot = getResourceRootElement() function onCurrentResourceStart(Draqonlife) local resourceName = getResourceName(Draqonlife) outputChatBox("Hello and welcome to " .. resourceName .. "!") Marker = createMarker (2860, -2115, 10, "corona", 4.0, 0, 0, 255, 255) -- create Marker end addEventHandler("onResourceStart", resourceRoot, onCurrentResourceStart) //Create Marker function MarkerHit( hitElement, matchingDimension ) local elementType = getElementType( hitElement ) local resource = getResourceFromName ("race") -- | this works, startResource( resource ) -- | really good tho --local resource = getResourceFromName ("DraqonDocks") --startResource( resource ) // If I try to start the map Resource directly after the race resource, // the Map resource wont load up end addEventHandler( "onMarkerHit", root, MarkerHit) //Should start gamemode race (and map) function MarkerLeave( leaveElement,matchingDimension) local elementType = getElementType( leaveElement ) local resource = getResourceFromName ("DraqonDocks") -- |Also not working, server ignores this line, startResource( resource ) -- |as it Ignores this line too. end addEventHandler( "onMarkerLeave", root, MarkerLeave ) ChangeMode.lua > My Idea to fix this problem --Thats why i want to import the mapmanager (or the function changeGamemodeMap) --Sadly I found no useful documentation for my case. --adding <exports.mapmanager:changeGamemodeMap/> to the meta.xml of the scripts didnt work function changeGamemodeMap() changeGamemodeMap("DraqonDocks", "race") -- this doesnt work end addCommandHandler("420", changeGamemodeMap) ___________________________________________________________________________________________ It would be very kind if someone could enlight me and give me a short introduction to using mapmanagers functions properly. Sadly the Mapmanager post in wiki didnt help me too much. If you find a fix for the existing (half working) Marker.lua, then I'd be really glad too I would love to get feedback and already thank everyone
×
×
  • Create New...