AlfaMTA Posted April 7, 2014 Share 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! Link to comment
Moderators IIYAMA Posted April 7, 2014 Moderators Share Posted April 7, 2014 clientside addEventHandler ( "onClientPlayerDamage",localPlayer, function ( attacker, weapon, bodypart) if weapon == 23 then cancelEvent() end end) Link to comment
AlfaMTA Posted April 7, 2014 Author Share 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! Link to comment
50p Posted April 7, 2014 Share 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. Link to comment
Noki Posted April 9, 2014 Share 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. Link to comment
AlfaMTA Posted April 9, 2014 Author Share 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!! 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