AlfaMTA Posted April 7, 2014 Posted April 7, 2014 I'm trying to do a tazer system with silenced pistol then, I put it in serverside: function removeDamage () setWeaponProperty (23, "poor", "damage", 0) end addEventHandler ( "onResourceStart", resourceRoot, removeDamage ) But it doesn't work can anyone help me?? Thanks for all!
Moderators IIYAMA Posted April 7, 2014 Moderators Posted April 7, 2014 clientside addEventHandler ( "onClientPlayerDamage",localPlayer, function ( attacker, weapon, bodypart) if weapon == 23 then cancelEvent() end end)
AlfaMTA Posted April 7, 2014 Author Posted April 7, 2014 clientside addEventHandler ( "onClientPlayerDamage",localPlayer, function ( attacker, weapon, bodypart) if weapon == 23 then cancelEvent() end end) Unfortunaly, it doesn't work for me!
50p Posted April 7, 2014 Posted April 7, 2014 clientside addEventHandler ( "onClientPlayerDamage",localPlayer, function ( attacker, weapon, bodypart) if weapon == 23 then cancelEvent() end end) Unfortunaly, it doesn't work for me! Because it's client-side.
Noki Posted April 9, 2014 Posted April 9, 2014 By default, if undeclared in meta.xml, the script will become server-sided. So, you need to change it in meta.xml (add in type="client" />). Sometimes, you have to make things client side... It's just how it works.
AlfaMTA Posted April 9, 2014 Author Posted April 9, 2014 Sorry everyone!! Actually It's works, I did a mess with name of script and I forgot to save the script Thanks for all!!
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