Jump to content

FunZY

Members
  • Posts

    14
  • Joined

  • Last visited

Details

  • Location
    brasil

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

FunZY's Achievements

Square

Square (6/54)

0

Reputation

  1. Não entendi direito o script pode explicar melhor oq cada coisa faz? Se possivel pairs
  2. Como posso fazer para esses markers spawnarem em todos os jogadores do servidor? Alguém pode me dar uma luz? setTimer (function() x, y, z = getElementPosition (source) frente = createMarker (x+1.2,y,z,"cylinder",1,255,255,255,255) tras = createMarker (x-1.2,y,z,"cylinder",1,255,255,255,255) direita = createMarker (x,y+1.2,z,"cylinder",1,255,255,255,255) esquerda = createMarker (x,y-1.2,z,"cylinder",1,255,255,255,255) if getElementData (source,"jogo") == "sim" then addEventHandler ("onMarkerHit",frente,matar) addEventHandler ("onMarkerHit",tras,matar) addEventHandler ("onMarkerHit",direita,matar) addEventHandler ("onMarkerHit",esquerda,matar) end end ,5000,5)
  3. Nem tinha passado pela minha cabeça usar o setTimer, Obrigado ^^
  4. precisava que uma função se repetisse varias vezes parando só depois de um certo tempo, 10 minutos para ser exato. Mas não tenho ideia se existe algo assim
  5. Estou em aprendizagem em lua, e estou com uma dificuldade em usar o math random, Minha ideia era de que o sistema escolhesse alguma alternativa e apresentasse no chat, de acordo com essa alternativa o player ganharia uma recompensa. pesquisei em diversos forums mas não encontrei oque precisava . Alguem pode me ajudar?
  6. Queria fazer uns 20 markers para que quando passasse em cima de qualquer um recebesse uma mensagem pronta porém a maneira que conheço seria criando varios markers um a um com nomes diferentes e criando varias functions de texto markeraposta = createMarker (2113.42383, 1907.63623, 10.82031,"cylinder",1,255,255,255,255) function msgmrk (source) if isElementWithinMarker(source, markeraposta) then dxMsg(source, "Mentalize [ /usar] para usar esta máquina por 1000 reais", "info") end end addEventHandler("onMarkerHit",root, msgmrk) no caso do meu conhecimento eu faria esse mesmo script 20 vezes, e queria saber se tem alguma maneira de criar vários markers com apenas um nome
  7. Obrigado a todos foi de grandessíssima ajuda!
  8. Resolvido apenas me desatentei e fiz uma configuração errada no Serverconfig
  9. Obrigado deu tudo certo. Como você disse setar vida a cada 100ms é algo mal otimizado, teria alguma maneira de deixar o ped invencivel sem ser dessa forma? pois também uso isso para peds
  10. Primeiramente boa tarde bom dia e boa noite. Estou com um problema que não consigo deixar o objeto inquebrável. No caso seria um caixa eletronico mas qualquer um com um veiculo pode destrui-lo, queria alguma dica de vcs de como eu posso resolver isso, segue o codigo do atm com o esquema de deixa-lo inquebrável que tentei fazer local atm3 = createObject(2942,1005.77368, -930.0, 42.02812) setElementRotation(atm3, 0, 0, 10) -------- ROTAÇÃO DO OBJETO setTimer(setElementHealth, 100, 0, atm3, 100) --VIDA INFINITA
  11. Por exemplo: o dashboard ou a Logo do servidor no canto da tela Quando eu redimenciono a logo ou altero alguma variavel no dashboard elas simplesmente não se aplicam no servidor. Sou novo na area da programação, suspeito que tenha algo haver delas serem client-side mas não sei oque. Alguem pode me dar uma luz?
  12. ------------------------------------------------ ------ Trabalho entregador ------ ------ By:Pedro R. ------ ------------------------------------------------ ----------------Variaveis Editavel--------- local valor_do_pagamento = 2500 local valordopagamentochat = 2500 --------------------marker principal------ local mrk = createMarker (2101.152, -1359.516, 23.000, "cylinder", 2, 34, 158, 165, 254) local blipmrk = createBlip(2101.152, -1359.516, 23.000, 42) -------------Marker das entrega----------------- local mrkc1 = createMarker (2230.379, -1395.32, 23.000, "cylinder", 3, 255, 0, 0, 255) local blipc1 = createBlip(2230.379, -1395.32, 24, 0) local mrkc2 = createMarker (2196.394, -1280.56, 23.800, "cylinder", 3, 255, 0, 0, 255) local blipc2 = createBlip(2196.394, -1280.56, 23.800, 0) local mrkc3 = createMarker (1909.78, -1602.051, 12.400, "cylinder", 3, 255, 0, 0, 255) local blipc3 = createBlip(1909.78, -1602.051, 12.400, 0) local mrkc4 = createMarker (1321.16, -1634.648, 12.700, "cylinder", 3, 255, 0, 0, 255) local blipc4 = createBlip(1321.16, -1634.648, 12.700, 0) local mrkc5 = createMarker (2012.88, -1126.502, 24.163, "cylinder", 3, 255, 0, 0, 255) local blipc5 = createBlip(2012.88, -1126.502, 24.163, 0) ---------Marker do Pagamento------ local blipr = createBlip(2095.229, -1367.882, 23.984, 0) local mrkr = createMarker (2095.229, -1367.882, 23.000, "cylinder", 3, 255, 0, 0, 255) -----------------Config visibilidade--------- setElementVisibleTo(mrkc1, root, false) setElementVisibleTo(mrk, root, true) setElementVisibleTo(blipc1, root, false) setElementVisibleTo(mrkc2, root, false) setElementVisibleTo(blipc2, root, false) setElementVisibleTo(mrkc3, root, false) setElementVisibleTo(blipc3, root, false) setElementVisibleTo(mrkc4, root, false) setElementVisibleTo(blipc4, root, false) setElementVisibleTo(mrkc5, root, false) setElementVisibleTo(blipc5, root, false) setElementVisibleTo(mrkr, root, false) setElementVisibleTo(blipr, root, false) -------------Codigos-------- veh = {} function msg ( thePlayer ) outputChatBox("#ff0000Digite /trab Para trabalhar como cobrador!", thePlayer, 255,255,255, true) end addEventHandler("onMarkerHit", mrk, msg) function commandMarker(Jogador) --- comando que deve copiar pra ter mais latinha no mapa if isElementWithinMarker(Jogador, mrk) then setElementData(Jogador, "trab", true) outputChatBox ( " ", thePlayer, 255, 255, 255, true ) outputChatBox ( " ", thePlayer, 255, 255, 255, true ) outputChatBox ( "Agora Você Trabalha De Entregador de remédios. Vá até a casa dos clientes e entregue os remedios (siga a marcação do mapa!)", thePlayer, 255, 255, 255, true ) outputChatBox ( " Em seguida volte para receber seu pagamento! ", thePlayer, 255, 255, 255, true ) outputChatBox ( " ", thePlayer, 255, 255, 255, true ) outputChatBox ( " ", thePlayer, 255, 255, 255, true ) setElementData(Jogador, "trab", true) veh[Jogador] = createVehicle ( 581, 2087.891, -1335.484, 23.9 + 2 ) warpPedIntoVehicle(Jogador, veh[Jogador]) setElementVisibleTo(mrkc1, Jogador, true) setElementVisibleTo(blipc1, Jogador, true) setElementVisibleTo(mrk, Jogador, false) setElementVisibleTo(blipmrk, Jogador, false) end end addCommandHandler("trab", commandMarker) function cobranca1 (Jogador) if veh[Jogador] and isElement(veh[Jogador]) then setTimer ( function() outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [1/5]", thePlayer, 255, 255, 255, true ) outputChatBox ( " #ff0000Siga Para o Proximo Cliente ", thePlayer, 255, 255, 255, true ) setElementVisibleTo(mrkc1, Jogador, false) setElementVisibleTo(blipc1, Jogador, false) destroyElement(mrkc1) setElementVisibleTo(blipc2, Jogador, true) setElementVisibleTo(mrkc2, Jogador, true) end, 4000, 1 ) outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true ) end end addEventHandler ("onMarkerHit", mrkc1, cobranca1, delayedChat) function cobranca2 (Jogador) if veh[Jogador] and isElement(veh[Jogador]) then setTimer ( function() outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [2/5]", thePlayer, 255, 255, 255, true ) outputChatBox ( " #ff0000Siga Para o Proximo Cliente ", thePlayer, 255, 255, 255, true ) setElementVisibleTo(mrkc2, Jogador, false) setElementVisibleTo(blipc2, Jogador, false) destroyElement(mrkc2) setElementVisibleTo(blipc3, Jogador, true) setElementVisibleTo(mrkc3, Jogador, true) end, 4000, 1 ) outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true ) end end addEventHandler ("onMarkerHit", mrkc2, cobranca2) function cobranca3 (Jogador) if veh[Jogador] and isElement(veh[Jogador]) then setTimer ( function() outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [3/5]", thePlayer, 255, 255, 255, true ) outputChatBox ( " #ff0000Siga Para o Proximo Cliente ", thePlayer, 255, 255, 255, true ) setElementVisibleTo(mrkc3, Jogador, false) setElementVisibleTo(blipc3, Jogador, false) destroyElement(mrkc3) setElementVisibleTo(blipc4, Jogador, true) setElementVisibleTo(mrkc4, Jogador, true) end, 4000, 1 ) outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true ) end end addEventHandler ("onMarkerHit", mrkc3, cobranca3) function cobranca4 (Jogador) if veh[Jogador] and isElement(veh[Jogador]) then setTimer ( function() outputChatBox ( "#0000FFVocê Entregou Uma encomenda! [4/5]", thePlayer, 255, 255, 255, true ) outputChatBox ( " #ff0000Siga Para o Proximo Cliente ", thePlayer, 255, 255, 255, true ) setElementVisibleTo(mrkc4, Jogador, false) setElementVisibleTo(blipc4, Jogador, false) destroyElement(mrkc4) setElementVisibleTo(blipc5, Jogador, true) setElementVisibleTo(mrkc5, Jogador, true) end, 4000, 1 ) outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true ) end end addEventHandler ("onMarkerHit", mrkc4, cobranca4) function cobranca5 (Jogador) if veh[Jogador] and isElement(veh[Jogador]) then setTimer ( function() outputChatBox ( "#0000FFVocê Entregou a ultima encomenda! [5/5]", thePlayer, 255, 255, 255, true ) outputChatBox ( " #ff0000Volte para loja para receber seu pagamento! ", thePlayer, 255, 255, 255, true ) setElementVisibleTo(mrkc5, Jogador, false) setElementVisibleTo(blipc5, Jogador, false) destroyElement(mrkc5) setElementVisibleTo(blipr, Jogador, true) setElementVisibleTo(mrkr, Jogador, true) end, 4000, 1 ) outputChatBox ( "#FFFFFFAguarde enquanto você entrega os #FF0000Remédios..", thePlayer, 255, 255, 255, true ) end end addEventHandler ("onMarkerHit", mrkc5, cobranca5) ------------------ PAGAMENTOS!!------------------------ function pagamento (Jogador) if(isElement(Jogador)) and (getElementType(Jogador) == "player") then if getElementData(Jogador, "trab") then if veh[Jogador] and isElement(veh[Jogador]) then destroyElement (veh[Jogador]) outputChatBox ( " #ff0000Parabéns, Você acaba de receber seu pagamento! ["..valordopagamentochat.."$] ", thePlayer, 255, 255, 255, true ) setElementVisibleTo(mrkr, Jogador, false) setElementVisibleTo(blipr, Jogador, false) givePlayerMoney ( Jogador, valor_do_pagamento) setTimer(function() restartResource(getThisResource()) end, 100, 1) end end end end addEventHandler ("onMarkerHit", mrkr, pagamento) Fiz desta maneira mas se o player sair do 1° marker e for direto ao ultimo para receber o pagamento ele ainda pode. Teria alguma função que impediria isso?
  13. Olá queria ajuda de vocês para um desenvolvimento meu.. Comecei a pouco tempo na programação LUA e queria algumas dicas de como posso fazer para que o player passe pelos markers na ordem, impedindo ele de passar antes da hora Exemplo: O player tem que seguir um percurso até a localização final onde ele recebe o dinheiro, mas se ele ir direto para a localização final ele consegue pegar o dinheiro, e eu queria evitar isso. Alguem sabe Como? Ps: Desculpem A bagunça ^^ local mrk = createMarker(2101.152, -1359.516, 23.000, "cylinder", 2, 0, 17, 0, 254) local blipmrk = createBlip(2101.152, -1359.516, 23.000, 9) local mrkc1 = createMarker(2230.379, -1395.32, 23.000, "cylinder", 3, 255, 0, 0, 255) local blipc1 = createBlip(2230.379, -1395.32, 24, 0) local mrkc2 = createMarker(2312.938, -1347.669, 23.000, "cylinder", 3, 255, 0, 0, 255) local blipc2 = createBlip(2312.938, -1347.669, 24.023, 0) local mrkc3 = createMarker(2334.637, -1265.624, 27.000, "cylinder", 3, 255, 0, 0, 255) local blipc3 = createBlip(2334.637, -1265.624, 27.969, 0) local blipr = createBlip(2095.229, -1367.882, 23.984, 0) local mrkr = createMarker(2095.229, -1367.882, 23.000, "cylinder", 3, 255, 0, 0, 255) setElementVisibleTo(mrkc1, root, false) setElementVisibleTo(mrk, root, true) setElementVisibleTo(blipc1, root, false) setElementVisibleTo(mrkc2, root, false) setElementVisibleTo(blipc2, root, false) setElementVisibleTo(mrkc3, root, false) setElementVisibleTo(blipc3, root, false) setElementVisibleTo(mrkr, root, false) setElementVisibleTo(blipr, root, false) veh = {} function msg(thePlayer) outputChatBox("#ff0000Digite /trab Para trabalhar como cobrador!", thePlayer, 255, 255, 255, true) end addEventHandler("onMarkerHit", mrk, msg) function commandMarker(Jogador) --- comando que deve copiar pra ter mais latinha no mapa if isElementWithinMarker(Jogador, mrk) then setElementData(Jogador, "trab", true) outputChatBox(" ", thePlayer, 255, 255, 255, true) outputChatBox(" ", thePlayer, 255, 255, 255, true) outputChatBox("Agora Você Trabalha De Cobrador. Vá até a casa dos clientes e cobre-os (siga a marcação do mapa!)", thePlayer, 255, 255, 255, true) outputChatBox(" Em seguida volte para receber! ", thePlayer, 255, 255, 255, true) outputChatBox(" ", thePlayer, 255, 255, 255, true) outputChatBox(" ", thePlayer, 255, 255, 255, true) setElementData(Jogador, "trab", true) veh[Jogador] = createVehicle(481, 2087.891, -1335.484, 23.9 + 2) warpPedIntoVehicle(Jogador, veh[Jogador]) setElementVisibleTo(mrkc1, Jogador, true) setElementVisibleTo(blipc1, Jogador, true) setElementVisibleTo(mrk, Jogador, false) setElementVisibleTo(blipmrk, Jogador, false) end end addCommandHandler("trab", commandMarker) function cobranca1(Jogador) if veh[Jogador] and isElement(veh[Jogador]) then outputChatBox("#0000FFVocê cobrou o cliente e Ele Pagou! [1/3]", thePlayer, 255, 255, 255, true) outputChatBox(" #ff0000Siga Para o Proximo Cliente ", thePlayer, 255, 255, 255, true) setElementVisibleTo(mrkc1, Jogador, false) setElementVisibleTo(blipc1, Jogador, false) destroyElement(mrkc1) setElementVisibleTo(blipc2, Jogador, true) setElementVisibleTo(mrkc2, Jogador, true) end end addEventHandler("onMarkerHit", mrkc1, cobranca1, delayedChat) function cobranca2(Jogador) if veh[Jogador] and isElement(veh[Jogador]) then outputChatBox("Você cobrou o cliente e Ele Pagou! [2/3]", thePlayer, 255, 255, 255, true) outputChatBox(" #ff0000Siga Para o Proximo Cliente ", thePlayer, 255, 255, 255, true) setElementVisibleTo(mrkc2, Jogador, false) setElementVisibleTo(blipc2, Jogador, false) destroyElement(mrkc2) setElementVisibleTo(blipc3, Jogador, true) setElementVisibleTo(mrkc3, Jogador, true) end end addEventHandler("onMarkerHit", mrkc2, cobranca2) function cobranca3(Jogador) if veh[Jogador] and isElement(veh[Jogador]) then outputChatBox("Você cobrou o ultimo cliente e Ele Pagou! [3/3]", thePlayer, 255, 255, 255, true) outputChatBox("Volte para a loja para receber seu pagamento", thePlayer, 255, 255, 255, true) setElementVisibleTo(mrkc3, Jogador, false) setElementVisibleTo(blipc3, Jogador, false) setElementVisibleTo(blipr, Jogador, true) setElementVisibleTo(mrkr, Jogador, true) end end addEventHandler("onMarkerHit", mrkc3, cobranca3) function pagamento(Jogador) if (isElement(Jogador)) and (getElementType(Jogador) == "player") then if getElementData(Jogador, "trab") then if veh[Jogador] and isElement(veh[Jogador]) then destroyElement(veh[Jogador]) outputChatBox(" #ff0000Parabéns, Você acaba de receber seu pagamento! [1000$] ", thePlayer, 255, 255, 255, true) setElementVisibleTo(mrkr, Jogador, false) setElementVisibleTo(blipr, Jogador, false) givePlayerMoney(Jogador, 1000) setTimer(function() restartResource(getThisResource()) end, 100, 1 ) end end end end addEventHandler("onMarkerHit", mrkr, pagamento)
×
×
  • Create New...