TheGamingMann Posted December 14, 2014 Posted December 14, 2014 (edited) I am not quite sure what is going on. But my script keeps giving me this error and its not working. Here's my code: function cancelDamage() cancelEvent() end addEventHandler("onClientDamage", getLocalPlayer(), cancelDamage) This is a client side script as well. Edited December 14, 2014 by Guest
Anubhav Posted December 14, 2014 Posted December 14, 2014 It's onClientPlayerDamage . + show us meta.xml if it still occurs See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
ViRuZGamiing Posted December 14, 2014 Posted December 14, 2014 addEventHandler ( "onClientPlayerDamage", getRootElement(), cancelEvent ) Should work aswell; addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), cancelEvent ) It's just the event name as Anubhav mentioned. "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
TheGamingMann Posted December 14, 2014 Author Posted December 14, 2014 function cancelEvent() cancelEvent() setElementHealth(getRootElement(), 100) outputChatBox("Test") end addEventHandler("onClientPlayerDamage", getRootElement(), cancelEvent) Thats the new code. None of those in the function are running. Here is my meta.xml "TheGamingMann" name="Server Info" version="1.0" description="Sets the server info on resource start."/>
ViRuZGamiing Posted December 14, 2014 Posted December 14, 2014 give the function another name then cancelEvent "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
TheGamingMann Posted December 14, 2014 Author Posted December 14, 2014 I FEEL SO DUMB... I spelt type wrong in my meta... Fixed it.
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