Search the Community

Showing results for tags 'marker'.



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 38 results

  1. 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.
  2. 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.
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. 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.... =(
  10. 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)
  11. 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....
  12. 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 )
  13. local screenW,screenH = guiGetScreenSize() local resW, resH = 1365,767 local x, y = (screenW/resW), (screenH/resH) painel = false function convertTime(ms) local min = math.floor ( ms/60000 ) local sec = math.floor( (ms/1000)%60 ) return min, sec end function dx () dxDrawRectangle((screenW - 323) / 2, (screenH - 465) / 2, 323, 465, tocolor(0, 0, 0, 185), false) dxDrawText("Ak 47", 657, 302, 710, 331, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawRectangle(519, 299, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawImage(471, 321, 320, 110, "Img/30.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(519, 403, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawRectangle(519, 181, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawRectangle(519, 507, 323, 3, tocolor(67, 219, 0, 255), false) dxDrawText("Deagle", 644, 406, 697, 435, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawText("Uzi", 667, 184, 720, 213, tocolor(255, 255, 255, 255), 2.00, "sans", "left", "center", false, false, false, false, false) dxDrawImage(513, 221, 240, 110, "Img/28.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawImage(509, 425, 256, 128, "Img/24.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) dxDrawText("Trafico De Armas", 548, 151, 824, 181, tocolor(255, 255, 255, 255), 2.00, "default-bold", "center", "center", false, false, false, false, false) dxDrawText("Fechar", 650, 564, 86, 31, tocolor(255, 255, 255, 255), 1.50, "default-bold", "left", "top", false, false, false, false, false) end function painel_tempo () local timer = interpolateBetween(120000, 0, 0, 0, 0, 0, (getTickCount()-tick)/60000, "Linear") local minutes, seconds = convertTime(timer) dxDrawRectangle(17, 251, 116, 44, tocolor(0, 0, 0, 211), false) dxDrawRectangle(17, 242, 115, 19, tocolor(255, 255, 255, 255), false) dxDrawText("Tempo", 21, 245, 123, 261, tocolor(0, 0, 0, 254), 1.50, "default-bold", "center", "center", false, false, false, false, false) dxDrawText(""..minutes..":"..seconds, 33, 266, 122, 290, tocolor(255, 255, 255, 255), 2.00, "default", "center", "top", false, false, false, false, false) end function abrirpainel () if painel == false then addEventHandler ("onClientRender", root, dx) tick = getTickCount() showCursor (true) painel = true end end addEvent ("open", true) addEventHandler ("open", root, abrirpainel) function fecharpainel (_,state) if painel == true then if state == "down" then if isCursorOnElement (640, 564, 86, 31) then removeEventHandler ("onClientRender", root, dx) showCursor (false) painel = false end end end end addEventHandler ("onClientClick", root, fecharpainel) function click (_,state) if painel == true then if state == "down" then if isCursorOnElement(471, 321, 320, 110) then triggerServerEvent("anim4", localPlayer) addEventHandler ("onClientRender", root, painel_tempo) removeEventHandler ("onClientRender", root, dx) setTimer(function() removeEventHandler("onClientRender", root, painel_tempo) showCursor (false) painel = false end, 120000, 1) elseif isCursorOnElement(513, 221, 240, 110) then triggerServerEvent("animuzi", localPlayer) addEventHandler ("onClientRender", root, painel_tempo) removeEventHandler ("onClientRender", root, dx) setTimer(function() removeEventHandler("onClientRender", root, painel_tempo) showCursor (false) painel = false end, 120000, 1) elseif isCursorOnElement(509, 425, 256, 128) then triggerServerEvent("animdesert", localPlayer) addEventHandler ("onClientRender", root, painel_tempo) removeEventHandler ("onClientRender", root, dx) setTimer(function() removeEventHandler("onClientRender", root, painel_tempo) showCursor (false) painel = false end, 120000, 1) end end end end addEventHandler("onClientClick", root, click) 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
  14. Hello, I need a marker timer script which starts a timer on screen for that player who hit marker X and stopped when that player hit marker Y. And when that player hits marker X again without hitting marker Y, it restarts/reset timer again. Help me pls.
  15. Trafico = createMarker(2349.53174, -651.42633, 128.19687 -1, "cylinder", 1.1, 0, 255, 0, 55) Blip_Emprego = createBlipAttachedTo( Trafico, 6 ) function OpenPainelMed(source) if isElementWithinMarker(source, Trafico) then
  16. Olá estou tentando fazer para quando o jogador encostar do marker vai desabilita todos os acesso para ele não conseguir se movimenta ai tudo bem, so que depois de colocou um setTimer para que pode voltar os controle do jogador mas está dando esse erro http://prntscr.com/lx94uf e não tenho a menor ideia de como arruma-lo server-side function Start_Bus(marker, md) if isPedInVehicle( source ) then if md then if marker == Rota1_Vermelha then setElementVisibleTo( Rota1_Vermelha, source, false ) setElementVisibleTo( Rota1_Blip, source, false ) setElementVisibleTo( Rota2_Vermelha, source, true ) setElementVisibleTo( Rota2_Blip, source, true ) toggleAllControls ( source, false ) setControlState ( source, "handbrake", true ) setTimer(function() toggleAllControls ( source, true ) setControlState ( source, "handbrake", false ) end, 5000, 1) end end end end addEventHandler("onPlayerMarkerHit", root, Start_Bus)
  17. local Minicio4 = createMarker (1038.02332, -1337.93970, 13.72656 -1, "cylinder", 1, 16 ,102 ,231, 100) Quando coloco -1 após as coordenadas, junto com o marker de tamanho 1 após o "cylinder" o script nao funciona!!! Todos os markers de trab do meu servidor são do tamanho "1" queria deixar esse tmb oque é glr ? Obs: eu sublinei e grifei o -1 e o tamanho do marker q é "1" após o "cylinder" para facilitar
  18. Здравствуйте, дорогое комьюнити! Столкнулся с проблемой в функции nachalo. Должно быть так, чтобы маркер появлялся в 3 интерьере и в 14343 измерении. Но почему-то не работает. Скину вам полностью скрипт, проблема в функции nachalo. Помогите пожалуйста! marker = createMarker( -1285, -135, 15, "cylinder", 1.5, 255, 255, 0, 170) function MarkerHit( hitElement, matchingDimension ) if ( getElementDimension ( hitElement ) == 0 ) then -- if the player is in dimension 0 setElementDimension ( hitElement, 1 ) -- set his dimension to 1 local elementType = getElementType( hitElement ) -- get the hit element's type setElementInterior ( hitElement, 3, 390, 174, 1009 ) end end addEventHandler( "onMarkerHit", marker, MarkerHit ) -- attach onMarkerHit event to MarkerHit function marker1 = createMarker( 364, 174, 1009, "cylinder", 1.5, 255, 255, 0, 170) function nachalo ( hitElement, matchingDimension ) setElementInterior( marker1, 3 ) setElementDimension( marker1, 1 ) local elementType = getElementType( hitElement ) setElementModel ( hitElement, 1 ) end addEventHandler( "onMarkerHit", marker1, MarkerHit ) -- attach onMarkerHit event to MarkerHit function жду ответов!)
  19. Qual seria a forma correta de fazer contador do marker contar por player dentro. Ex: a cada player que entra dentro de certo marker começa a contar 1 segundo a mais.
  20. Gente Gostaria de saber como adiciono priv acl por marker Ex: O player entra no marker mais não conseguir abrir o painel que está no marker
  21. Hey Guys, For the last couple of hours I have been trying to get OnMarkerHit to trigger, I watched multiple youtube videos and tried using the search function here but none of them helped. The script is a server sided script, This is the code I am using: marker = createMarker(1514.5, -1678.2, 13, 'cylinder', 1.0, 19, 132, 38, 150) function markerHit(hitElement) setElementPosition(hitElement,0, 0, 0) outputChatBox("Hitting marker") end addEventHandler("onMarkerHit", marker , markerHit) But nothing happens, and I just don't know why. The object hitting the marker is a player. Hope someone can help me out. Greetings. misterk99
  22. I created "RepairMarkers" and when player hits any of them, their car's health must to increase. But I don't know, how to check every marker here: if isElementWithinMarker( getLocalPlayer(), RepairMarker[1] ) then Instead of "RepairMarker[1]" I want to check every marker Source: function CreateMarkers( thePlayer, seat ) if thePlayer == getLocalPlayer() and seat == 0 then BaysideRM = createMarker( -2259.027, 2386.142, 3.897, "cylinder", 3, 233, 96, 21, 100 ) Area69SkyRM = createMarker( 307.876, 2051.747, 16.587, "cylinder", 5, 233, 96, 21, 100 ) RepairMarker = { BaysideRM, Area69SkyRM } end end function RepairVehicle( hitPlayer, matchingDimension ) if hitPlayer == getLocalPlayer() and matchingDimension == true then local theVehicle = getPedOccupiedVehicle( getLocalPlayer() ) local VehicleHealth = getElementHealth( theVehicle ) local RepairHealth = math.floor( VehicleHealth ) function Repair() if isElementWithinMarker( getLocalPlayer(), RepairMarker[1] ) then if RepairHealth < 1000 then RepairHealth = RepairHealth + 1 setElementHealth( theVehicle, RepairHealth ) else fixVehicle( theVehicle ) playSFX( "script", 11, 1, false ) end else killTimer( RepairTimer ) end end if VehicleHealth < 1000 then RepairTimer = setTimer( Repair, 100, 1001 - math.floor( VehicleHealth ) ) end end end function DestroyMarkers( thePlayer, seat ) if thePlayer == getLocalPlayer() and seat == 0 then for i, v in ipairs( RepairMarker ) do destroyElement( RepairMarker[i] ) end end end addEventHandler( "onClientMarkerHit", getRootElement(), RepairVehicle ) addEventHandler( "onClientVehicleEnter", getRootElement(), CreateMarkers ) addEventHandler( "onClientVehicleExit", getRootElement(), DestroyMarkers )
  23. This is the code: When i type twice " /asd " the marker position does not change.. How to fix this?
  24. Tudo bem com vocês? Bem vou direto ao assunto gostaria de sabe como faço para adiciona o Player do tal TIME q criei. Exemplo quando eu aperta do button vai adicionar ele do Time lenhador ai quando ele desloga vai tira ele do Time. Bom obrigado a quem me ajuda function Lenhador () LenhadorTeam = createTeam ( "Lenhador", 0, 255, 0 ) end addEventHandler("onResourceStart", resourceRoot, Lenhador)