Jump to content

zMpyster

Members
  • Posts

    111
  • Joined

  • Last visited

Everything posted by zMpyster

  1. Sensacional, funcionou perfeitamente, obrigado
  2. Sim, estou usando ele, só que a sujeira só aparece em vehiclegrunge256, e os carros baixados vem com outras texturas, ai n aparece Poderia dar uma base, to sem entender, não sei mexer com shaders e texturas..
  3. Olá gente, gostaria de saber se tem alguma forma de modificar a textura(cor) do veículo, eu estou com um mod que precisa de veículos com a textura vehiclegrunge256 nele, não faço nem ideia do que fazer
  4. Você recuperou o jogador de uma string e o converteu para player? Com o getPlayerFromPartialName
  5. ah, não percebi que vc queria destruir todos os objetos :/. Você não está conseguindo pois plants tem o valor de createObject, ai dps o valor que tinha da outra planta é substituido por o outro createObject, entende? tente usar dessa forma local plants = {} local plants1 = {} function iniciarFarm8 ( client, x, y, z ) animation = setPedAnimation(source, "medic", "CPR", -1, false, false, false, false) setTimer(function() if plants[client] then plants1[client] = createObject ( 862, x , y , z - 1 , 0, 0, 0 ) else plants[client] = createObject ( 862, x , y , z - 1 , 0, 0, 0 ) end end, 6500, 1) end addEvent ("iniciaJob8", true) addEventHandler ("iniciaJob8", getRootElement(), iniciarFarm8) function plantDestroy (source) destroyElement ( plants[source] ) destroyElement ( plant1[source] ) end addEvent ("onDestroyElement", true) addEventHandler ("onDestroyElement", getRootElement(), plantDestroy) Se no caso sempre que for destruir, destruir as duas, então não precisa da verificação pra ver se n é nulo
  6. Acho que algum dos outros códigos do script deve estar bugando o setElementPosition, vou colocar o teleporte em um script separado pra ver se funfa Edit: Era mesmo o script que sla pq tava bloqueando o setElementPosition e o createMarker, ai fiz umas alterações e agr ta tudo funfando
  7. plantsPoints = 0 function inicio8 ( ) local retanguloParaPlantio = createColRectangle ( 209.52605, 1906.70947, 155, 155 ) hillRadar = createRadarArea ( 209.52605, 1906.70947, 155, 155, 0, 255, 0, 175 ) addEventHandler("onClientColShapeHit", retanguloParaPlantio, function ( theElement, matchingDimension ) if ( theElement == localPlayer ) then function plant () local block, anim = getPedAnimation( localPlayer ) if ( not( block == "medic" and anim == "CPR" ) ) then local x, y, z = getElementPosition ( localPlayer ) triggerServerEvent ("iniciaJob8", localPlayer, localPlayer, x, y, z ) setTimer(function() plantsPoints = plantsPoints+1 outputChatBox( "Foi plantado "..(plantsPoints).."/2" ) if plantsPoints >= 2 then completMission() end end, 6500, 1) else outputChatBox (" voçê deve esperar 6 sec para plantar novamente " ) end end addCommandHandler ( "d", plant ) end end ) addEventHandler("onClientColShapeLeave", retanguloParaPlantio, function ( theElement, matchingDimension ) if ( theElement == localPlayer ) then outputChatBox( "nop Function." ) removeCommandHandler ( "d", plant ) end end ) end addEventHandler("onClientResourceStart", resourceRoot, inicio8) function completMission () outputChatBox ("voçê plantou todos") plantsPoints = 0 destroyElement ( hillRadar ) triggerServerEvent ( "onDestroyElement", localPlayer, localPlayer ) end local plants = {} function iniciarFarm8 ( client, x, y, z ) animation = setPedAnimation(source, "medic", "CPR", -1, false, false, false, false) setTimer(function() plants[client] = createObject ( 862, x , y , z - 1 , 0, 0, 0 ) end, 6500, 1) end addEvent ("iniciaJob8", true) addEventHandler ("iniciaJob8", getRootElement(), iniciarFarm8) function plantDestroy (source) destroyElement ( plants[source] ) end addEvent ("onDestroyElement", true) addEventHandler ("onDestroyElement", getRootElement(), plantDestroy) Tente desse jeito. Coloquei onClientResourceStart apenas para a função ser startada, pois, ela não estava sendo chamada, em nenhuma outra
  8. Não adiantou, ainda continua indo para o interior, más, a posição fica a mesma.
  9. Olá gente eu queria saber se tem algo de errado no meu código, quando o jogador tem que se teleportar para o interior e para posição, ele vai para o interior, más, não para posição colocada function TeleporteFomeSedeLS ( hitElement, matchingDimension ) if source == MarkerFomeSedeLS then if getElementType ( hitElement ) == "vehicle" then return end if isPedInVehicle ( hitElement ) then return end setTimer ( setElementInterior, 400, 1, hitElement, 9 ) setTimer ( setElementDimension, 400, 1, hitElement, 1 ) setTimer ( setElementPosition, 400, 1, hitElement, 364.93112, -9.87462, 1001.85156, true) fadeCamera ( hitElement, false, 0.1, 0, 0, 0 ) setTimer ( fadeCamera, 600, 1, hitElement , true, 0.5 ) setTimer ( setCameraTarget, 600, 1, hitElement ) setElementData (hitElement, "FomeSede>LS>Entrou", true ) setElementData (hitElement, "FomeSede>LV>Entrou", false ) setElementData (hitElement, "FomeSede>SF>Entrou", false ) end end addEventHandler ( "onMarkerHit", resourceRoot, TeleporteFomeSedeLS )
  10. function abrirPainel() guiSetVisible(janela2, not guiGetVisible(janela2)) showCursor(guiGetVisible(janela2)) end function click() if source == fecharmercado then abrirPainel() end end addEventHandler("onClientGUIClick", resourceRoot, click) local mercado = createMarker(726.701, -1276.13, 13.648 -1, "cylinder", 1.5, 255, 255, 255) local mercado2 = createBlip(726.701, -1276.13, 13.648, 61) function abrirMenu(player, dim) if player and isElement(player) and getElementType(player) == "player" and dim then abrirPainel() end end addEventHandler("onClientMarkerHit", mercado, abrirMenu) Estou tendo um problema quando o player passa na marker automaticamente abre o GUI para todos os players no server, alguém pode me ajudar??
  11. Esse Script é pra sempre que um player morrer criar umar marker e um objeto(dinheiro) e toda vez que um player passar por cima da marker (lembrando um player tem que morrer com mais de 100R$ pra isso acontecer) ele irá ganhar 20 % do que o player que morreu tinha obs: qualquer um pode ir na marker(ex: 10000 == 2000) Erro: Agr não ta funfando nada quando o player passa pela marker, quando o player morre ela é criada más fica sem função alguma (só ta assim pq eu já tentei de tudo e nada da certo) Eu tbm tenho uma dúvida, em um trabalho que eu fiz (de ônibus) eu uso o removeEventHandler para toda vez que um player passa pela marker e entrega os passageiros. Não tem como transformar esse removeEventHandler só em um determinado player. ex: um player passa pela marker 2 se tiver um player na marker1 automaticamente ele não consegue entregar os passageiros na marker 2 pq o evento foi removido. Se alguém conseguir me ajudar, ficarei grato! objeto = {} marker1 = {} money = {} moneq = {} function player_Wasted (totalAmmo, attacker, killerWeapon) morreu = source acc = getAccountPlayer(morreu) money[acc] = getPlayerMoney (morreu) local nomedaacc = getAccountName(acc1) if isElementInWater(money[acc]) then takePlayerMoney(morreu, money[acc]) outputChatBox("#B22222Você Morreu Em Um Rio/Lago E Não Poderá Pegar os 20% Dos Seus R$ ".. money[acc] .."",money[acc],0,0,0,true ) setElementVisibleTo (marker1, root, false) destroyElement(objeto) removeEventHandler ( "onMarkerHit", marker1, moneydoplayer) return end if (money[acc] == 0) then outputChatBox("#B22222Você Não Possui Dinheiro!" ,money[acc],0,0,0,true ) return end if (money[acc] <= 100) then outputChatBox("#B22222Você Tinha Apenas R$ ".. money[acc] ..", E Por Isso Não Poderá Pegar os 20%" ,money[acc],0,0,0,true ) takePlayerMoney(morreu, money[acc]) return end if (isPedDead(morreu) == 1) then return end if not (isPedDead(morreu) == 1) then setElementVisibleTo (marker1[morreu], root, false) destroyElement(objeto[morreu]) removeEventHandler ( "onMarkerHit", marker1[morreu], moneydoplayer) end local X,Y,Z = getElementPosition (morreu) objeto[morreu] = createObject (1212, X,Y,Z) marker1[morreu] = createMarker (X,Y,Z -1, "cylinder", 2, 0, 255, 0) function moneydoplayer(thePlayer, acc) if money[acc] and isElement(money[acc]) then if marker1[morreu] and isElement(marker1[morreu]) then dimdim = givePlayerMoney(thePlayer, ((money[acc])*20)/100) dimdim1 = ((money[acc])*20)/100 outputChatBox("#D2B48CVocê Pegou R$ ".. dimdim1 .." Que Equivale A 20% Do Money De Um Determinado Player",thePlayer,0,0,0,true ) if isElementWithinMarker (thePlayer, marker1[morreu]) then removeEventHandler ( "onMarkerHit", marker1[morreu], moneydoplayer) setElementVisibleTo (marker1[morreu], root, false) destroyElement(objeto[morreu]) end end end end addEventHandler ( "onMarkerHit", marker1[morreu], moneydoplayer) if not isElementInWater(morreu) then if not getPedOccupiedVehicle( morreu )then takePlayerMoney(morreu, money[acc]) outputChatBox("#B22222Você Morreu e Perdeu Seus R$ ".. money[acc] .."",morreu,0,0,0,true ) outputChatBox("#FFA500[AVISO]#B22222Se Você Morrer Em Um Veículo Você Perderá Seu Money! (Por Completo)",morreu,0,0,0,true ) end end local falecido = getPedOccupiedVehicle( money[acc] ) if falecido then removeEventHandler ( "onMarkerHit", marker1[morreu], moneydoplayer) setElementVisibleTo (marker1[morreu], root, false) destroyElement(objeto[morreu]) end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted )
  12. Olá pessoal sou novo aqui no fórum e queria saber como resolver esse erro que está dando em meu painel DX, eu vi vários videos e todos falavam que se eu quisesse que o script não bugasse em outras resoluções eu teria que quem colocar "x* e y*" de prefixo. Sou novo na linguagem lua portanto não sei muito! Espero que compreendam . dxDrawRectangle(x*499, y*196, x*1, y*0, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*443, y*186, x*463, y*392, tocolor(0, 0, 0, 129), false) dxDrawRectangle(x*471, y*213, x*0, y*4, tocolor(255, 255, 255, 255), false) dxDrawRectangle(x*447, y*186, x*0, y*0, tocolor(255, 255, 255, 255), false) dxDrawLine(x*443 - 1, y*187 - 1, x*443 - 1, y*217, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*906, y*187 - 1, x*443 - 1, y*187 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*443 - 1, y*217, x*906, y*217, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*906, y*217, x*906, y*187 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(x*443, y*187, x*463, y*30, tocolor(0, 0, 0, 129), false) dxDrawText("", x*524, y*198, x*524, y*198, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawText("AGÊNCIA DE EMPREGOS", x*608, y*196, x*749, y*212, tocolor(255, 255, 255, 255), 1.00, "default-bold", "left", "top", false, false, false, false, false) dxDrawRectangle(x*620, y*538, x*110, y*30, tocolor(0, 0, 0, 153), false) dxDrawText("Fechar", x*620, y*538, x*730, y*568, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawText("Criado por: zMpyster", x*776, y*523, x*885, y*538, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false) dxDrawLine(x*443 - 1, y*240 - 1, x*443 - 1, y*269, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*832, y*240 - 1, x*443 - 1, y*240 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*443 - 1, y*269, x*832, y*269, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*832, y*269, x*832, y*240 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(x*443, y*240, x*389, y*29, tocolor(12, 12, 35, 255), false) dxDrawText("CAMINHONEIRO", x*453, y*245, x*610, y*269, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawText(" | R$ 500, 00", x*620, y*245, x*777, y*269, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, false, false, false) dxDrawLine(x*442 - 1, y*217 - 1, x*442 - 1, y*240, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*906, y*217 - 1, x*442 - 1, y*217 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*442 - 1, y*240, x*906, y*240, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*906, y*240, x*906, y*217 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(x*442, y*217, x*464, y*23, tocolor(8, 8, 25, 255), false) dxDrawText(" EMPREGO SALÁRIO", x*433, y*219, x*781, y*240, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "left", "top", false, false, false, false, false) dxDrawLine(x*832 - 1, y*242 - 1, x*832 - 1, y*269, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*906, y*242 - 1, x*832 - 1, y*242 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*832 - 1, y*269, x*906, y*269, tocolor(0, 0, 0, 255), 1, false) dxDrawLine(x*906, y*269, x*906, y*242 - 1, tocolor(0, 0, 0, 255), 1, false) dxDrawRectangle(x*832, y*242, x*74, y*27, tocolor(28, 28, 28, 255), false) dxDrawText("ACEITAR", x*842, y*242, x*896, y*269, tocolor(255, 255, 255, 255), 0.50, "bankgothic", "center", "center", false, false, false, false, false) end erro: attempt to perform arithmetic on global 'x' (a nil value
×
×
  • Create New...