Jump to content

Search the Community

Showing results for tags 'marker'.

  • 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

  1. hi guys i want call marker from another function like this code local hidemark = createMarker(10,50,5,"cylinder",1,0,255,0) function mark(theplayer) markerveh =createMarker(0,0,5,"cylinder",1,0,255,0) end addEventHandler("onMarkerHit",marker1,mark) function job1(theplayer) setElementVisibleTo(markerveh,root,false)-- for here end addCommandHandler("hidemark",job1)
  2. Mam problem ponieważ gdy próbuje wjechać autem w marker nie następuje teleportacja dopiero jak wysiądę z auta. używam skryptu z internetu ponieważ sam nie umiem takiego napisać a niema nigdzie żadnych poradników. Ten skrypt pobrałem pod jakimś filmikiem na yt. Ten skrypt działa tylko na postać. Nie umiem sobie z tym poradzić jakby ktoś pomógł to dzięki. local marker1 = createMarker(2450.60742,-1762.62109,13.61850, "cylinder", 3, 27,201,227,255) function teleport1(player) if player == localPlayer then setElementPosition(player, 2404.46631,-1737.97083,-4.83252) setPedRotation (player, 90) setElementFrozen(player, false) setTimer(setElementFrozen, TIME, 1, player, false) end end addEventHandler("onClientMarkerHit", marker1, teleport1)
  3. Olá preciso de ajuda com esse codigo basicamente quero que se o player estiver dentro do carro nao abra as portas esse é um codigo de portao por acl que é feito atraves de um marker porem ja tentei muita coisa para nao funcionar se o player estiver dentro de um veiculo tentei ispedinvehicle nao foi , nao sei se alguem poder ajudar agradecia so tem server side Gate10 = createObject ( 1569, 954.40002441406, -1721.9000244141, 12.60000038147, 0, 0, 270 ) Gate11 = createObject ( 1569, 954.40002441406, -1724.9000244141, 12.60000038147, 0, 0, 90 ) local markerlojacarros = createMarker(954.40002441406, -1723.6000244141, 12.60000038147, "cylinder", 3, 0, 0, 0, 0) function PortaoDoor1Loja(thePlayer) moveObject (Gate10, 200, 954.40002441406, -1720.6999511719, 12.60000038147 ) moveObject (Gate11, 200, 954.40002441406, -1726.0999755859, 12.60000038147 ) end addCommandHandler("open",PortaoDoor1Loja) addEventHandler("onMarkerHit", markerlojacarros, PortaoDoor1Loja) function PortaoDoor2Loja() moveObject (Gate10, 200, 954.40002441406, -1721.9000244141, 12.60000038147 ) moveObject (Gate11, 200, 954.40002441406, -1724.9000244141, 12.60000038147 ) end addCommandHandler("close",PortaoDoor2Loja) addEventHandler("onMarkerLeave", markerlojacarros, PortaoDoor2Loja)
  4. 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...
  5. Olá estou com problemas em meu emprego, todo mundo mesmo quem não está atrabalhando neste emprego consegue spawnar o veiculo do trabalho apenas indo até o marker, tentei por uma proteção que faça com quem tem a skin do emprego consiga pegar o carro e o destruir. porém nenhum resultado se conseguirem me ajudar agraçederia muito. local marker = createMarker(2681.17285, -1957.08862, 12.7, "cylinder", 1.0, 0, 0, 255, 255) local Dmarker = createMarker(2679.63989, -1968.49829, 12.5, "cylinder", 3.0, 255, 0, 0, 100) function enterVehicle ( player, seat, jacked ) --quando um jogador entra em um veículo policeLimpador = { [552]=true} --ID Veiculos Policiais policeLimpadorSkins = { [27]=true } --ID Skins Policiais if ( policeLimpador[getElementModel(source)] ) and ( not policeLimpadorSkins[getElementModel(player)] ) then --se o veículo é um dos 4 carros da polícia, ea pele não é uma pele polícia cancelEvent() outputChatBox ( "#ff0000Somente Motoristas podem entrar neste veiculo", player, 255, 255, 255, true ) --and tell the player why end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) --add an event handler for onVehicleStartEnter function Vehicle( thePlayer ) if getElementType(thePlayer) == "player" then local x,y,z = getElementPosition(thePlayer) veh = createVehicle(552, 2687.59, -1970.002, 13.547, -0, 0, 266.348 ) warpPedIntoVehicle(thePlayer, veh) end end addEventHandler("onMarkerHit", marker, enterVehicle) function destroy (hitElement) if getElementType(hitElement) == "Vehicle" then destroyElement(hitElement) end end addEventHandler("onMarkerHit", Dmarker, destroy)
  6. Hello there. I'm looking for way to make markers of type 'arrow' to move up and down like enex markers in singleplayer, how can I do it?
  7. Olá, queria saber como eu posso colocar um limite de 1 veículo para o meu marker no script, o script vai ser um trabalho, ele já cria o veículo e teleporta o jogador até ele, mas é possível sair do veículo e criar outro e daí ele não destrói o veículo anterior. Se alguém puder me ajudar, obrigado. Já consegui resolver!
  8. The question is the following needs to get an item from the server side to the client side, how can I do it? (Elements such as markers, vehicles etc.)
  9. -- server side Cylinder1 = createMarker(3139.8, -3254.3, 123.22222, "cylinder", 1.0, 0, 255, 255, 255) function TEST(playerhit) if isElementWithinMarker(playerhit, Cylinder1) then outputChatBox("U hit marker", root) end end addEventHandler("onMarkerHit", Cylinder1, TEST) I am surprised because I am sure that everything is fine but when I stick to the "cylinder1" marker, nothing happens, and according to the script it should show me that I hit this marker, but nothing is happening, someone has some idea because it is very strange..
  10. Boa tarde, Gostaria de saber como colocar um texto acima de um marker, segue o script de um marker para exemplificar melhor. marker = createMarker ( 1177.4351806641, -1308.5612792969, 13.994218826294 -1, "cylinder", 1.5, 5,106,204, 50) veh = {} function pegarbike ( source ) if isElementWithinMarker (source, marker ) then if veh[source] and isElement( veh[source] ) then destroyElement(veh[source] ) veh[source] = nil end local x,y,z = getElementPosition(source) veh[source] = createVehicle(510 , 1176.7322998047, -1307.6915283203, 13.936520576477) takePlayerMoney(source,100) exports.Scripts_Dxmessages:outputDx(source,'#00FF00[GBO] #FFFFFFFoi cobrado #00FF00$100 #FFFFFFpelo aluguel.',source,255,255,255,true) exports.Scripts_Dxmessages:outputDx(source,'#00FF00[GBO] #FFFFFFSe você sair da bicicleta a seguradora pegará devolta.',source,255,255,255,true) warpPedIntoVehicle (source,veh[source]) else exports.Scripts_Dxmessages:outputDx(source,'#00FF00[GBO] #FFFFFFVocê precisa estar no spawn para alugar uma bike!',source,255,255,255,true) end end addCommandHandler ( "alugar", pegarbike ) function msg (source) exports.Scripts_Dxmessages:outputDx(source,'#00FF00[GBO] #FFFFFFDigite #00FF00/alugar #FFFFFFpara alugar uma bicicleta será cobrado #00FF00$100 #FFFFFF.',source,255,255,255,true) end addEventHandler( "onMarkerHit", marker, msg ) function sair (source) if (veh[source]) and isElement(veh[source]) then destroyElement (veh[source]) exports.Scripts_Dxmessages:outputDx(source,'#00FF00[GBO] #FFFFFFVocê abandonou a bicicleta e a seguradora pegou',source,255,255,255,true) end end addEventHandler ("onVehicleExit", root, sair) Gostaria de colocar acima do marker aparecesse "Alugue uma bicicleta por R$ 100,00! Digite /alugar" Sei que existe o dx msg pra isso, mas não ta funcionando, não sei o motivo. Fico no aguardo.
  11. I've successfully created a marker that triggers 'givePlayerMoney' and 'outputChatBox' when 'onClientMarkerHit' in a client.Lua. Does the server see the amount of money the player now has? Do I have to sync the money to the server with some kind of 'getPlayerMoney' in a server.Lua? I'm planning on making a weapons GUI that works with the player's money.
  12. 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.
  13. Bom, estou montando um shopping com academia, auto escola, mercado, etc..Estou enfrentando um problema com a loja de roupo com o SCRIPT abaixo pois o maker esta com um problema que n consigo resolver e por isso que estou pedindo ajuda, nesse shopping que estou fazendo a loja de roupa dele fica no 4º andar coloquei o maker no local aonde eu queria para que o personagem possa passar encima do maker para executar a função no em tando esta funcionando normal só que no mesmo lugar onde estar o maker nos outros andares abaixo quando passo por la acaba executando a função de troca de roupa sendo que o maker estar no andar de cima parece que o maker esta estendido infinitamente para baixo onde só da pra ver ele no 4 andar preciso da ajuda de alguem q possa me ajudar -- Tables local theCategories = { [0]="Camisetas", [1]="Cabelo", [2]="Calças/bermudas", [3]="Tênis", [4]="Tattoos: Left Upper Arm", [5]="Tattoos: Left Lower Arm", [6]="Tattoos: Right Upper Arm", [7]="Tattoos: Right Lower Arm", [8]="Tattoos: Back", [9]="Tattoos: Left Chest", [10]="Tattoos: Right Chest", [11]="Tattoos: Stomach", [12]="Tattoos: Lower Back", [13]="Cordões", [14]="Relógios", [15]="Bandanas", [16]="Boné", [17]="Extras" } local theMarkers = { {1873.4399414063,-1320.1826171875,28.4921875} -- Grove street --[[ {1097.14661, -1433.43970, 15, 0, 0}, -- Dev one {2123.725, -1198.089, 23.207, 0, 0}, -- Glen Park {1467.643, -1119.731, 23.152, 0, 0}, -- Downtown]]-- } local x, y, z, int, dim = nil, nil, nil, nil, nil local pricesModel = {} local previousModel = nil -- GUI Window CJClothesWindow = guiCreateWindow(509,153,444,480,"Roupas do CJ",false) CJClothesLabel1 = guiCreateLabel(12,22,203,16,"Categorias:",false,CJClothesWindow) guiLabelSetHorizontalAlign(CJClothesLabel1,"center",false) guiSetFont(CJClothesLabel1,"default-bold-small") CJClothesCatoGrid = guiCreateGridList(9,41,214,320,false,CJClothesWindow) guiGridListSetSelectionMode(CJClothesCatoGrid,0) CJClothesItemGrid = guiCreateGridList(225,40,210,321,false,CJClothesWindow) guiGridListSetSelectionMode(CJClothesItemGrid,0) CJClothesLabel2 = guiCreateLabel(230,22,203,16,"Items:",false,CJClothesWindow) guiLabelSetHorizontalAlign(CJClothesLabel2,"center",false) guiSetFont(CJClothesLabel2,"default-bold-small") CJClothesLabel3 = guiCreateLabel(9,400,422,46,"Clique duas vezes em um item para alterar as roupas do CJ.\nSe você gostar da roupa cliquem em salvar, caso contrário clicando em guardar para voltar.\nEsta pele será salvo e definir quando usar a pele CJ.",false,CJClothesWindow) guiLabelSetHorizontalAlign(CJClothesLabel3,"center",false) CJClothesLabel4 = guiCreateLabel(15,452,414,20,"Total preço: $0",false,CJClothesWindow) guiLabelSetColor(CJClothesLabel4,48,128,20) guiLabelSetHorizontalAlign(CJClothesLabel4,"center",false) guiSetFont(CJClothesLabel4,"default-bold-small") CJClothesBuyButton = guiCreateButton(225,364,210,30,"Fechar e comprar a roupa",false,CJClothesWindow) CJClothesCancelButton = guiCreateButton(11,364,211,30,"Fechar e não salvar a roupa",false,CJClothesWindow) local column1 = guiGridListAddColumn( CJClothesCatoGrid, " Categorias:", 0.8 ) local column2 = guiGridListAddColumn( CJClothesItemGrid, " Nome:", 0.6 ) local column3 = guiGridListAddColumn( CJClothesItemGrid, " Preço:", 0.3 ) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(CJClothesWindow,false) local x,y = (screenW-windowW)/1,(screenH-windowH)/1 guiSetPosition(CJClothesWindow,x,y,false) guiWindowSetMovable (CJClothesWindow, true) guiWindowSetSizable (CJClothesWindow, false) guiSetVisible (CJClothesWindow, false) for i=0,17 do local categorie = theCategories local row = guiGridListAddRow ( CJClothesCatoGrid ) guiGridListSetItemText ( CJClothesCatoGrid, row, 1, categorie, false, true ) guiGridListSetItemData ( CJClothesCatoGrid, row, 1, i ) end function createClothesJSONString ( returnType ) local clothesTable = {} local smtn = false for i=0,17 do local texture, model = getPedClothes ( localPlayer, i ) if ( texture ) then local theType, theIndex = getTypeIndexFromClothes ( texture, model ) clothesTable[theType] = theIndex smtn = true end end if ( smtn ) then if ( returnType == "JSON" ) then return "" .. toJSON( clothesTable ):gsub( " ", "" ) .. "" else return clothesTable end else return "NULL" end end function updatePlayerCJSkin ( CJClothesTable ) if ( CJClothesTable ) then if (CJClothesTable == "NULL") then resetPlayerSkin(localPlayer) return end for i=0,17 do local texture, model = getPedClothes ( localPlayer, i ) if (texture) then removePedClothes(localPlayer, i) break else break end end for int, index in pairs( CJClothesTable ) do local texture, model = getClothesByTypeIndex ( int, index ) if ( texture ) then addPedClothes ( source, texture, model, int ) end end end triggerServerEvent( "onChangeClothesCJ", localPlayer, CJClothesTable, createClothesJSONString ( "JSON" ) ) end function resetPlayerSkin(player) if (isElement(player)) then for clothesID = 0, 17 do if ( getPedClothes(player, clotheID)) then removePedClothes(player, clotheID) end end if (getPedClothes(player, 0)) then removePedClothes(player, 0) end if (getPedClothes(player, 1)) then removePedClothes(player, 1) end if (getPedClothes(player, 2)) then removePedClothes(player, 2) end if (getPedClothes(player, 3)) then removePedClothes(player, 3) end if (getPedClothes(player, 4)) then removePedClothes(player, 4) end if (getPedClothes(player, 5)) then removePedClothes(player, 5) end if (getPedClothes(player, 6)) then removePedClothes(player, 6) end if (getPedClothes(player, 7)) then removePedClothes(player, 7) end if (getPedClothes(player, 8)) then removePedClothes(player, 8) end if (getPedClothes(player, 9)) then removePedClothes(player, 9) end if (getPedClothes(player, 10)) then removePedClothes(player, 10) end if (getPedClothes(player, 11)) then removePedClothes(player, 11) end if (getPedClothes(player, 12)) then removePedClothes(player, 12) end if (getPedClothes(player, 13)) then removePedClothes(player, 13) end if (getPedClothes(player, 14)) then removePedClothes(player, 14) end if (getPedClothes(player, 15)) then removePedClothes(player, 15) end if (getPedClothes(player, 16)) then removePedClothes(player, 16) end if (getPedClothes(player, 17)) then removePedClothes(player, 17) end end end function onClientCJMarkerHit ( hitElement, matchingDimension ) if ( matchingDimension ) then if (not isElement(hitElement)) then return end if (isPedInVehicle(hitElement)) then return end if ( hitElement == localPlayer ) then if ( getElementModel ( localPlayer ) == 0 ) then local x1, y1, z1 = getElementPosition(source) local x2, y2, z2 = getElementPosition(hitElement) local maxZ = z1 + 2 if (z2 > maxZ) then return end fadeCamera( false, 1.0, 0, 0, 0 ) setTimer( fadeCamera, 2000, 1, true, 1.0, 0, 0, 0 ) toggleAllControls ( false, true, false ) local px, py, pz = getElementPosition( localPlayer ) x, y, z, int, dim = px, py, pz, getElementInterior( localPlayer ), getElementDimension( localPlayer ) pricesModel = {} previousModel = createClothesJSONString ( "table" ) setTimer( function () --if ( getElementInterior( localPlayer ) ~= 1 ) then -- setElementInterior( localPlayer, 1, 209.78, -33.73, 1001.92 ) --else setElementPosition( localPlayer, 1466.3372802734,-1855.7869873047,26.367027282715 ) --end setElementFrozen( localPlayer, true ) setElementDimension( localPlayer, math.random( 10,6543 ) ) setCameraMatrix( 1468.0489501953,-1852.9401855469,26.367027282715, 1466.3372802734,-1855.7869873047,26.367027282715, 0, 70 ) setTimer( function () setElementRotation( localPlayer, 0, 0, 328.98315429688 ) end, 1000, 2 ) setTimer( function () guiSetVisible ( CJClothesWindow, true ) showCursor( true ) end, 1000, 1 ) end, 1200, 1 ) else exports.GTIhud:dm( "Você precisa da skin do CJ antes de poder definir a roupa", 225, 0, 0 ) end end end end function recountTotalPrice () local totalPrice = 0 for i=0,17 do if ( pricesModel == nil ) then -- Nothing else totalPrice = ( tonumber(totalPrice) + tonumber(pricesModel) ) end end guiSetText( CJClothesLabel4, "Preço Total: R$"..totalPrice ) return totalPrice end for i=1,#theMarkers do local x, y, z, int, dim = theMarkers[1], theMarkers[2], theMarkers[3], theMarkers[4], theMarkers[5] local CJMarker = createMarker( x, y, z, "cylinder", 1, 255, 0, 0, 150) --local blip = createBlip( x, y, z, 45 ) setElementInterior( CJMarker, int ) setElementDimension( CJMarker, dim ) addEventHandler( "onClientMarkerHit", CJMarker, onClientCJMarkerHit ) end addEventHandler( "onClientGUIClick", CJClothesCancelButton, function () fadeCamera( false, 1.0, 0, 0, 0 ) setTimer( fadeCamera, 2000, 1, true, 1.0, 0, 0, 0 ) toggleAllControls ( true, true, true ) guiSetVisible ( CJClothesWindow, false ) showCursor( false ) updatePlayerCJSkin ( previousModel ) setElementFrozen( localPlayer, false ) setTimer( function () --if ( getElementInterior( localPlayer ) ~= int ) then -- setElementInterior( localPlayer, int, x, y, z ) --else setElementPosition( localPlayer, 1874.0081787109,-1317.1353759766,29.4921875 ) --end setElementDimension( localPlayer, 0 ) setCameraTarget ( localPlayer ) end, 1200, 1 ) end , false ) addEventHandler( "onClientGUIClick", CJClothesBuyButton, function () if (getPlayerMoney(localPlayer) >= tonumber( recountTotalPrice () ) ) then fadeCamera( false, 1.0, 0, 0, 0 ) setTimer( fadeCamera, 2000, 1, true, 1.0, 0, 0, 0 ) toggleAllControls ( true, true, true ) guiSetVisible ( CJClothesWindow, false ) showCursor( false ) updatePlayerCJSkin ( createClothesJSONString ( "table" ) ) triggerServerEvent( "onPlayerBougtSkin", localPlayer, recountTotalPrice () ) exports.GTIhud:dm( "Você comprou as roupas do CJ com sucesso!", 225, 0, 0 ) setElementFrozen( localPlayer, false ) setTimer( function () -- if ( getElementInterior( localPlayer ) ~= int ) then -- setElementInterior( localPlayer, int, x, y, z ) --else setElementPosition( localPlayer, 1874.0081787109,-1317.1353759766,29.4921875 ) --end setElementDimension( localPlayer, 0 ) setCameraTarget ( localPlayer ) end, 1200, 1 ) else exports.GTIhud:dm( "Você não tem dinheiro suficiente para todos estes itens!", 225, 0, 0 ) end end , false ) addEventHandler( "onClientGUIClick", CJClothesCatoGrid, function () guiGridListClear( CJClothesItemGrid ) local theRow, theColumn = guiGridListGetSelectedItem ( CJClothesCatoGrid ) if ( theRow == nil ) or ( theRow == -1 ) then return else local selectedCato = guiGridListGetItemData ( CJClothesCatoGrid, theRow, theColumn ) if ( selectedCato ) then local theTable = getClothesTableByType ( selectedCato ) for i=0,#theTable do local texture, model = getClothesByTypeIndex ( selectedCato, i ) local row = guiGridListAddRow ( CJClothesItemGrid ) guiGridListSetItemText ( CJClothesItemGrid, row, 1, texture.." - "..model, false, true ) guiGridListSetItemText ( CJClothesItemGrid, row, 2, "$"..theTable, false, true ) guiGridListSetItemData ( CJClothesItemGrid, row, 1, texture..","..model ) end end end end , false ) addEventHandler( "onClientGUIDoubleClick", CJClothesItemGrid, function () local theRow, theColumn = guiGridListGetSelectedItem ( CJClothesItemGrid ) if ( theRow == nil ) or ( theRow == -1 ) then return false else local selectedItem = guiGridListGetItemData ( CJClothesItemGrid, theRow, theColumn ) local thePrice = guiGridListGetItemText ( CJClothesItemGrid, theRow, 2 ) if ( selectedItem ) then local CJClothesTable = stringExplode( selectedItem, "," ) local texture, model = CJClothesTable[1], CJClothesTable[2] local theType, index = getTypeIndexFromClothes ( texture, model ) local gtexture, gmodel = getPedClothes ( localPlayer, theType ) if ( gtexture == texture ) and ( gmodel == model ) then removePedClothes ( localPlayer, theType, texture, model ) else pricesModel[theType] = tonumber( string.sub(thePrice, 2) ) recountTotalPrice () addPedClothes ( localPlayer, texture, model, theType ) end end end end , false ) function stringExplode(self, separator) Check("stringExplode", "string", self, "ensemble", "string", separator, "separator") if (#self == 0) then return {} end if (#separator == 0) then return { self } end return loadstring("return {\""..self:gsub(separator, "\",\"").."\"}")() end function Check(funcname, ...) local arg = {...} if (type(funcname) ~= "string") then error("Argument type mismatch at 'Check' ('funcname'). Expected 'string', got '"..type(funcname).."'.", 2) end if (#arg % 3 > 0) then error("Argument number mismatch at 'Check'. Expected #arg % 3 to be 0, but it is "..(#arg % 3)..".", 2) end for i=1, #arg-2, 3 do if (type(arg) ~= "string" and type(arg) ~= "table") then error("Argument type mismatch at 'Check' (arg #"..i.."). Expected 'string' or 'table', got '"..type(arg).."'.", 2) elseif (type(arg[i+2]) ~= "string") then error("Argument type mismatch at 'Check' (arg #"..(i+2).."). Expected 'string', got '"..type(arg[i+2]).."'.", 2) end if (type(arg) == "table") then local aType = type(arg[i+1]) for _, pType in next, arg do if (aType == pType) then aType = nil break end end if (aType) then error("Argument type mismatch at '"..funcname.."' ('"..arg[i+2].."'). Expected '"..table.concat(arg, "' or '").."', got '"..aType.."'.", 3) end elseif (type(arg[i+1]) ~= arg) then error("Argument type mismatch at '"..funcname.."' ('"..arg[i+2].."'). Expected '"..arg.."', got '"..type(arg[i+1]).."'.", 3) end end end
  14. Olá, alguem pode me dizer como posso fazer uma imagem em 3d para marcadores. bem nesse estilo PS: Essa print não foi tirada por mim e nem o video feito
  15. Hello, I would like to know how I can or if it is possible to make a marker on the map to set a handling in the player's car. I would also like to know how to place a marker with a 3d image on the map
  16. Boa noite a todos, eu sou bem leigo em Lua, e toda vez que venho aqui fico feliz com a maneira que vocês fazem a gente entender pelo menos o minimo dos scripts que estamos tentando alterar, isso é sensacional. enfim. Hoje eu to com um problema em um sistema de spawn de vtr por acl. Queria que se possível me ajudassem a alterar o que quero nele. Spawn1 = createMarker(-65.258903503418, -343.11831665039, 5.4296875 -1,"cylinder", 1.9, 0, 0, 200, 40) Destroy = createMarker(-65.258903503418, -371.39807128906, 5.4296875 -2,"cylinder", 5.0, 128, 0, 0, 99) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end veh = {} function spawnvtr ( thePlayer, comando, nick ) setElementHealth (veh, 200000) if veh[thePlayer] and isElement( veh[thePlayer] ) then destroyElement ( veh[thePlayer] ) veh[thePlayer] = nil end local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "BOMBEIROS") ) then veh[thePlayer] = createVehicle(529, -61.04016494751, -303.79797363281, 5.3578243255615, 0, 0, 270 ) warpPedIntoVehicle ( thePlayer, veh[thePlayer] ) --exports._infobox:addNotification(thePlayer, "", "success") else outputChatBox("#FFFFFF| #E10000BOMBEIROS #FFFFFF| Somente #E10000BOMBEIROS #FFFFFFPodem Pegar Este Veiculo.",thePlayer,255,255,255, true) end end addEventHandler("onMarkerHit", Spawn1, spawnvtr) function destroyvtr ( thePlayer ) if veh[thePlayer] and isElement(veh[thePlayer]) then destroyElement (veh[thePlayer]) --exports._infobox:addNotification(thePlayer, "", "success") else end end addEventHandler("onMarkerHit", Destroy, destroyvtr) Ele é bem simples, você passa em cima de um marker ele cria um determinado veiculo, e em cima de outro marker e ele destrói. Mas tem 2 poréns eu queria que um único player conseguisse spawnar quantos veículos ele quisesse, e quando ele spawna outro veículo, o anterior some. E o outro problema é que quando o player spawna o veículo e sai do server, ele não consegue mais desespawnar. Alguém pode me ajudar a resolver? Grato a Atenção
  17. I've made a marker-variable (code): exitF = createMarker(246.85884094238, 62.326526641846, 1003.640625, "cylinder", 1.5, 0, 162, 255, 172) Since I've put here a LSPD coordinates, It should work, but It's not. Even If I've inserted, that I want to move this marker to interior ID 3, it's STILL DOESN'T APPEARING. setElementInterior(exitF, 3) Help me! Screenshot from the game (couldn't insert): https://drive.google.com/open?id=13eVt7Pk0VJG3H0RtpWswAJTMj9BdzWh8
  18. SALVE PIAZADA ENTAO TODOS VEZ QUE EU COLOCO ALGUM MOD TIPO AGENCIA ETC APARECE ESSE MARKER GRANDE EM CIMA DAS PORTAS ETC VCS PODERIA AJUDAR ? IMAGEM LINK PQ NAO CONSEGUIR COLOCAR NA URL : https://imgur.com/tAr9LKw
  19. Hola, es mi primer Post y espero haberlo posteado en el lugar correcto... ? tengo un bug en este codigo: addCommandHandler("Traficante", function() MarcadorBusqueda = createMarker(-2440.6796875, -607.326171875, 132.61936950684, "checkpoint", 1.5, 0, 255, 0) MarcadorEntrega = createMarker(-2520.08984375, -624.1328125, 132.78408813477, "checkpoint", 1.5, 255, 0, 0) end) addEventHandler("onClientMarkerHit", MarcadorBusqueda, function() outputChatBox("Ahora debes entregar el paquete en el estacionamiento, ve rapido") destroyElement(MarcadorBusqueda) end) addEventHandler("onClientMarkerHit", MarcadorEntrega, function() outputChatBox("Muy bien, ahora vete antes de que llegue la policia") destroyElement(MarcadorEntrega) end) No se que se debe pero no funciona el codigo y cuando funciona, funciona mal, Ruego a todo aquel que pueda aportar una ayudita con este simple codigo que me ayude, Porfavor, Gracias y espero Sus Respuestas... ? PD: esta indexado en el meta como cliente el archivo que contiene este codigo.... Help Plis!!!!.... PD2: No se ejecutan las sentencias puestas dentro de las funciones de los eventos.... =(
  20. Ola,eu estava tentando fazer um maker para criar um carro eu queria saber como que faz um marker para destruir o carro local criar = createMarker(1604.15, -1612.056, 13.881, 'corona', 1.0, 0, 255, 255, 0 ) function vehicleSpawner(hitElement,matchingDimension) if getElementType(hitElement) == "player" then if getPedOccupiedVehicle(hitElement) == false then local 1604.15, -1612.056, 13.881 = getElementPosition(hitElement) local veh = createVehicle(599, 1604.15, -1612.056, 13.881) warpPedIntoVehicle(hitElement,veh) end end end addEventHandler("onMarkerHit",criar,vehicleSpawner)
  21. eu tinha feito com bind no "k", mas quero passar o painel para o marker. Marker glock = createMarker(297.947, -80.809, 1000.600, "cylinder", 1, 255, 0, 0, 40) setElementInterior(glock, 4) Server function showPanellr(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Porte")) then triggerClientEvent(thePlayer, "painelglock", getRootElement()) end end function onResStartlr() for index, player in ipairs(getElementsByType("player")) do bindKey(player, "k", "down", showPanellr) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), onResStartlr) function onPlayerJoinlr() bindKey(source, "k", "down", showPanellr) end addEventHandler("onPlayerJoin", getRootElement(), onPlayerJoinlr) function cleanAlllr(player) for index, player in ipairs(getElementsByType("player")) do unbindKey(player, "k", "down", showPanellr) end end addEventHandler("onResourceStop", getResourceRootElement(getThisResource()), cleanAlllr) function arma () giveWeapon( source, 22, 300, true ) outputChatBox ('( #ff0000INFO#ffffff ) #ffff00Você comprou #00ff00Glock-18 !',source,255,255,255,true) end addEvent("glock",true) addEventHandler ( "glock", getRootElement(), arma ) Client local screenW,screenH = guiGetScreenSize() local resW, resH = 1365,767 local x, y = (screenW/resW), (screenH/resH) function Pdx () dxDrawLine(333 - 1, 194 - 1, 333 - 1, 574, tocolor(38, 237, 11, 254), 1, false) dxDrawLine(691, 194 - 1, 333 - 1, 194 - 1, tocolor(38, 237, 11, 254), 1, false) dxDrawLine(333 - 1, 574, 691, 574, tocolor(38, 237, 11, 254), 1, false) dxDrawLine(691, 574, 691, 194 - 1, tocolor(38, 237, 11, 254), 1, false) dxDrawRectangle((screenW - 358) / 2, (screenH - 380) / 2, 358, 380, tocolor(0, 0, 0, 138), false) dxDrawImage(333, 194, 358, 380, ":GUI/images/examples/new_city_sfundo.png", 0, 0, 0, tocolor(254, 254, 254, 50), false) dxDrawImage(417, 257, 202, 160, ":GUI/images/examples/G-18.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(333, 194, 358, 53, tocolor(21, 133, 6, 111), false) dxDrawRectangle(359, 468, 310, 80, tocolor(21, 133, 6, 111), false) dxDrawText("R$15.000", 346, 417, 681, 463, tocolor(255, 255, 255, 255), 2.00, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("Glock-18", 338, 203, 681, 237, tocolor(255, 255, 255, 255), 2.00, "pricedown", "center", "center", false, false, false, false, false) dxDrawText("comprar", 372, 481, 659, 538, tocolor(255, 255, 255, 255), 2.00, "pricedown", "center", "center", false, false, false, false, false) end function abrir (_,state) if painel == false then showCursor(true) addEventHandler("onClientRender", root, Pdx) painel = true else showCursor(false) removeEventHandler("onClientRender", root, Pdx) painel = false end end addEvent("painelglock", true) addEventHandler("painelglock", root , abrir) function togglePanel() if getElementData(localPlayer,nomeDaACL_Comandante) then if not isEventHandlerAdded("onClientRender",root,onClientRender) then guiGridListClear(playerList) for id, player in ipairs(getElementsByType("player")) do guiGridListSetItemText(playerList, guiGridListAddRow(playerList), 1, getPlayerName(player):gsub('#%x%x%x%x%x%x', ''), false, false) end guiSetVisible(playerList,true) guiSetVisible(edit,true) aVisible = true rVisible = true addEventHandler("onClientRender",root,onClientRender) showCursor(true) else guiSetVisible(playerList,false) guiSetVisible(edit,false) removeEventHandler("onClientRender",root,onClientRender) showCursor(false) end end end function isCursorOnElement(x,y,w,h) local mx,my = getCursorPosition () local fullx,fully = guiGetScreenSize() cursorx,cursory = mx*fullx,my*fully if cursorx > x and cursorx < x + w and cursory > y and cursory < y + h then return true else return false end end function arma (_,state) if painel == true then if state == "down" then if isCursorOnElement(372, 481, 659, 538) then triggerServerEvent ("glock", localPlayer) end end end end addEventHandler ("onClientClick", root, arma) preciso só da introdução do comando o resto deixa cmg (faz tempo que não mexo com isso, ja esqueci de muitas coisas) quero por o painel de comprar a glock no marker indicado....
  22. Falae rapaziada blz? então mano eu estou com um probleminha em um marker, tem o marker1 e o marker2 nas linhas, o marker2 que estou tendo um pouco de problema queria deixar pra qualquer um que pegasse o veiculo no marker1 pudesse excluir até pq somente quem pega o veiculo no marker1 que pode excluir queria deixar pra todos se alguem puder ajudar tmj! local marker1 = createMarker ( 2185.5439453125,-1811.8256835938,13.546875 -1, "cylinder", 1.2, 0 , 255, 0, 155 ) local marker2 = createMarker ( 2157.5869140625,-1808.6865234375,13.387050628662 -1, "cylinder", 3, 255 , 0, 0, 155) veh = {} function vehicle ( marker, md ) if md then if marker == marker1 then if not isPedInVehicle ( source ) then if isElement ( veh[source] ) then destroyElement(veh[source]) end local x,y,z = getElementPosition(source) veh[source] = createVehicle ( 490, 2185.0043945313,-1805.0360107422,13.370622634888, -0, 0, 5.1420917510986 ) warpPedIntoVehicle ( source, veh[source] ) end elseif marker == marker2 then if veh[source] and isElement ( veh[source] ) then destroyElement(veh[source]) end end end end addEventHandler ( "onPlayerMarkerHit", getRootElement ( ), vehicle )
×
×
  • Create New...