Search the Community

Showing results for tags 'onmarkerhit'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Multi Theft Auto: San Andreas 1.x
    • Support for MTA:SA 1.x
    • User Guides
    • Open Source Contributors
    • Suggestions
    • Ban appeals
  • General MTA
    • News
    • Media
    • Site/Forum/Discord/Mantis/Wiki related
    • MTA Chat
    • Other languages
  • MTA Community
    • Scripting
    • Maps
    • Resources
    • Other Creations & GTA modding
    • Competitive gameplay
    • Servers
  • Other
  • Archive
  • Private Bugtracker

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Gang


Location


Occupation


Interests

Found 3 results

  1. for i, markers in pairs(Entregas_Gases) do Markers_M = createMarker( markers[1], markers[2], markers[3]-1, "cylinder", 3, 255, 255, 255, 20) end for i, blipsMarkers in pairs(Entregas_Gases) do blipsM = createBlip(blipsMarkers[1], blipsMarkers[2], blipsMarkers[3], 41) end function teste1(source) msg.default("vc pisou no marker", source) end addEventHandler("onMarkerHit", Markers_M, teste1) Seguinte, quando eu coloco essas linhas de código n da erro nem nada, mas tbm n acontece nada, eu quero que quando a pessoa pise em cada marker da tabela, aconteça a função teste1, entende? mas sem que seja uma criação de markers fora da tabela, pq assim aumenta muitas linhas de código! Desde já, obrigado!
  2. Olá amigos da comunidade, estou aprendendo um pouco de programação e estou com uma duvida no meu teleporte. Estou tentando usar o "isPedInVehicle" como faço isso? Meu código está assim: local entrar = createMarker(2033.91504, -1402.85449, 16, "cylinder", 2, 255, 0, 0, 50) function entrar1 (thePlayer) local acc = getPlayerAccount(thePlayer) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementInterior(thePlayer, 10, 246.39647, 110.09633, 1003.22571) setElementDimension(thePlayer, 2) else --outputChatBox( "Você não tem permissão!", thePlayer, 200, 0, 0, false ) dxMsg(thePlayer, "Você não tem permissão para entrar aqui!", "error") end end end addEventHandler ("onMarkerHit", entrar, entrar1) Estou tentando bloquear a teleporte com o veiculo usando um if com o "isPedInVehicle" function entrar1 (thePlayer) if not isPedInVehicle ( thePlayer ) then local acc = getPlayerAccount(thePlayer) if acc and not isGuestAccount(acc) then local accName = getAccountName (acc) if isObjectInACLGroup ("user."..accName, aclGetGroup ( Grupo ) ) then setElementInterior(thePlayer, 10, 246.39647, 110.09633, 1003.22571) setElementDimension(thePlayer, 2) else --outputChatBox( "Você não tem permissão!", thePlayer, 200, 0, 0, false ) dxMsg(thePlayer, "Você não tem permissão para entrar aqui!", "error") end end end end addEventHandler ("onMarkerHit", entrar, entrar1) Assim penso eu que iria funcionar, mais nãaoo. O que estou fazendo de errado? 😢
  3. Hey everyone, again, I have a problem. I want to teleport the player whenever it hits the entry/exit marker of a Burger Shot. However, whenever I add the functions to the "onMarkerHit" event, I keep teleporting back and forth. Script is server-sided. --Entry/Exit marker grabbed from .map file local burgershotEnter = getElementByID("burgershotEnter") local burgershotExit = getElementByID("burgershotExit") -- Table of spawn location when entering/leaving Burger Shot local burgershotSpawn = { enter = { x = 364.4189453125, y = -74.154296875, z = 1001.5078125, rot = 313.42001342773 }, exit = { x = -2334.7392578125, y = -166.7958984375, z = 35.5546875, rot = 221.95193481445 } } -- Debug stuff whether coordinates of entry/exit markers are the same as defined in .map (which in this case, it is) local enterPosX, enterPosY, enterPosZ = getElementPosition(burgershotEnter) local exitPosX, exitPosY, exitPosZ = getElementPosition(burgershotExit) outputChatBox ( "Enter: " .. tostring(burgershotEnter) .. " " .. enterPosX .. ", " .. enterPosY .. ", " .. enterPosZ ) outputChatBox ( "Exit: " .. tostring(burgershotExit) .. " " .. exitPosX .. ", " .. exitPosY .. ", " .. exitPosZ ) --------------------------------------- function burgershotEnterHit( player ) outputChatBox("Welcome to Burger Shot! If you want to order something, click on the ped.") setElementInterior( player, 10, burgershotSpawn["enter"]["x"], burgershotSpawn["enter"]["y"], burgershotSpawn["enter"]["z"]) --setPlayerRotation( burgershotSpawn["enter"]["rot"] ) end function burgershotExitHit( player ) outputChatBox("Thanks for visiting Burger Shot! Come again soon!") setElementInterior( player, 0, burgershotSpawn["exit"]["x"], burgershotSpawn["exit"]["y"], burgershotSpawn["exit"]["z"]) --setPlayerRotation( burgershotSpawn["exit"]["rot"] ) end addEventHandler( "onMarkerHit", burgershotEnter, burgershotEnterHit ) addEventHandler( "onMarkerHit", burgershotExit, burgershotExitHit ) Do I still have to check if the player is in the marker or not? Because I thought I don't need to do that when I tie the function to an event with the according marker. Thanks in advance!