Jump to content

GHOSTKILLER1546

Members
  • Posts

    32
  • Joined

  • Last visited

Posts posted by GHOSTKILLER1546

  1. Hola a todos, tengo un pequeño problema en este resource, estuve viendo varios post sobre adaptar el boss en la gamemode DayZ, el detalle es que al morir no se crea el cuerpo para recoger el premio que tiene en el cuerpo, y no da la experiencia para el quien lo mata

    espero que me puedan ayudar, se los agradeceria mucho

    :D:D:D

    SERVER

    --local hillRadar = createRadarArea ( 93, 1800, 200, 200, 181, 0, 0, 200 ) 
      
    function BossDayZ ( ) 
        nemesi = exports [ "slothBot" ]:spawnBot ( 206.19999694824, 1860.4000244141, 20.60000038147, 90, 33, 0, 0, Nemesis, 38, "hunting", true ) 
        setElementData( nemesi, "blood", 10000000 ) 
        outputChatBox ("#9E0000Nemesis Respawned!",getRootElement(), 255, 255, 255, true ) 
        outputChatBox ("#9E0000Nemesis: #9E0000 Grrr Grrr!",getRootElement(), 255, 255, 255, true ) 
        local sound = playSound3D("data/nemesis.mp3",x,y,z,false) 
    end 
    addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), BossDayZ )    
             
             
    function onPedAttack ( attacker ) 
        if ( isElement ( attacker ) == true ) then       
            if ( getElementModel ( attacker ) == 33)  then 
                setElementData ( source, getElementData(source, "blood") - 400) 
                setElementData ( ptarget, source, "blood" - 200) 
            end 
        end 
    end 
    addEventHandler( "onPlayerDamage", getRootElement ( ), OnPedAttack )  
      
    addEvent ( "getBloodBoss", true ) 
    function getBloodBoss( nemesi ) 
        if ( isElement ( nemesi ) ) then 
            killPed ( nemesi ) 
            destroyElement ( nemesi ) 
        end 
    end 
    addEventHandler ( "getBloodBoss", getRootElement(), getBloodBoss ) 
            
    function destroyDeadBoss (boss,bossCol) 
        destroyElement(boss) 
        destroyElement(bossCol) 
    end 
      
    function killBoss(killer,headshot) --Aqui inicia el problema 
        if killer then 
        setElementData(killer,"experience",getElementData(killer,"experience")+15000) 
        end     
        local skin = getElementModel(source) 
        local x,y,z = getElementPosition(source) 
        local boss = createPed(skin,x,y,z) 
        local bossCol = createColSphere(x,y,z,1.5) 
        killPed(boss) 
        setTimer(destroyDeadBoss,360000 ,1,bossCol,boss) 
        attachElements (bossCol,boss,0,0,0) 
        setElementData(bossCol,"parent",boss) 
        setElementData(bossCol,"playername","Nemesis") 
        setElementData(bossCol,"deadman",true) 
        setElementData(boss,"deadzombie",true) 
        setElementData(bossCol,"deadman",true) 
        setElementData(bossCol,"MAX_Slots",12) 
        setElementData(bossCol,"Medic Kit", 10) 
        setElementData(bossCol,"Antibiotics", 10) 
        setElementData(bossCol,"Blood Bag", 10) 
        setElementData(bossCol,"Transfusion Kit", 10) 
        local hours,minutes = getTime() 
        local loot_table = "" 
        setElementData(bossCol,"deadreason","Someone murderer, but how?. Estimated time of death: "..hours..":"..minutes) 
        for i, id in ipairs(ZombieLoot) do 
            if skin == id[1] then 
                loot_table = tostring(id[2]) 
            end 
        end 
        for i, item in ipairs(zombieLootType[loot_table]) do 
            local value = math.percentChance(item[2],math.random(0,1)) 
            setElementData(bossCol,item[1],value) 
            local ammoData,weapID = getWeaponAmmoFromName (item[1],true) 
            if ammoData and value > 0 then 
                setElementData(bossCol,ammoData,math.random(0,1)) 
            end 
        end 
    end 
    addEvent("onBotWasted",true) 
    addEventHandler("onBotWasted",root,killBoss) 
      
      
    function RespawnBoss() 
        setTimer(BossDayZ,360000 ,1) 
    end 
    addEvent("onBotWasted",true) 
    addEventHandler("onBotWasted",getRootElement,RespawnBoss) 
    

    CLIENTE

    function Skinemesis1() 
      txd = engineLoadTXD("data/107.txd", 2 ) 
      engineImportTXD(txd, 2) 
      dff = engineLoadDFF("data/107.dff", 2 ) 
      engineReplaceModel(dff, 2) 
    end 
    addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), Skinemesis1) 
      
    function getBloodBoss ( attacker, weapon, bodypart ) 
        if ( isElement ( attacker ) ) then       
            if ( getElementModel ( source == 33 ) ) then         
                setElementData ( source, getElementData(source, "blood") - 600) 
                if ( getElementData( source, "blood") < 1 ) then     
                    triggerServerEvent ( "getBloodBoss", root ) 
                end 
            end 
        end 
    end 
    addEventHandler ( "onClientPedDamage", root, getBloodBoss ) 
    

  2. Esto del host no me queda muy claro, por eso necesito que me ayuden a saber todo sobre esto, consejos de como comprar host o VPS, o si se puede conseguir gratis(ya que no cuento con ningún método de pago).

    También que necesito hacer después para subir mi server 24 horas.

    Se los agradeceria demasiado.

    :D:D:D:D

  3. Este es un nuevo servidor estilo Dayz Standalone (Zombis) que llevo creando y editando un buen tiempo, que al fin pude "terminar".

    Este servidor contiene:

    *22 Skins diferentes.

    *Sistema de Chalecos y Cascos.

    *Sistema de Craft.

    *Sistema de Lanza granadas.

    *Debug Monitor único.

    *Selección de Genero (Masculino y Femenino).

    *Nuevo scoreboard.

    *Nuevo Inventario.

    *Sistema de Lenguaje.

    *Nuevo GPS y brújula.

    *Mira para cada armas (por clase).

    *47 Armas diferentes.

    *24 Vehículos.

    Despues estare agregando mas cosas con el paso del tiempo y si el servidor progresa, espero que les guste y se diviertan.

    Visiten la pagina para mas informacion.

    Pagina Oficial:

    http://theghostarmando.wix.com/survival-legend

    No pude subirimagenes al foro, pero aqui esta un URL para que las vean.

    Imagenes:

    https://archive.org/details/Screen9

    :D:D:D:D

    Pronto subire un video sobre este.

  4. Pensandolo 2 veces, creo que el problema esta en que no tiene un retorno para cuando no entra al if, deberia quedar asi para el debug.
    function getWeaponObjectID (weaponID) 
        for i,weaponData in ipairs(weaponIDtoObjectID) do 
            if weaponID == weaponData[1] then 
                return weaponData[2] 
            end 
        end 
        outputDebugString("No se encontro "..weaponID) 
        return false 
    end 
      
    

    Es lo mismo, no se puede crear un objeto con ID booleana.

      
               else 
               if (getWeaponObjectID(weapID)) then 
               elementWeaponbBack[source] = createObject(getWeaponObjectID(weapID1),x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               end 
               end 
      
    

    Por ahora agrege lo que pusiste:

    elementWeaponbBack = {} 
    function weaponSwitchbBack ( previousWeaponID, currentWeaponID ) 
        local weapon2 = getElementData(source,"currentweapon_2") 
     if not weapon2 then return end 
     local ammoData1,weapID1 = getWeaponAmmoFromName(weapon2) 
     local x,y,z = getElementPosition(source) 
     local rx,ry,rz = getElementRotation(source) 
              if previousWeaponID == weapID1 then 
               if elementWeaponbBack[source] then 
                detachElementFromBone(elementWeaponbBack[source]) 
                destroyElement(elementWeaponbBack[source]) 
                elementWeaponbBack[source] = false 
               end 
               if weapon2 == "Baseball Bat" then 
               elementWeaponbBack[source] = createObject(336,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "Shovel" then 
               elementWeaponbBack[source] = createObject(337,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "Crowbar" then 
               elementWeaponbBack[source] = createObject(333,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "Hunting Knife" then 
               elementWeaponbBack[source] = createObject(335,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "--" then 
               else 
                  if (getWeaponObjectID(weapID)) then 
                  elementWeaponbBack[source] = createObject(getWeaponObjectID(weapID1),x,y,z) 
                  setObjectScale(elementWeaponbBack[source],0.875) 
                  end 
               end 
               if elementBackpack[source] then 
                attachElementToBone(elementWeaponbBack[source],source,3,-0.18,-0.05,-0.1,-0.1,0,260) 
               else 
                attachElementToBone(elementWeaponbBack[source],source,3,-0.18,-0.05,-0.1,-0.1,0,260) 
               end 
              elseif currentWeaponID == weapID1 then 
               detachElementFromBone(elementWeaponbBack[source]) 
               destroyElement(elementWeaponbBack[source]) 
               elementWeaponbBack[source] = false 
              end 
     end 
    addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchbBack ) 
    

    Arreglo los dos primeros, pero sigue dando el error en la linea 40 destroyElement, no entiendo porque

  5. Postea la función getWeaponObjectID.

    La funcion es esta

    function getWeaponObjectID (weaponID) 
        for i,weaponData in ipairs(weaponIDtoObjectID) do 
            if weaponID == weaponData[1] then 
                return weaponData[2] 
            end 
        end 
    end 
    

  6. Nose porque marca esto en el server, pero en el juego funciona bien, porfavor me podrian decir porque marca este error.

    WARNING: BACKPACK.lua: 28 : Bad argument @ 'createObject' [excepted number at argument 1, got boolean]

    WARNING: BACKPACK.lua: 29 : Bad argument @ 'setObjectScale' [excepted number at argument 1, got boolean]

    WARNING: BACKPACK.lua: 38 : Bad argument @ 'DestroyElement' [excepted number at argument 1, got boolean]

    elementWeaponbBack = {} 
    function weaponSwitchbBack ( previousWeaponID, currentWeaponID ) 
        local weapon2 = getElementData(source,"currentweapon_2") 
     if not weapon2 then return end 
     local ammoData1,weapID1 = getWeaponAmmoFromName(weapon2) 
     local x,y,z = getElementPosition(source) 
     local rx,ry,rz = getElementRotation(source) 
              if previousWeaponID == weapID1 then 
               if elementWeaponbBack[source] then 
                detachElementFromBone(elementWeaponbBack[source]) 
                destroyElement(elementWeaponbBack[source]) 
                elementWeaponbBack[source] = false 
               end 
               if weapon2 == "Baseball Bat" then 
               elementWeaponbBack[source] = createObject(336,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "Shovel" then 
               elementWeaponbBack[source] = createObject(337,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "Crowbar" then 
               elementWeaponbBack[source] = createObject(333,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "Hunting Knife" then 
               elementWeaponbBack[source] = createObject(335,x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               elseif weapon2 == "--" then 
               else 
               elementWeaponbBack[source] = createObject(getWeaponObjectID(weapID1),x,y,z) 
               setObjectScale(elementWeaponbBack[source],0.875) 
               end 
               if elementBackpack[source] then 
                attachElementToBone(elementWeaponbBack[source],source,3,-0.18,-0.05,-0.1,-0.1,0,260) 
               else 
                attachElementToBone(elementWeaponbBack[source],source,3,-0.18,-0.05,-0.1,-0.1,0,260) 
               end 
              elseif currentWeaponID == weapID1 then 
               detachElementFromBone(elementWeaponbBack[source]) 
               destroyElement(elementWeaponbBack[source]) 
               elementWeaponbBack[source] = false 
              end 
     end 
    addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), weaponSwitchbBack ) 
    

  7. A que herramientas te refieres?

    Si lo que quieres es quitar todo el mapa

    Usa este codigo:

    for i=550,20000 do 
        removeWorldModel(i,10000,0,0,0) 
    end 
    setOcclusionsEnabled(false)  -- Also disable occlusions when removing certain models 
    setWaterLevel(-5000)         -- Also hide the default water as it will be full of holes 
    

    No, me refiero que si quiero poner varios objetos de una coordenada hasta otra muy lejos, asi como si fuera a hacer un panel.

  8. Quisiera saber si existen herramientas para el map editor, estoy pensando en hacer un mapa que reemplace el de gta, pero se que costara mucho tiempo, por eso me gustaría saber si hay herramientas mas fáciles para esto, se los agradeceria demaciado.

  9. Actualmente yo tengo uno, pero no está a la venta.

    ¿Por que esta a la venta si cualquier newbie puede hacerlo?

    @GHOSTKILLER1546 puedes crear una imagen y luego renderizarla y despues checar si el player esta apuntando o no con getKeyState.

    y si quisiera hacerlo para el primera persona esta mas complicado no?

  10. He estado modificando este script pero no funciona, asi que necesito que me digan porque razon no funciona y que necesito hacer, y tambien si necesito otro script. espero que me ayuden, se los agradeceria demasiado.

    ------------------ TABLES STUFF 
      
    stat = { 
    1, 
    100, 
    150, 
    200, 
    220, 
    250, 
    270, 
    300, 
    400, 
    500, 
    600, 
    700, 
    800, 
    900, 
    1100, 
    1300, 
    1500, 
    1800, 
    2000, 
    2500, 
    3000, 
    3500, 
    4000, 
    4500, 
    6000 
    } 
    -------------------------------------------------------- 
    setElementData(root, "Experiencia", 0) 
    setElementData(root, "Nivel", 0) 
    -------------------------------------------------------- 
    -------------------------------------------------------- 
    -------------------------------------------------------- 
    ----------------TEXT/GUI STUFF-------------------------- 
    local screenSizex, screenSizey = guiGetScreenSize()font2 = guiCreateFont("font.otf",17)font = guiCreateFont("font.otf", 7)ups = guiCreateLabel(0.4*screenSizex-110,0.5*screenSizey-81.9,500,500, "", false) lab = guiCreateLabel(0.9*screenSizex-110,0.9*screenSizey-81.5,300,200, "Experiencia: "..getElementData(localPlayer, "Experiencia").."\n\nNivel: "..getElementData(localPlayer, "Nivel"), false)    
      guiSetFont(lab, font)guiLabelSetColor(lab, 255,0,0)guiSetFont(ups, font2)guiSetVisible(ups, false) 
    -------------------------------------------------------- 
    -------------------------------------------------------- 
    -------------------------------------------------------- 
    function pedStat(attacker)          
        local dat = getElementData(localPlayer, "Experiencia")       
        if getElementData (source, "zombie") == true and attacker == localPlayer then         
        setElementData(localPlayer, "Experiencia", dat+1)         
        guiSetText(lab, "Experiencia: "..getElementData(localPlayer, "Experiencia").."\n\nNivel: "..getElementData(localPlayer, "Nivel")) 
      end     
    if dat == stat[1] then       
    local sound = playSound3D("level_up.mp3", x,y,z)    
    guiSetVisible(ups, true)               
    setTimer(guiSetVisible, 5000, 1, ups, false)         
    setElementData(localPlayer, "Nivel", 1)  
    guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))   
     elseif dat == stat[2] then      
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 2)               
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[3] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 3)  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))       
     elseif dat == stat[4] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 4)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[5]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 5)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[6]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 6)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))       
     elseif dat == stat[7]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 7)                 
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))       
     elseif dat == stat[8]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", -- s8) -->                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))      
     elseif dat == stat[9]  then        
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 9)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))      
     elseif dat ==    stat[10]  then        
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 10)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat ==   stat[11]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 11)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))      
     elseif dat ==   stat[12] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 12)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))      
     elseif dat ==  stat[13]  then        
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 13)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))      
     elseif dat == stat[14] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 14)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))        
     elseif dat ==stat[15]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 15)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[16] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true) 
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 16)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat ==  stat[17]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 17)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))       
     elseif dat ==  stat[18] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 18)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))       
     elseif dat ==  stat[19] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 19)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat ==  stat[20] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 20)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat ==  stat[21]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 21)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[22]  then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 22)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel"))       
     elseif dat == stat[23] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 23)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[24] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 24)                  
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     elseif dat == stat[25] then          
     local sound = playSound3D("level_up.mp3", x,y,z)    
     guiSetVisible(ups, true)                      
     setTimer(guiSetVisible, 5000, 1, ups, false)                 
     setElementData(localPlayer, "Nivel", 25)                 
     guiSetText(ups, "TU AVANZASTE A NIVEL "..getElementData(localPlayer, "Nivel")) 
     end 
    end 
    addEventHandler("onClientPedWasted", root, pedStat) 
      
    -------------------------------------------- 
    ---- For server side stats update ---------- 
    -------------------------------------------- 
    function serverData() 
       guiSetText(lab, "Experiencia: "..getElementData(localPlayer, "Experiencia").."\n\nNivel: "..getElementData(localPlayer, "Nivel"))  
       end 
    addEvent("ZombieServer", true) 
    addEventHandler("ZombieServer", root, serverData) 
    

  11. Quisiera que me ayuden a hacer un sistema de nivel, mi server va ha hacer de dayz, y quiero que los jugadores tengan un nivel propio por matar zombis y otros jugadores, asi que ganaran experiencia, y que tengan una imagen al lado del hud señalando el nivel que son les agradeceria demaciado

    :D:D:D

  12. Necesito ayuda para resolver este error

    attempt to call global 'getelementSyncer" (a nil value)

    function onClientPedLoseSyncer(thePed) 
        if thePed then 
            outputChatBox("Ped existe, e não tem mais syncer!") 
        end 
    end 
    addEvent("onClientPedLoseSyncer", true) -- When a ped has no syncer anymore 
    addEventHandler("onClientPedLoseSyncer", getRootElement(), onClientPedLoseSyncer) 
      
    addEventHandler( "onClientElementStreamOut", getRootElement( ), 
        function ( ) 
            -- if getElementType(source == "ped") then -- Is a ped being stramed out? 
                local elementSyncer = getElementSyncer(source) 
                 
                if not elementSyncer then 
                    triggerClientEvent("onClientPedLoseSyncer", getRootElement(), source) 
                    --triggerServerEvent("onPedLoseSyncer", getLocalPlayer(), source)  
                end 
            -- end 
        end 
    

×
×
  • Create New...