Jump to content

Search the Community

Showing results for tags 'teleport'.

  • 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 10 results

  1. After 6 years and long time of myself being bored, I've decided to stop being bored and (re)do my old idea of Stargate gamemode for MTA:SA, because why not. The old post with description is here: Stargate gamemode for MTA:SA resurrected A gamemode for MTA:SA based on STARGATE: Horizon of the universe - GTA:SA mod (https://www.moddb.com/mods/stargate-horizon-of-the-universe; will be referred to as HoTU) and Stargate Carter's Addon Pack - Garry's Mod addon (https://steamcommunity.com/workshop/filedetails/?id=180077636; will be referred to as CAP) and of course the franchise Stargate (SG-1;Atlantis;Universe; see: https://en.wikipedia.org/wiki/Stargate). This gamemode will (probably) contain most of, or at least many of elements from these two gamemodes and the franchise - Stargates (with all their beauty - dialling, transporting all elements, time travel, wormhole jumping, other physics), transport rings, planets (Earth/SGC, San Andreas, Atlantis, Destiny, Custom maps, ...) & atmosphere, energy system and more. Where is the gamemode from 2017? In void. All source files were deleted. This is however not a bad thing, because the source code was ugly, a one big non-effective spaghetti code (with exactly 0 cycles) that did not work nicely and performed poorly. That was the main reason alongside the high time consumption, why this gamemode/project was abandoned in 2017 (it took me many weeks to create just a one working stargate with not the best effects, results and physics - what I have completed now took me maybe 2 days in total). Current progress Q: When it will be done, final, completed? A: A little free time, coding only in free time, only when it's wanted, wanna speed up progress? Contribute. Q: Can I see some preview (trailer, demo) of the gamemode (current and previous)? A: If you want screenshots from the old gamemode, look in the old (2017) post. There are also some demos (videos, screenshots) from current gamemode at GitHub repository in branch previews (usually progress made in given release). For real-time updates about progress or changelogs, see GitHub repository (file README.md; differs across branches). What's needed to be done and is not completed? Everything that is unfinished or looks like it. It's found in GitHub repository in TBD.md file (separate branches contain their own file). Availability - Download, Contribute or Share This project is open-source. Gamemode with its updates, progress and source code is available at GitHub for everyone (even to contribute) at: https://github.com/horsecz/MTA-SA-StarGate-gamemode Main (release) branch represents the final gamemode. There are other branches, which are used for development of the gamemode. As the project is open-source, you can contribute to anything you want, as long as you: Create pull request with necessary information Use the (almost) same conventions for code Wait for the supreme court (me) to approve the pull request
  2. Hola buenas, aclaro que no entiendo mucho sobre programación, he aprendiendo poco a poco viendo tutoriales y modificando una que otra cosa que descargo. El punto es que quiero hacer que este script de TP funcione con autos, que se pueda activar tocando el Claxon del vehículo, para que pueda Tpearme con el mismo vehiculo a un punto en especifico, y así darle un uso para "TP de Garaje", intenté cambiar el BindKey por "horn" y de un interior a otro me lleva a otras cordenadas y de un exterior no se teletransporta, estaría bastante agradecido si me pudiesen ayudar. local interiors = { -- {Ext"X", Ext"Y", Ext"Z", | IDInt, IDDim | IntX, IntY, IntZ | IDInt, IDDim | "Nombre"}, {1177.90234375, -1338.9755859375, 14.912269592285, 0, 0, 447, 2520, -98, 10, 0, "LSMD"}, {1195.3037109375, -1354.92578125, 13.389284133911, 0, 0, 1198.0654296875, -1402.2587890625, 13.257797241211, 0, 0, "Prueba"}, } enterPickup = nil exitPickup = nil local bind = "Enter" local screenW, screenH = guiGetScreenSize() addEventHandler("onClientResourceStart", resourceRoot, function() for i,v in pairs (interiors) do local enterPickup = createPickup(v[1], v[2], v[3], 3, 1318, 1) setElementInterior(enterPickup, v[4]) setElementDimension(enterPickup, v[5]) local exitPickup = createPickup(v[6], v[7], v[8], 3, 1318, 1) setElementInterior(exitPickup, v[9]) setElementDimension(exitPickup, v[10]) addEventHandler("onClientRender", root, function() if (isElementWithinPickup(localPlayer, enterPickup)) and getElementInterior(localPlayer) == getElementInterior(enterPickup) and getElementDimension(localPlayer) == getElementDimension(enterPickup) then dxDrawHelp("Propiedad : "..v[11], "Presiona "..bind.." para entrar.") elseif (isElementWithinPickup(localPlayer, exitPickup)) and getElementInterior(localPlayer) == getElementInterior(exitPickup) and getElementDimension(localPlayer) == getElementDimension(exitPickup) then dxDrawHelp("Propiedad : "..v[11], "Presiona "..bind.." para salir.") end end) bindKey(bind, "down", function() if (isElementWithinPickup(localPlayer, enterPickup)) and getElementInterior(localPlayer) == getElementInterior(enterPickup) and getElementDimension(localPlayer) == getElementDimension(enterPickup) then triggerServerEvent("warpPlayer", localPlayer, localPlayer, v[6], v[7], v[8], v[9], v[10]) elseif (isElementWithinPickup(localPlayer, exitPickup)) and getElementInterior(localPlayer) == getElementInterior(exitPickup) and getElementDimension(localPlayer) == getElementDimension(exitPickup) then triggerServerEvent("warpPlayer", localPlayer, localPlayer, v[1], v[2], v[3], v[4], v[5]) end end) end end) local blips = { -- blip ekleye bilirsiniz. {810.4853515625, -1616.16015625, 13.546875, 10}, } for i,v in pairs (blips) do createBlip(v[1], v[2], v[3], v[4], 2, 255, 255, 255, 255, 0, 100) end function guiGridListGetSelectedItemText ( gridList, column ) local item = guiGridListGetSelectedItem ( gridList ) if item then return guiGridListGetItemText ( gridList, item, column or 1 ) end return false end -- function isElementWithinPickup(theElement, thePickup) if (isElement(theElement) and getElementType(thePickup) == "pickup") then local x, y, z = getElementPosition(theElement) local x2, y2, z2 = getElementPosition(thePickup) if (getDistanceBetweenPoints3D(x2, y2, z2, x, y, z) <= 1) then return true end end return false end function round(num) if ( num >= 0 ) then return math.floor( num + .5 ) else return math.ceil( num - .5 ) end end function convertNumber( number ) local formatted = number while true do formatted, k = string.gsub( formatted, "^(-?%d+)(%d%d%d)", '%1 %2' ) if ( k==0 ) then break end end return formatted end function guiComboBoxAdjustHeight ( combobox, itemcount ) if getElementType ( combobox ) ~= "gui-combobox" or type ( itemcount ) ~= "number" then error ( "Invalid arguments @ 'guiComboBoxAdjustHeight'", 2 ) end local width = guiGetSize ( combobox, false ) return guiSetSize ( combobox, width, ( itemcount * 20 ) + 20, false ) end
  3. Olá, coloquei uma loja mas queria que ela fosse acessada somente na dimensão "0", caso alguém vá nela pela dimensão "1" não conseguirá entrar nela. Está desta forma: local entrada = createMarker(810.5, -1616.246, 14.500, 'arrow', 1.0, 255, 69, 0, 0) ---> Obs Marcador da Entrada local blip createBlip (802.636, -1617.986, 19.383, 29) -------> Icone no mapa function entrar( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then setElementDimension(hitElement, 1) ------> Local Spawn dentro do interior setElementInterior(hitElement, 10, 364.534, -73.934, 1001.508) ------> Local Spawn dentro do interior end end addEventHandler( "onMarkerHit", entrada , entrar ) -------------------------------------------------- local saida = createMarker(362.848, -75.144, 1002.400, 'arrow', 1.0, 255, 69, 0, 1) ---------> Obs Marcador da Saida local ped = createPed (167, 376.508, -65.849, 1001.508, 180) --------> Npc setElementDimension(saida, 1) setElementInterior(saida, 10) setElementDimension(ped, 1) setElementInterior(ped, 10) function sair( hitElement, matchingDimension ) if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then setElementDimension(hitElement, 0) -----> Spawn Saida setElementInterior(hitElement, 0, 794.292, -1624.858, 13.391) -----> Spawn Saida end end addEventHandler( "onMarkerHit", saida , sair )
  4. Português coloquei uma loja mas queria que ela fosse somente acessada na dimensão "0" caso alguém va nela na dimensão "1" não conseguirá entrar nela Inglês I put a store but I wanted it to be accessed only in dimension "0" if someone goes to dimension "1" they will not be able to enter it Espanhol Puse una tienda pero quería que se accediera solo en la dimensión "0" si alguien va a la dimensión "1" no podrá entrar
  5. First, I began with this: When entering either marker, you are taken to the specified location. It works perfectly. Both markers take me to the desired location in San Andreas' map. I moved them around and changed the shape of the marker just to be sure. There were no problems. Then, I found this: This is supposed to teleport you into the specified interior (nº0), and the coordinates next to the interior (x, y, z) The chatbox outputs the expected message. However, there is no teleporting to the specified place. The function 'setElementInterior' looks good, judging by what the wiki says. What am I missing? Something tells me it's a very obvious error I'm failing to see.
  6. Eu Queria Saber Como Eu Coloco Dx Com Teleporte Tipo, Quando Eu Dou O Comando Do Teleporte Exemplo "/praia" Ai Apareçe o Jogador Foi Para Praia Mais Eu Queria Que Essa Msg Aparecia No Topo Da Tela Junto Com O Dx. Eu Sou Bom Em Scripter Mais Com Dx Nao Sou Bom Entao Ta Ai Me Ajudem Por Favor Teleportes: local posicoes = { { 350.177, -1763.144, 5.283 }, } function PosicaoPlayer ( thePlayer, command ) local azar = math.random ( #posicoes ) local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, unpack ( posicoes [ azar ] ) ) else setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) end outputChatBox ('#ffffff[ #00ff00INFO #ffffff]#ffffff: O Jogador(a) ' .. getPlayerName(thePlayer) .. ' #ffffffFoi Para [/#00ff00praia#ffffff]', root, 255, 255, 255, true) end addCommandHandler ( "praia", PosicaoPlayer ) local posicoes = { { 2465.643, -1670.133, 13.477 }, } function PosicaoPlayer ( thePlayer, command ) local azar = math.random ( #posicoes ) local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, unpack ( posicoes [ azar ] ) ) else setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) end outputChatBox ('#ffffff[ #00ff00INFO #ffffff]#ffffff: O Jogador(a) ' .. getPlayerName(thePlayer) .. ' #ffffffFoi Para [/#00ff00cj#ffffff]', root, 255, 255, 255, true) end addCommandHandler ( "cj", PosicaoPlayer ) local posicoes = { { 2172.055, -1015.773, 62.972 }, } function PosicaoPlayer ( thePlayer, command ) local azar = math.random ( #posicoes ) local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, unpack ( posicoes [ azar ] ) ) else setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) end outputChatBox ('#ffffff[ #00ff00INFO #ffffff]#ffffff: O Jogador(a) ' .. getPlayerName(thePlayer) .. ' #ffffffFoi Para [/#00ff00favela#ffffff]', root, 255, 255, 255, true) end addCommandHandler ( "favela", PosicaoPlayer ) local posicoes = { { 1914.546, -2415.094, 13.539 }, } function PosicaoPlayer ( thePlayer, command ) local azar = math.random ( #posicoes ) local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, unpack ( posicoes [ azar ] ) ) else setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) end outputChatBox ('#ffffff[ #00ff00INFO #ffffff]#ffffff: O Jogador(a) ' .. getPlayerName(thePlayer) .. ' #ffffffFoi Para O AeroPorto De [/#00ff00ls#ffffff]', root, 255, 255, 255, true) end addCommandHandler ( "ls", PosicaoPlayer ) local posicoes = { { -2334.966, -1658.198, 483.703 }, } function PosicaoPlayer ( thePlayer, command ) local azar = math.random ( #posicoes ) local veh = getPedOccupiedVehicle(thePlayer) if (veh) then setElementPosition(veh, unpack ( posicoes [ azar ] ) ) else setElementPosition(thePlayer, unpack ( posicoes [ azar ] ) ) end outputChatBox ('#ffffff[ #00ff00INFO #ffffff]#ffffff: O Jogador(a) ' .. getPlayerName(thePlayer) .. ' #ffffffFoi Para O [/#00ff00mt#ffffff]', root, 255, 255, 255, true) end addCommandHandler ( "mt", PosicaoPlayer )
  7. 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!
  8. I want create a script, which tp a player to me, and teleport me to a player, like in admin panel, just with command. How to make this? For example: /tpto playername , and /tpme playername. And when i teleport a player to me, the player get out from vehicle
  9. hello all i have scripted a command for warehouse but the problem is i want a teleport button for knife arena in my exist guiwindow! client.lua : addCommandHandler( "knife", function( player ) setElementInterior( player, 1, 1401.3, -15, 1000.8 ) -- teleport player to the centre of SA end ) for gui code i dont want to paste here come pm for cilent code of guiwindow,button why i dont want to paste here is members can easy clown my scripts by using my cilentcode!! please help me guys screenshoot ; https://imgur.com/WgJR2Qi
  10. So hello, I maked a script, when i teleport with my command "sf" or "lv" or even "ls" when I'm in a car, I never teleport, but when I'm standing I doo teleport, soo how to do a teleportation with a car that worked when im in car and when im on foot, and i want to add a timer when i say "ls" and on the screen shows "3 seconds until a teleportation", and when hit by a player or a car, stop it by 1 sec and continue it. commando = { } laikas = 5000 function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, 1518.88757, -1668.16504, 13.54688) commando[playerSource] = true setTimer( function() commando[playerSource] = false end, laikas, 1) end addCommandHandler( "ls",Tele) ------------------------------------------------------------------------------------------------------------------------- function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, 2032.60022, 1343.41199, 10.82031) commando[playerSource] = true setTimer( function() commando[playerSource] = false end, laikas, 1) end addCommandHandler( "lv",Tele) ------------------------------------------------------------------------------------------------------------------------- function Tele( playerSource ) if (commando[playerSource]) then end setElementPosition(playerSource, -2028.97644, 148.12634, 28.83594) commando[playerSource] = true setTimer( function() commando[playerSource] = false end, laikas, 1) end addCommandHandler( "sf",Tele) -------------------------------------------------------------------------------------------------------------------------
×
×
  • Create New...