Julian09123 Posted January 25, 2013 Posted January 25, 2013 Hola quisiera saber como puedo hacer, para que los admins no mueran osea les disparan y no los hieren. Gracias podrian ayudarme? Skype: Juliang09123
Plate Posted January 25, 2013 Posted January 25, 2013 usa el extra_health function godmode(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then exports.extra_health:setElementInvulnerable(source, true) end end addCommandHandler("godmode", godmode) Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Xperia Posted January 25, 2013 Posted January 25, 2013 usa el extra_health function godmode(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then exports.extra_health:setElementInvulnerable(source, true) end end addCommandHandler("godmode", godmode) Si no me equivoco, eso solo lo inicia, pero no lo quita.Creo que es mejor ponerle un evento.
Plate Posted January 25, 2013 Posted January 25, 2013 No lo quita? a que te referis Visita Full GameZ DayZ Mod Server IP: mtasa://158.69.125.144:29015
Xperia Posted January 25, 2013 Posted January 25, 2013 Con el comando lo incia pero si lo vuelves a poner no lo quita.
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 perdon plate pero no me anda Puse todo bien y en console me salee todo bien. pero estoy con el bot y me mata Puse el meta y el server Skype: Juliang09123
FraN-724 Posted January 25, 2013 Posted January 25, 2013 Guíate por este resource, lo editas a tu gusto, o si quieres lo dejas así. https://community.multitheftauto.com/index.php?p=resources&s=details&id=4400
NodZen Posted January 25, 2013 Posted January 25, 2013 Probalo asi! function adm ( attacker, thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if ( getElementType ( attacker ) == "player" ) then local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then cancelEvent() end end end addEventHandler("onPlayerDamage", getRootElement(), adm) ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Castillo Posted January 25, 2013 Posted January 25, 2013 "onPlayerDamage" no se puede cancelar ( como dice en la pagina de la wiki ). San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
NodZen Posted January 25, 2013 Posted January 25, 2013 "onPlayerDamage" no se puede cancelar ( como dice en la pagina de la wiki ). Entonces es "onClientPlayerDamage"? ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Castillo Posted January 25, 2013 Posted January 25, 2013 Si, pero ese evento es server side. @Plate: 'source' no esta definido, tenias que usar 'thePlayer'. function godmode ( thePlayer ) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ( "user.".. accName, aclGetGroup ( "Admin" ) ) then exports.extra_health:setElementInvulnerable ( thePlayer, not exports.extra_health:isElementInvulnerable ( thePlayer ) ) end end addCommandHandler ( "godmode", godmode ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 No me anda Solid , El Bot me sigue matando Skype: Juliang09123
Castillo Posted January 25, 2013 Posted January 25, 2013 Aca si funciona. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
NodZen Posted January 25, 2013 Posted January 25, 2013 3 cosas: .Estas logueado como Admin? .Iniciaste primero el "extra_health"? .ejecutaste el comando? ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Recommended Posts