lucascba Posted July 4, 2014 Share Posted July 4, 2014 Hola a todos, me gustaria saber como hago que un arma en mi server haga menos daño como por ej la minigun hace mucho daño, como hago para que haga menos daño? Link to comment
Alexs Posted July 4, 2014 Share Posted July 4, 2014 Hola a todos, me gustaria saber como hago que un arma en mi server haga menos daño como por ej la minigun hace mucho daño, como hago para que haga menos daño? Utiliza 'setWeaponProperty'. Link to comment
BorderLine Posted July 4, 2014 Share Posted July 4, 2014 lo otro, nose que tan provechoso pueda ser, ni q contras tenga [lua]function stopMinigunDamage ( attacker, weapon, bodypart ) if ( weapon == 38 ) cancelEvent() setElementHealth(source, getElementHealth(source) -1 ) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage )[lua] Link to comment
UserToDelete Posted July 4, 2014 Share Posted July 4, 2014 lo otro, nose que tan provechoso pueda ser, ni q contras tenga function stopMinigunDamage ( attacker, weapon, bodypart ) if ( weapon == 38 ) cancelEvent() setElementHealth(source, getElementHealth(source) -1 ) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) Si lo que quieres es quitar daño a la minigun simplemente pon: function stopMinigunDamage ( attacker, weapon, bodypart ) if ( weapon == 38 ) cancelEvent() setElementHealth(source, getElementHealth(source)) --Modificacion aqui end end --Copyright to BorderLine addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) Si quieres que el daño del atacante le haga efecto "pretoriano" usa esta, Obviamente otra vez copyright y gracias a borderLine por la base del script function stopMinigunDamage ( attacker, weapon, bodypart ) if ( weapon == 38 ) cancelEvent() setElementHealth(source, getElementHealth(source)) setElementHealth(attacker, getElementHealth(attacker) - 1) end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) Link to comment
lucascba Posted July 5, 2014 Author Share Posted July 5, 2014 Sigue haciendo el mismo daño :c Link to comment
UserToDelete Posted July 5, 2014 Share Posted July 5, 2014 Prueba con la teoria de Alex-Steel --[[ NO ESTA TESTEADO ]] function propSS () setWeaponProperty("minigun","std","damage",0) setWeaponProperty("minigun","poor","damage",0) setWeaponProperty("minigun","pro","damage",0) end addEventHandler("onResourceStart",root,propSS) addEventHandler("onPlayerJoin",root,propSS) Link to comment
Bc# Posted July 5, 2014 Share Posted July 5, 2014 Prueba con la teoria de Alex-Steel --[[ NO ESTA TESTEADO ]] function propSS () setWeaponProperty("minigun","std","damage",0) setWeaponProperty("minigun","poor","damage",0) setWeaponProperty("minigun","pro","damage",0) end addEventHandler("onResourceStart",root,propSS) addEventHandler("onPlayerJoin",root,propSS) Para que el "onPlayerJoin"? Link to comment
Recommended Posts