Jump to content

nydlv

Members
  • Posts

    13
  • Joined

  • Last visited

Details

  • Gang
    groove

nydlv's Achievements

Square

Square (6/54)

0

Reputation

  1. nydlv

    big help

    okey i will do it, but i found bug in script, when you are teleporting where interior is 3 and dimension is 1, it teleport you to that location but when i typed /getpos, there was typed, Interior: 0, Dimension: 0 wtf?
  2. nydlv

    big help

    i added <resource src="enterh" startup="1"/> to mtaconfig.conf hmm.. another problem, how can i make, when you are in marker zone the text appear in the center-bottom of screen? (dxDrawText) ..and make another, in map something like text="Welcome to the building 1", hope you understand me sorry for my good english
  3. nydlv

    big help

    all works, thank you guys
  4. nydlv

    big help

    no, then are no markers visible.
  5. nydlv

    big help

    created zipfile, refresh in server consule, enterh resource loaded, BUT staying on marker there are no debug and nothing happens !!! enterh folder my meta.xml <meta> <script src="enterh_c.lua" type="client"/> </meta> my enterh_c.lua function tryToTeleport() outputDebugString("pressed enter_exit") local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then outputDebugString("in vehicle - cant teleport") return false end local tx=tonumber(getElementData(current, "TposX")) local ty=tonumber(getElementData(current, "TposY")) local tz=tonumber(getElementData(current, "TposZ")) local ti=tonumber(getElementData(current, "Tinterior")) local td=tonumber(getElementData(current, "Tdimension")) if (tx and ty and tz and ti and td) then setElementPosition(getLocalPlayer(),tx,ty,tz) setElementDimension(getLocalPlayer(), td) setElementInterior(getLocalPlayer(), ti) outputDebugString("teleported") return true -- the rest will not run end outputDebugString("failed to teleport - something wrong with marker in map file") end local keys = getBoundKeys('enter_exit') for key, state in pairs(keys) do outputDebugString("bound key: "..key) bindKey(key, "up", tryToTeleport) end current = nil function disableCurrentMarker(hitElement, matchingDimension) outputDebugString("something left the marker") if (matchingDimension and hitElement==getLocalPlayer()) then outputDebugString("you left the marker") current = nil end end function setAsCurrentMarker(hitElement, matchingDimension) outputDebugString("something hit the marker") if (matchingDimension and hitElement==getLocalPlayer()) then outputDebugString("you hit the marker") current = source end end local markers = getElementsByType("marker", getResourceRootElement(getThisResource())) local i = 1 outputDebugString("Markers count: "..#markers) for key, val in ipairs(markers) do local atype = getElementData(val, "atype") if (atype=="teleport") then outputDebugString("Found marker: "..i) i=i+1 addEventHandler("onClientMarkerHit", val, setAsCurrentMarker) addEventHandler("onClientMarkerLeave", val, disableCurrentMarker) end end enterhmaps folder meta.xml <meta> <map src="enterh.map" dimension="0" /> </meta> enterh.map <map> <marker posX="1482" posY="-1734.94" posZ="13" interior="0" dimension="0" type="cylinder" size="3" color="#ffffff" atype="teleport" TposX="1487.06" TposY="-1735.05" TposZ="13.38" Tinterior="0" Tdimension="0" /> </map> link to zip files http://www.failiem.lv/list.php?i=tsgopd meiby i need server side script too?
  6. nydlv

    big help

    i doit as you say. Bet when i am staying on marker nothing happens and when presing enter_exit button too. Where is the problem? edit: i think there is problem with plugin, because it does not debug, when i am on marker, but how can i test it?
  7. nydlv

    big help

    not working anyway
  8. nydlv

    big help

    i was installed all how you say, but when i am on/in red marker nothing happens on marker, no teleport i was presed f, enter too, nothing happens
  9. nydlv

    big help

    meiby setElementPosition (player, 0, 1481.44, -1768.29,18.79) or setPlayerPosition (player, 0, 1481.44, -1768.29,18.79) ?
  10. nydlv

    big help

    someting not working meta.xml <meta> <script src="tele_c.lua" type="client"/> </meta> tele_c.lua function teleport (player,teleport) if teleport == 0 then setElementInterior (player, 0, 1481.44, -1768.29,18.79) unbindKey ("f","down",teleportToggle) -- Remember, replace key. elseif teleport == 1 then -- For another teleport. end end addEventHandler("onMarkerHit",markerOnEntranceDoor, function (hitPlayer,dimension) teleport = 0 bindKey ("f","down",teleport,hitPlayer,teleport) -- Replace key. end) nothing happens, and no marker visible, help pls
  11. nydlv

    big help

    hi again, how to make the enter script with keybord binds ? Something like house entering example - you would enter the police station, you access to a door and press f now you are inside, press f from inside now you are outside sorry for my lang.
  12. nydlv

    need help.

    hello, can someone post here resource, where can add custom or default map icons. example - http://gtag.gtagaming.com/images/San-Andreas/Maps/gtasa_tag_map.jpg
×
×
  • Create New...