lucascba Posted July 4, 2014 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?
Alexs Posted July 4, 2014 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'.
BorderLine Posted July 4, 2014 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]
UserToDelete Posted July 4, 2014 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 )
UserToDelete Posted July 5, 2014 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)
Bc# Posted July 5, 2014 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"?
Recommended Posts