Wisam Posted December 11, 2014 Share Posted December 11, 2014 Hey I made a script for my server to change the weapon property damage and accuracy but then i wanted to make another script where i can change the weapon property of the chainsaw and katana but i noticed that the melee weapons are not listed in the menu, only fire arms and projectiles so if you could help me do this that would be great Also i tryed to do this but it didnt work: function damage() setWeaponProperty(9,"poor","damage", 1000) end addEventHandler ( "onResourceStart", getRootElement(), damage ) Link to comment
manawydan Posted December 11, 2014 Share Posted December 11, 2014 try use onClientPlayerDamage Link to comment
Wisam Posted December 11, 2014 Author Share Posted December 11, 2014 try use onClientPlayerDamage Didn't work Link to comment
manawydan Posted December 11, 2014 Share Posted December 11, 2014 you have calculate the damage Link to comment
manawydan Posted December 11, 2014 Share Posted December 11, 2014 try this -- client local damageFromWeapon9 = 10 -- change here addEventHandler("onClientPlayerDamage", getLocalPlayer(), function(atack,weapon,bod,los) if(weapon == 9)then cancelEvent() local h = getElementHealth(source) if(h>damageFromWeapon9)then setElementHealth(source,h-damageFromWeapon9) else triggerServerEvent("killPedSpecial",source,atack) end end end) --server addEvent("killPedSpecial",true) addEventHandler("killPedSpecial",root, function(a) killPed(source,a) end) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now