Jump to content

Vida


Plate

Recommended Posts

Posted

Hola quisiera saber si con el extrahealth podria daarle vida extra a el que se pusiera el skin 300 se puede hacer eso?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

claro que si

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

Yo lo necesitaria para ponerle vida a los bot con minigun de mi server que spawnean en una posicion random de las que yo puse solid serviria ?

ya que como me dijistes si lo pongo en una posicion random el bot no tendria la vida exportada podria ponersela al skin

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

intenta con un getElementModel

y el evento de zombies onZombieSpawn

nose si funcionara, pero hay muichos post con respecto a zombies con extrahealth o bots

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

Yo uso slothbot haci que seria onBotSpawn?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

bueno en ese caso si

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

Posted

Muuchas gracias solid como siempre resuelves mis problemas te lo agradesco mucho mucho mucho

Otra cosa como puedo crear funciones para exportar ejemplo con el systema de reset que me ayudo alex quisiera crear una funcion para exportar qe seria

getPlayerReset y setPlayerReset se podria?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

si los tengo con account data pero nose como crear las funciones para exportar

PD: solid el extra_health tuyo lo puedo utilizar con el bot que se spawnea en la posiciones random?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Si, lo probe con el de "zombies" y funciono, asi que con los "slothbots" tambien tiene que funcionar ;).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)

Quiza algo asi:

function getPlayerReset ( jugador ) 
  
if ( jugador ) then 
getAccountData( jugador, "Reset") 
    end 
end 

function setPlayerOneMoreReset ( jugador ) 
  
if ( jugador ) then 
local resets = getAccountData( jugador, "Reset") 
setAccountData( jugador, "Reset", resets + 1 ) 
    end 
end 

function setPlayerReset ( jugador, resets ) 
  
if ( jugador ) then 
setAccountData( jugador, "Reset", resets ) 
    end 
end 

No se hacer funciones exportadas, y eso es lo que mejor me imagino

PD: Para exportar debes poner esto en el meta.xml

Edited by Guest

Developer @ MYVAL

Posted

Por que lo hize con los bot random y murio de muy pocos tiros

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
local randomSpawnTable = 
    { 
        { 1086.6645507813, 1076.1888427734, 10.838157653809,}, 
        { -2086.9196777344, 173.74137878418, 35.0546875 }, 
        { -2667.5134277344, 734.33197021484, 27.953125 }, 
        { -2497.6953125, -697.30908203125, 139.3203125 }, 
        { -2333.6032714844, -1621.1364746094, 483.71069335938 }, 
        { 1862.423828125, 2624.6528320313, 13.8719085693 } 
    } 
  
function Bot ( ) 
    local random = math.random ( #randomSpawnTable ) 
    local x, y, z = unpack ( randomSpawnTable [ random ] ) 
    slothbot = exports [ "slothbot" ]:spawnBot ( x, y, z, 90, math.random ( 300, 303 ), 0, 0, Boss, 38, hunting, true ) 
    exports.extra_health:setElementExtraHealth ( slothbot, 5000 ) 
end 
addEventHandler ( "onResourceStart", resourceRoot, Bot ) 
setTimer(Bot,300000,0) 
  

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Lo probe y no lo pude matar aun ( ya que tiene 5000 de vida ).

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

para el bot que esta en una posicion estable iene esa vida pero los random no

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

de la nada empeso a andar gracias solid

Alex que no entiendo como exportarlas por ejemplo lo quise testiar y puse

function test (player) 
exports [ "EX" ]:setPlayerReset (player, 5) 
end 
addCommandHandler("Res",test) 

y no sirvio

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted
Quiza algo asi:
function getPlayerReset ( jugador ) 
  
if ( jugador ) then 
getAccountData( jugador, "Reset") 
    end 
end 

function setPlayerOneMoreReset ( jugador ) 
  
if ( jugador ) then 
local resets = getAccountData( jugador, "Reset") 
setAccountData( jugador, "Reset", resets + 1 ) 
    end 
end 

function setPlayerReset ( jugador, resets ) 
  
if ( jugador ) then 
setAccountData( jugador, "Reset", resets ) 
    end 
end 

No se hacer funciones exportadas, y eso es lo que mejor me imagino

PD: Para exportar debes poner esto en el meta.xml

Las funciones de get/setAccountData se usan con cuentas, no jugadores.

function getPlayerReset ( jugador ) 
    if ( jugador ) then 
        local account = getPlayerAccount ( jugador ) 
        if ( account and not isGuestAccount ( account ) ) then 
            return tonumber ( getAccountData ( account, "Reset") ) or 0 
        else 
            return false 
        end 
    else 
        return false 
    end 
end 
  
function setPlayerReset ( jugador, resets ) 
    if ( jugador ) then 
        local account = getPlayerAccount ( jugador ) 
        if ( account and not isGuestAccount ( account ) ) then 
            return setAccountData ( account, "Reset", resets ) 
        else 
            return false 
        end 
    else 
        return false 
    end 
end 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

exelente pero el script sigue sin funcionar

     

eso esta bien?

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

Posted

Si, esta bien.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted (edited)

pero por que el script no funciona todabia

  
  
function getPlayerReset ( jugador ) 
    if ( jugador ) then 
        local account = getPlayerAccount ( jugador ) 
        if ( account and not isGuestAccount ( account ) ) then 
            return tonumber ( getAccountData ( account, "Reset") ) or 0 
        else 
            return false 
        end 
    else 
        return false 
    end 
end 
  
function setPlayerReset ( jugador, Reset ) 
    if ( jugador ) then 
        local account = getPlayerAccount ( jugador ) 
        if ( account and not isGuestAccount ( account ) ) then 
            return setAccountData ( account, "Reset", Reset ) 
        else 
            return false 
        end 
    else 
        return false 
    end 
end 

el test

function test (player,commandName) 
exports.EX:setPlayerReset(player, 5) 
end 
addCommandHandler("Res",test) 

Edited by Guest

Visita Full GameZ DayZ Mod

Server IP: mtasa://158.69.125.144:29015

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...