Mateito14 Posted October 24, 2015 Share Posted October 24, 2015 Hola. Necesito que me ayuden con esto, hice para que las armas no hagan daño que me salio bien pero el problema es que al parar el script las armas siguen sin hacer daño . Que hago? El Script addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), function() weaponList = { "colt 45", "silenced", "deagle", "shotgun", "sawed-off", "combat shotgun", "uzi", "mp5", "ak-47", "m4", "tec-9", "rifle", "sniper", "minigun" } for _,weapon in ipairs( weaponList ) do for _,skill in ipairs( { "poor", "std", "pro" } ) do setWeaponProperty(weapon, skill, "damage", 0) end end end) Link to comment
DeathMta Posted October 24, 2015 Share Posted October 24, 2015 1.no lo creaste 2.cancelarlo con un evento? Link to comment
Tomas Posted October 24, 2015 Share Posted October 24, 2015 addEventHandler("onResourceStop", resourceRoot, function() weaponList = { "colt 45", "silenced", "deagle", "shotgun", "sawed-off", "combat shotgun", "uzi", "mp5", "ak-47", "m4", "tec-9", "rifle", "sniper", "minigun" } for _,weapon in ipairs( weaponList ) do for _,skill in ipairs( { "poor", "std", "pro" } ) do setWeaponProperty(weapon, skill, "damage", getOriginalWeaponProperty(weapon, skill, "damage")) end end end ) Link to comment
Mateito14 Posted October 24, 2015 Author Share Posted October 24, 2015 addEventHandler("onResourceStop", resourceRoot, function() weaponList = { "colt 45", "silenced", "deagle", "shotgun", "sawed-off", "combat shotgun", "uzi", "mp5", "ak-47", "m4", "tec-9", "rifle", "sniper", "minigun" } for _,weapon in ipairs( weaponList ) do for _,skill in ipairs( { "poor", "std", "pro" } ) do setWeaponProperty(weapon, skill, "damage", getOriginalWeaponProperty(weapon, skill, "damage")) end end end ) Gracias, había tratado de hacer algo con el "onResourceStop" pero no me funcionaba, este funciono , gracias. Link to comment
Recommended Posts