Jump to content

Search the Community

Showing results for tags 'onmarkerhit'.

  • 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
    • General
    • Multi Theft Auto 0.5r2
    • Third party GTA mods
  • Archive
    • Archived Items
    • Trash

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Gang


Location


Occupation


Interests

Found 4 results

  1. Hola hace poco empese a ver tutoriales de scripting mta, y tengo un problema con un marker, una vez en el interior al querer salir aparezco en medio de la nada, veo las edificaciones a lo lejos y escucho el motor del auto que deje en el exterior. No se si el problema estaraen el codigo, si hago dos marker en el exterior no tengo problemas voy de uno a otro sin problemas. marker_entrada = createMarker (1363.81640625, -1279.626953125, 13.546875+1, "arrow", 2, 255, 255, 0, 170) marker_interior = createMarker (285.7109375, -40.9658203125, 1001.515625+1, "arrow", 2, 255, 255, 0, 170) setElementInterior(marker_interior, 1) function La_Entrada(hitElement) setElementInterior(hitElement, 1, 287.466796875, -38.779296875, 1001.515625, 0, 0, 7.7811889648438) end addEventHandler("onMarkerHit", marker_entrada, La_Entrada) function La_Salida(hitElement) setElementPosition(hitElement, 1363.81640625, -1279.626953125+4, 13.546875) end addEventHandler("onMarkerHit", marker_interior, La_Salida) al salir del interior me pasa esto: si alguien tiene una idea de que puede ser, les estare muy agradecidos...
  2. galera alguem poderia me ajudar como fazer um scrpit de linha de onibus? queria fazer um blip do ônibus na f11 onde esta indo o onibus para que os jogadores vejam se está proximo e pode pegar, porem o motorista tem rotas no mapa para passar sugestão? e dicas de como fazer
  3. 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? ?
  4. 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!
×
×
  • Create New...