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?
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)
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.
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
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)
Castillo Posted January 25, 2013 Posted January 25, 2013 "onPlayerDamage" no se puede cancelar ( como dice en la pagina de la wiki ).
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"?
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 )
Julian09123 Posted January 25, 2013 Author Posted January 25, 2013 No me anda Solid , El Bot me sigue matando
NodZen Posted January 25, 2013 Posted January 25, 2013 3 cosas: .Estas logueado como Admin? .Iniciaste primero el "extra_health"? .ejecutaste el comando?
Recommended Posts