WASSIm. Posted June 12, 2013 Share Posted June 12, 2013 hi guys how remove triggerClientEvent addEventHandler("onColShapeHit", getRootElement(), function test (hitElement) if (source == zone) and getElementType ( hitElement ) == "player" then triggerClientEvent ("BARhealth", hitElement, nemesis) end end) addEventHandler("onColShapeLeave", getRootElement(), function (leaveElement) if (source == zone) and getElementType ( leaveElement ) == "player" then triggerClientEvent ("BARhealth", hitElement, nemesis) end end) Link to comment
xXMADEXx Posted June 12, 2013 Share Posted June 12, 2013 Not sure what you mean... addEventHandler("onColShapeHit", getRootElement(), function test (hitElement) if (source == zone) and getElementType ( hitElement ) == "player" then -- triggerClientEvent ("BARhealth", hitElement, nemesis) end end) addEventHandler("onColShapeLeave", getRootElement(), function (leaveElement) if (source == zone) and getElementType ( leaveElement ) == "player" then -- triggerClientEvent ("BARhealth", hitElement, nemesis) end end) ? Link to comment
WASSIm. Posted June 12, 2013 Author Share Posted June 12, 2013 no no no i want if player hit zone start triggerClientEvent and if stop remove triggerClientEvent Link to comment
xXMADEXx Posted June 12, 2013 Share Posted June 12, 2013 Still don't really understand. But from what i can understand i guess you could do this: addEventHandler("onColShapeHit", getRootElement(), function test (hitElement) if (source == zone) and getElementType ( hitElement ) == "player" then triggerClientEvent ( hitElement, "BARhealth.start", hitElement, nemesis) end end) addEventHandler("onColShapeLeave", getRootElement(), function (leaveElement) if (source == zone) and getElementType ( leaveElement ) == "player" then triggerClientEvent ( leaveElement, "BARhealth.stop", leaveElement , nemesis) end end) Link to comment
WASSIm. Posted June 12, 2013 Author Share Posted June 12, 2013 Still don't really understand. But from what i can understand i guess you could do this: addEventHandler("onColShapeHit", getRootElement(), function test (hitElement) if (source == zone) and getElementType ( hitElement ) == "player" then triggerClientEvent ( hitElement, "BARhealth.start", hitElement, nemesis) end end) addEventHandler("onColShapeLeave", getRootElement(), function (leaveElement) if (source == zone) and getElementType ( leaveElement ) == "player" then triggerClientEvent ( leaveElement, "BARhealth.stop", leaveElement , nemesis) end end) not nothing Link to comment
Moderators IIYAMA Posted June 12, 2013 Moderators Share Posted June 12, 2013 remove events before you can trigger again? Link to comment
WASSIm. Posted June 12, 2013 Author Share Posted June 12, 2013 remove events before you can trigger again? thx but i fixed it thx 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