Jump to content

Adissonboy11

Members
  • Posts

    45
  • Joined

  • Last visited

Everything posted by Adissonboy11

  1. Preciso que quando quando estiver: setElementData(getLocalPlayer(), "infection", true) Perca blood, de 3 em 3 segundos, até ficar setElementData(getLocalPlayer(), "infection", false) Alguém pode me ajudar? Código que eu estava tentando editar: function Bloodadd (thePlayer) local blood = getElementData(thePlayer,"blood") setElementData(thePlayer,"blood",getElementData(thePlayer,"blood") - 200) setAccountData(thePlayer,"blood",getElementData(thePlayer,"blood") - 200) end function Verificartodos () local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do Bloodadd ( aPlayer ) end end setTimer ( Verificartodos , 900000, 0, "" ) -------------------------- Resolvi ------------------------ Client-side (Survivorsystem_client) function onPlayerUseMedicObject(itemName) local playersource = source setPedAnimation (playersource,"BOMBER","BOM_Plant",-1,false,false,false,false) setTimer( function () if itemName == "Antidot" then addPlayerStats (playersource,"blood",269) setElementData(playersource,"bleeding",0) setElementData(playersource,"infection",false) setElementData(playersource,itemName,getElementData(playersource,itemName)-1) end end,1500,1) triggerClientEvent(playersource,"refreshInventoryManual",playersource) end addEvent("onPlayerUseMedicObject",true) addEventHandler("onPlayerUseMedicObject",getRootElement(),onPlayerUseMedicObject) Serveside (Survivorsystem) function infection(source) if getElementData(getLocalPlayer(), "logedin") then if getElementData(getLocalPlayer(), "infection") then if getElementData(getLocalPlayer(),"logedin") then setElementData(getLocalPlayer(),"bleeding",1) local player = getLocalPlayer() local sound = playSound("sounds/cough.ogg") setSoundVolume(sound, 1.2) setElementData(getLocalPlayer(),"bleeding",math.random(50,200)) local amin = setPedAnimation(getLocalPlayer(), "FOOD", "EAT_Vomit_P", 100000, false, false, nil, false) setTimer(function() destroyElement(sound) destroyElement(1000) end,1000, 1) end end end end setTimer (infection,5000, 0) Isso to é para quem está com problema com infecção em GameMode DayZ.
  2. I have to do what? Please give me a friend for example.
  3. Greetings friends , I need help. This script is giving many warnings --[[ BackWeapons script By Gothem Feel free to use and change it as you want, obviously keeping the credit to the creator.--]] local jugadores = {} local lplayer = getLocalPlayer() local info = {} local sx,sy = guiGetScreenSize() function crearArma(jug,arma) local model = obtenerObjeto(arma) local slot = getSlotFromWeapon(arma) jugadores[jug][slot] = createObject(model,0,0,0) setElementCollisionsEnabled(jugadores[jug][slot],false) end function destruirArma(jug,slot) destroyElement(jugadores[jug][slot]) jugadores[jug][slot] = nil end addEventHandler("onClientResourceStart",getResourceRootElement(),function() for k,v in ipairs(getElementsByType("player",root,true)) do jugadores[v] = {} info[v] = {true,isPedInVehicle(v)} end end,false) addEventHandler("onClientPlayerQuit",root,function() if jugadores[source] and source ~= lplayer then for k,v in pairs(jugadores[source]) do destroyElement(v) end jugadores[source] = nil info[source] = nil end end) addEventHandler("onClientElementStreamIn",root,function() if getElementType(source) == "player" and source ~= lplayer then jugadores[source] = {} info[source] = {true,isPedInVehicle(source)} end end) addEventHandler("onClientElementStreamOut",root,function() if jugadores[source] and source ~= lplayer then for k,v in pairs(jugadores[source]) do destroyElement(v) end jugadores[source] = nil info[source] = nil end end) addEventHandler("onClientPlayerSpawn",root,function() if jugadores[source] then info[source][1] = true end end) addEventHandler("onClientPlayerWasted",root,function() if jugadores[source] then for k,v in pairs(jugadores[source]) do destruirArma(source,k) end info[source][1] = false end end) addEventHandler("onClientPlayerVehicleEnter",root,function() if jugadores[source] then for k,v in pairs(jugadores[source]) do destruirArma(source,k) end info[source][2] = true end end) addEventHandler("onClientPlayerVehicleExit",root,function() if jugadores[source] then info[source][2] = false end end) addEventHandler("onClientPreRender",root,function() for k,v in pairs(jugadores) do local x,y,z = getPedBonePosition(k,3) local rot = math.rad(90-getPedRotation(k)) local i = 15 local wep = getPedWeaponSlot(k) local ox,oy = math.cos(rot)*0.22,-math.sin(rot)*0.22 local alpha = getElementAlpha(k) for q,w in pairs(v) do if q == wep then destruirArma(k,q) else setElementRotation(w,0,70,getPedRotation(k)+90) setElementAlpha(w,alpha) if q==2 then local px,py,pz = getPedBonePosition(k,51) local qx,qy = math.sin(rot)*0.11,math.cos(rot)*0.11 setElementPosition(w,px+qx,py+qy,pz) elseif q==4 then local px,py,pz = getPedBonePosition(k,41) local qx,qy = math.sin(rot)*0.06,math.cos(rot)*0.06 setElementPosition(w,px-qx,py-qy,pz) else setElementPosition(w,x+ox,y+oy,z-0.2) setElementRotation(w,-17,-(50+i),getPedRotation(k)) i=i+15 end end end if info[k][1] and not info[k][2] then for i=1,7 do local arma = getPedWeapon(k,i) if arma~=wep and arma>0 and not jugadores[k][i] then crearArma(k,arma) end end end end end) function obtenerObjeto(arma) local m if arma > 0 and arma < 0 then m = 331 + arma elseif arma == 0 then m = 341 elseif arma == 0 then m = 326 elseif (arma > 21 and arma < 25) or (arma > 27 and arma < 29) or (arma > 0 and arma < 0) then m = 324 + arma elseif arma > 0 and arma < 0 then m = 325 + arma elseif arma == 0 then m = 372 end return m end Such as:
  4. How can I do in order to aim without having gun in his hand ? In another post a friend of the community tried to help me with this, but the code he sent me not worked. I want to run and aim at the same time , like this , can someone help me?
  5. Obrigado amigo, agora funcionou, obrigado mesmo.
  6. Tentei, não aconteceu nada, ficou normal, não renderiza nenhuma imagem.
  7. Eu preciso que quando ligar o Night, ou o Infrared, aparecer uma certa imagem na tela, só que... Ela aparece e some muito rápido, preciso que ela fique ate eu desativar o Night/Infrared novamente. function playerZoom (key,keyState) local screenW, screenH = guiGetScreenSize() if (key == "n") then if (getElementData(getLocalPlayer(),"Night Vision Goggles") > 0) then if nightvision then nightvision = false setPedAnimation(getLocalPlayer()) setCameraGoggleEffect("normal") else nightvision = true dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "IMAGE.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) setTimer(setPedAnimation, 150, 1,getLocalPlayer(),"goggles","goggles_put_on",650,true,false,false,false) setTimer(setCameraGoggleEffect, 700, 1, "nightvision") end end elseif (key == "i") then if (getElementData(getLocalPlayer(),"Infrared Goggles") > 0) then if infaredvision then infaredvision = false setPedAnimation(getLocalPlayer()) setCameraGoggleEffect("normal") else infaredvision = true dxDrawImage(screenW * 0.0000, screenH * 0.0000, screenW * 1.0000, screenH * 1.0000, "IMAGE.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) setTimer(setPedAnimation, 150, 1,getLocalPlayer(),"goggles","goggles_put_on",650,true,false,false,false) setTimer(setCameraGoggleEffect, 700, 1, "thermalvision") end end end end bindKey("n","down",playerZoom) bindKey("i","up",playerZoom)
  8. I need someone to tell me what 's wrong with this script , I can not use it , someone could help me ? ( There are several separate files in 2 resources , why not post the code here) https://yadi.sk/d/v2XknPC-fBYph
  9. No Neves, only aim without being with gun in hand.
  10. Obrigado, e desculpas pois fiz double post em outra area.
  11. Ah, obrigado RooTs, e Banex, valeu amigos. Mas não consegui da replace no planador ainda. :C
  12. Eu quero colocar .dff, pode me dar alguma solução? Um exemplo talvez.
  13. Estou com um probleminha, não consigo colocar skin na parte superior do paraquedas. Consigo apenas colocar skin na mochila, queria colocar uma skin na parte superior, alguém pode me ajudar? tentei de várias formas e nada. Usei o seguinte codigo. txd = engineLoadTXD ( "gun_para.txd" ) engineImportTXD ( txd, 371 ) dff = engineLoadDFF ( "gun_para.dff", 0 ) engineReplaceModel ( dff, 371 ) txd = engineLoadTXD ( "parachute.txd" ) engineImportTXD ( txd, 3060 ) dff = engineLoadDFF ( "paracx.dff", 0 ) engineReplaceModel ( dff, 3060 )
  14. Eu apoio, gostei bastante desta ideia. Nós do Brasil temos um único forum puxado para MTA, e nem é totalmente para MTA, é para MTA:DayZ, Fórum lixo, que tudo gira em torno dos Admins, membro nenhum pode dar palpite, ou postar seus recursos, pois só fica no fórum se o admin permitir. Apoio a ideia, e espero que tenha um tópico apenas de MTA:DayZ, isso vai melhorar a vida de muita gente. Mais que apoiado.
  15. Please, I need a little help. Wanted to put this parachute with these textures in my server. I can only change the skin of the parachute backpack, the top not. Can anyone help me ? I have 2 .dff and 2 .txd ( can not set or the .dff and txd at the top of the parachute ) Could anyone help me ?
  16. The above script is not working as I expected, the gun appears , not more as in the examples . See how it's getting
  17. I put an example , think of now to understand .
  18. I saw on some server , that without having to aim the gun in his hand ( target running without having gun in hand, type DayZ SA ) by pressing the right mouse button , podria someone show me how I can put this fuction on my server? Ex:
  19. Sorry the wrong area, do not quite understand English.
×
×
  • Create New...