Jump to content

Search the Community

Showing results for tags 'blips'.

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

  1. Ola, tou criando uma resource de entregador de jornal, vi muitas na internet mais quero criar minha propria resource, criei um marker onde que se eu digitar dentro dele /jornaleiro automaticamente cria um blip no mapa junto com um marcador até ai tudo certo, neste proximo marcador é um marcador local criado pelo proprio player, quando eu entro nele coloquei a funcao de aparecer algo no chat e esta tudo certo e adicionei tambem uma funcao que quando o player sai do marcador apareça uma msg dizendo que ele ignorou a vaga, e aparece normal mais a unica coisa que nao esta dando certo é o marcador se destruir sozinho... vou mostrar o codigo pra vocês... local blipJornal = nil local markerjornal = nil -- Funcao comando /jornaleiro --- function _AgenciaJornaleiro (source) -- if isElementWithinMarker (source, MarkerRecepcaoPref ) then -- executa a acao caso estiver dentro do marcador outputChatBox ("#000000=====================================================",source,255,255,255,true) outputChatBox ("#000000[#FF1493 NPC #000000] : #FF4500 Agendamos sua vaga, vá até a agencia marcada no mapa!",source,255,255,255,true) outputChatBox ("#000000=====================================================",source,255,255,255,true) blipJornal = createBlip(1220, -1814, 16.50, 41, 3, 0, 0, 255, 255, 0, 1000, source, true) markerjornal = createMarker ( 1220, -1814, 15.50 , "cylinder", 1.5, 0, 255, 0, 255, source, true) -- Coordenada x, x, x, "Tipo de marcador", tamanho do marcador, Cor RGB 0, 0, 0, 0, Variavel global; -- end end addCommandHandler ( "jornaleiro", _AgenciaJornaleiro ) --Comando definido para a funcao atual -------------------------------- --- FuncaO ACEITAR VAGA (SIM OU NAO) CASO SAIR DO MARCADOR"markerjornal" Desiste da vaga -- function aceitarJornal (source) if isElement (source, markerjornal) then outputChatBox ("#000000=====================================================",source,255,255,255,true) outputChatBox ("#FF4500 Deseja aceitar a vaga de jornaleiro ? /sim ou /nao",source,255,255,255,true) outputChatBox ("#000000=====================================================",source,255,255,255,true) end end addEventHandler("onMarkerHit",root, aceitarJornal) function SairDoMarcadoJornaleiro( leaveElement, markerjornal ) if getElementType( leaveElement ) == "player" then outputChatBox ("#FF4500 Você desistiu da vaga... volte em breve",getRootElement(),255,255,255,true) destroyElement(markerjornal) end end addEventHandler( "onMarkerLeave", root, SairDoMarcadoJornaleiro ) OBS: eu comentei a parte -- if isElementWithinMarker (source, MarkerRecepcaoPref ) then pra mim nao ir ficando indo direto na agencia de empregos ksksksks e a maioria do codigo esta com comentarios pq tem um outro amigo que ta fazendo um Menu que mais tarde ele vai implementar nesse scripts e estou fazendo assim pra ele nao se perder...
  2. مساعدة بسيطة علي كود اريد ان تظهر العلامات في الخريطة تدريجيا وليس جميعها في وقت واحد وعندما المس اي ماركر يقوم بحذف الماركر والعلامة ونقلنلي لماركر والعلامة التي تليها حتي انتهي من جميع الماركرات التي بالجدول اتمني منكم مساعدتي رجائا انا في مرحة التعلم رجائا اي تعديل يرجا ان تعدلة علي الكود الاساسي GUIEditor = { button = {}, window = {}, memo = {} } local targetMar = { {1345.76172, 343.09811, 19}, {205.60931, -174.15186, 1}, {2264.45654, 63.23068, 25}, {696.72180, -442.32590, 15}, {-85.84571, -1189.86865, 0.5} } local mar = {} local bli = {} function newTar() --setElementModel(localPlayer,22) setElementData(localPlayer,"pizzaDone",0) for i,v in pairs ( targetMar ) do mar[i] = createMarker(v[1],v[2],v[3],"cylinder",2,255,255,0) bli[i] = createBlip(v[1],v[2],v[3],0) setElementData(mar[i],"pizzaMar",true) end addEventHandler("onClientMarkerHit",root,onTarHit) outputChatBox("Go to the signs on the map to deliver the smuggled goods when you finish 5 counting areas and get the required amount",255,0,0) end function finishJob() removeEventHandler("onClientMarkerHit",finMar,finishJob) destroyElement(finMar) destroyElement(blipfin) outputChatBox("Good Job ! Here's your money !",255,255,0) triggerServerEvent("onDone",resourceRoot) newTar() end function onTarHit() if getElementData(localPlayer,"pizzaOccupent") == true and getElementData(source,"pizzaMar") == true then local piz = getElementData(localPlayer,"pizzaDone") if not piz then piz = 0 end destroyElement(source) setElementData(localPlayer,"pizzaDone",piz+1) piz = piz+1 outputChatBox(piz.."/5 completed !",0,255,0) if piz == 5 then removeEventHandler("onClientMarkerHit",root,onTarHit) for _,v in pairs ( bli ) do destroyElement(v) end outputChatBox("Come back now to receive your money",255,255,0) finMar = createMarker(-52.76169, -225.02179, 5.42969, "cylinder", 2, 255, 255, 0) blipfin = createBlip(-52.76169, -225.02179, 5.42969, 0) addEventHandler("onClientMarkerHit",finMar,finishJob) end end end function onClick() if source == GUIEditor.button[1] then --setElementModel(localPlayer,22) for i,v in pairs ( targetMar ) do mar[i] = createMarker(v[1],v[2],v[3],"cylinder",2,255,255,0) bli[i] = createBlip(v[1],v[2],v[3],0) setElementData(mar[i],"pizzaMar",true) end addEventHandler("onClientMarkerHit",root,onTarHit) setElementData(localPlayer,"pizzaOccupent",true) outputChatBox("Go to the signs on the map to deliver the smuggled goods when you finish 5 counting areas and get the required amount",255,0,0) removeEventHandler("onClientGUIClick",root,onClick) destroyElement(GUIEditor.window[1]) showCursor(false) elseif source == GUIEditor.button[2] then for _,v in pairs ( mar ) do destroyElement(v) end for _,v in pairs ( bli ) do destroyElement(v) end setElementData(localPlayer,"pizzaDone",0) --setElementModel(localPlayer,0) setElementData(localPlayer,"pizzaOccupent",false) outputChatBox("Good Baay!",0,255,0) removeEventHandler("onClientGUIClick",root,onClick) destroyElement(GUIEditor.window[1]) showCursor(false) end end addEvent("onPizzaHit",true) addEventHandler("onPizzaHit",root, function () GUIEditor.window[1] = guiCreateWindow(0.28, 0.30, 0.42, 0.40, "- Pizza Man -", true) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.memo[1] = guiCreateMemo(0.09, 0.17, 0.48, 0.69, "\nIn this job you must successfully deliver smuggled weapons. Connect all weapons and promise to get your money back.", true, GUIEditor.window[1]) GUIEditor.button[1] = guiCreateButton(0.63, 0.24, 0.32, 0.20, "Accept Job", true, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(0.63, 0.54, 0.32, 0.20, "Decline / Remove From Job", true, GUIEditor.window[1]) showCursor(true) addEventHandler("onClientGUIClick",root,onClick) end )
  3. Buenas, tengo un problema que me está volviendo loco: Hace días subí un script mío a un servidor, se trata de conducir una furgoneta con un blip pegado al mismo. Todo funcionaba correctamente hasta que ayer en una modificación tuve que reiniciar el script dentro del mismo servidor ( tenemos un editor de código), y al reiniciarlo, el blip se crea junto con el camión pero el BLIP no se pega al vehículo, el attach no funciona. Hay otro script mío parecido también subido y ese si trabaja bien, sólo tengo ese problema con este, y no entiendo nada porque sólo cambie unas coordenadas, sólo eso. Intenté probar el código antes de los cambios y se bugea igual, cosa que no debería pasar. Será alguno choque entre otros scripts? Plot twist al probarlo en mi servidor local si trabaja correctamente, y en el servidor sucede algo raro: Algunos jugadores dicen que vieron el blip moverse con el vehículo, otros dijeron verlo estático en el punto de origen. ¿A qué se debe eso?
  4. Buenas, tengo un problema que me está volviendo loco: Hace días subí un script mío a un servidor, se trata de conducir una furgoneta con un blip pegado al mismo. Todo funcionaba correctamente hasta que ayer en una modificación tuve que reiniciar el script dentro del mismo servidor ( tenemos un editor de código), y al reiniciarlo, el blip se crea junto con el camión pero el BLIP no se pega al vehículo, el attach no funciona. Hay otro script mío parecido también subido y ese si trabaja bien, sólo tengo ese problema con este, y no entiendo nada porque sólo cambie unas coordenadas, sólo eso. Intenté probar el código antes de los cambios y se bugea igual, cosa que no debería pasar. Será alguno choque entre otros scripts? Plot twist al probarlo en mi servidor local si trabaja correctamente
  5. Hola eh estado buscando de como crear un clip para una misión pero no eh encontrado nada nose si podrían ayudarme. Lo que quiero es que el blip se señale en el mapa pero quiero que según vaya trascurriendo desaparezca y aparezca el nuevo blip con el nuevo objetivo pero en la wiki no hay nada relacionado con lo que busco.
  6. I have a problem, I tried to make a local blip for each player, that is, if you are a business owner on the server (in my case), then only you have a note of where your business is. Errors in the console are not any no, it's completely clean. ----------------------------------------------------- this is server.lua function dbCreateBusinessesCallback(queryHandle) local sql = dbPoll(queryHandle, 0) if sql and #sql > 0 then for index, sqlRow in ipairs(sql) do local pos = split(sqlRow["bPos"], ",") local bMarker = createMarker(pos[1], pos[2], pos[3], "corona", 1.5, settings["business.markerColor"][1], settings["business.markerColor"][2], settings["business.markerColor"][3], settings["business.markerColor"][4]) setElementInterior(bMarker, pos[4]) setElementDimension(bMarker, pos[5]) local timer = setTimer(businessPayout, sqlRow["bPayoutCurTime"] , 1, bMarker) setElementData(bMarker, "bData", {sqlRow["bID"], sqlRow["bName"], sqlRow["bOwner"], sqlRow["bCost"], sqlRow["bPayout"], sqlRow["bPayoutTime"], sqlRow["bPayoutOTime"], sqlRow["bPayoutUnit"], sqlRow["bBank"], timer}) local bData = getElementData(bMarker, "bData") local id, name, owner, cost, payout, payoutTime, payoutOTime, payoutUnit, bank, timer = unpack(bData) if settings["business.blip"] ~= false then if sqlRow["bOwner"] == "For Sale" then addEventHandler( 'onPlayerLogin', root, function(getPlayerAccount) setElementData( source, 'account', getAccountName(getPlayerAccount(player))); triggerClientEvent(source,"createBizBlips", source) end); end end addEventHandler("onMarkerHit", bMarker, onBusinessMarkerHit) addEventHandler("onMarkerLeave", bMarker, onBusinessMarkerLeave) local timer = setTimer(businessPayout, sqlRow["bPayoutCurTime"] , 1, bMarker) setElementData(bMarker, "bData", {sqlRow["bID"], sqlRow["bName"], sqlRow["bOwner"], sqlRow["bCost"], sqlRow["bPayout"], sqlRow["bPayoutTime"], sqlRow["bPayoutOTime"], sqlRow["bPayoutUnit"], sqlRow["bBank"], timer}) end end end ---------------------------------------------------- this is client.lua ---------------this is bind bindKey( 'i', 'both', function( key, keyState ) if keyState == 'down' then for k, v in ipairs ( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'bOwner' ) and getElementData( v, 'bOwner' )[7] then if getElementData( v, 'bOwner' )[7] ~= '' then else createBlipAttachedTo( v, 52 ); end; end; end; else for k, v in ipairs( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'bOwner' ) then for k, elem in ipairs( getAttachedElements( v ) ) do if getElementType( elem ) == 'bBlip' then destroyElement( elem ); end; end; end; end; createBlips() end; end ); ------------------------ And this is the second part function getPlayerByAccountName( name ) for i, v in ipairs( getElementsByType( 'player' ) ) do if getElementData( v, 'account' ) == name then return v; end; end; return false; end; function creatbBlips() local account = getAccount(owner) for k, v in ipairs ( getElementsByType( 'marker', getResourceRootElement() ) ) do if getElementData( v, 'bOwner' ) and getElementData( v, 'bOwner' )[7] then if getElementData( v, 'bOwner' )[7] == getElementData( localPlayer, account) then createBlipAttachedTo( v, 52 ); end; end; end; end addEvent("createBizBlips",true) addEventHandler("createBizBlips",root,createBlips) createBlips() help me pleas :3 so, then I'm a terrible perplexity
  7. Hello friends, how can I make all members of my group have the same blip? That when a user enters my gang a blip is added to recognize them
×
×
  • Create New...