mrvicio Posted July 27, 2011 Share Posted July 27, 2011 hi all this is my first post ^^ im trying to cancel the event "onTrailerAtach" addEventHandler("onTrailerAtach",getRootElement(),function() cancelEvent() end) but to me, it doesnt work, someone have tried it? Link to comment
Jaysds1 Posted July 27, 2011 Share Posted July 27, 2011 try this: addEventHandler("onClientTrailerAttach", getRootElement(), function() cancelEvent() end) Link to comment
Castillo Posted July 27, 2011 Share Posted July 27, 2011 Maybe it doesn't work because is "onTrailerAttach" not "onTrailerAtach"...? addEventHandler("onTrailerAttach",getRootElement(),function() cancelEvent() end) Link to comment
Jaysds1 Posted July 27, 2011 Share Posted July 27, 2011 I know but I made it client-side... There's was no use making it server-sided. Link to comment
JR10 Posted July 27, 2011 Share Posted July 27, 2011 There is, check the wiki. If this event is canceled, the trailer will detach from the truck again. Link to comment
mrvicio Posted July 28, 2011 Author Share Posted July 28, 2011 i have tested both, clien-side and serverside, and it didnt work, im the only one? Link to comment
Jaysds1 Posted July 28, 2011 Share Posted July 28, 2011 It's suppose to work Server-side... Try this: addEventHandler("onTrailerAttach",getRootElement(), function() wasEventCancelled(canelEvent()) end) Link to comment
Twisted Posted July 28, 2011 Share Posted July 28, 2011 jaysds1 please check your code before posting ive seen another error Link to comment
JR10 Posted July 28, 2011 Share Posted July 28, 2011 It's suppose to work Server-side...Try this: addEventHandler("onTrailerAttach",getRootElement(), function() wasEventCancelled(canelEvent()) end) Seriously what are you posting, wasEventCancelled is used to check if the even was cancelled, and it doesn't have any arguments. Link to comment
Jaysds1 Posted July 28, 2011 Share Posted July 28, 2011 it's just like the isCursorShowing(showCursor()). But I'll change it: addEventHandler("onTrailerAttach",getRootElement(), function() if ( not wasEventCancelled() ) then cancelEvent() end) Link to comment
JR10 Posted July 28, 2011 Share Posted July 28, 2011 isCursorShowing(showCursor()) Won't work too, will just do the normal. 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