Plate Posted July 9, 2012 Posted July 9, 2012 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
BorderLine Posted July 9, 2012 Posted July 9, 2012 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
Plate Posted July 9, 2012 Author Posted July 9, 2012 Como lo puedo hacer? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted July 9, 2012 Posted July 9, 2012 Usa este evento para detectar cuando le cambia el skin a un jugador: https://wiki.multitheftauto.com/wiki/OnE ... odelChange San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 9, 2012 Author Posted July 9, 2012 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
Alexs Posted July 9, 2012 Posted July 9, 2012 Si no me equivoco ese script tiene algo malo al editar la vida de un Ped Developer @ MYVAL
BorderLine Posted July 9, 2012 Posted July 9, 2012 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
Plate Posted July 9, 2012 Author Posted July 9, 2012 Yo uso slothbot haci que seria onBotSpawn? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
BorderLine Posted July 9, 2012 Posted July 9, 2012 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
Castillo Posted July 9, 2012 Posted July 9, 2012 Para darle vida extra a un "ped" o un "player" podes usar el recurso "extra_health" que acabo de crear y subir en remplazo al de Benxamix, ya que no funcionaba. https://community.multitheftauto.com/ind ... ls&id=5195 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 9, 2012 Author Posted July 9, 2012 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
Alexs Posted July 9, 2012 Posted July 9, 2012 Si los Reset se guardan en los Account Data si, por que en los Element Data se pierde con cada reconnect Developer @ MYVAL
Plate Posted July 9, 2012 Author Posted July 9, 2012 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
Castillo Posted July 9, 2012 Posted July 9, 2012 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. Education is the most powerful weapon which you can use to change the world.
Alexs Posted July 9, 2012 Posted July 9, 2012 (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 July 9, 2012 by Guest Developer @ MYVAL
Plate Posted July 9, 2012 Author Posted July 9, 2012 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
Alexs Posted July 9, 2012 Posted July 9, 2012 Por que lo hize con los bot random y murio de muy pocos tiros Postea tu intento Developer @ MYVAL
Plate Posted July 9, 2012 Author Posted July 9, 2012 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
Castillo Posted July 9, 2012 Posted July 9, 2012 Lo probe y no lo pude matar aun ( ya que tiene 5000 de vida ). San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 9, 2012 Author Posted July 9, 2012 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
Plate Posted July 10, 2012 Author Posted July 10, 2012 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
Castillo Posted July 10, 2012 Posted July 10, 2012 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. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 10, 2012 Author Posted July 10, 2012 exelente pero el script sigue sin funcionar eso esta bien? Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Castillo Posted July 10, 2012 Posted July 10, 2012 Si, esta bien. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Plate Posted July 10, 2012 Author Posted July 10, 2012 (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 July 10, 2012 by Guest Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Recommended Posts