Xwad Posted March 28, 2015 Share Posted March 28, 2015 Hi i want to disable the heatseeking on weapon 36. I mean disable that the projectile cant follow the vehicle. I have a script but it dosent work. -- this would stop projectile from being created if it wants to target someone function disableHeatSeek() if getProjectileTarget(source) then cancelEvent() end end addEventHandler("onClientProjectileCreation",root,disableHeatSeek) Link to comment
WhoAmI Posted March 28, 2015 Share Posted March 28, 2015 Do NOT create second topic if you already have one, lol. Link to comment
Xwad Posted March 28, 2015 Author Share Posted March 28, 2015 But you dont answered:/ Link to comment
Xwad Posted March 28, 2015 Author Share Posted March 28, 2015 Just pls tell me why does it not work. Link to comment
WhoAmI Posted March 28, 2015 Share Posted March 28, 2015 addEventHandler ( "onClientProjectileCreation", root, function ( ) if ( getProjectileType ( source ) == 20 ) then destroyElement ( source ) end end ) Put it on client side. Link to comment
MIKI785 Posted March 28, 2015 Share Posted March 28, 2015 addEventHandler ( "onClientProjectileCreation", root, function ( ) if ( getProjectileType ( source ) == 20 ) then destroyElement ( source ) end end ) Put it on client side. If youre going to destroy a rocket it will actually explode, possibly killing the player firing it. I'd change the dimension first. Link to comment
Xwad Posted March 28, 2015 Author Share Posted March 28, 2015 Thanks but i have a porblem. When i shoot the car and its not targeted (green) then i can shoot but when targeted (red) then the projectile is blowing up in front of me. Link to comment
WhoAmI Posted March 28, 2015 Share Posted March 28, 2015 Well, didn't know that. If so, use that addEventHandler ( "onClientProjectileCreation", root, function ( ) if ( getProjectileType ( source ) == 20 ) then setElementDimension ( source, math.random ( 2, 999 ) ) destroyElement ( source ) end end ) Link to comment
Xwad Posted March 28, 2015 Author Share Posted March 28, 2015 its not working:/ it is blowing in front of me again Link to comment
WhoAmI Posted March 28, 2015 Share Posted March 28, 2015 I have no idea how to do that, sorry. Link to comment
TAPL Posted March 28, 2015 Share Posted March 28, 2015 addEventHandler("onClientProjectileCreation", root, function() if getProjectileType(source) == 20 and getProjectileTarget(source) then setElementPosition(source, 0, 0, -2000) destroyElement(source) end end) Link to comment
Einheit-101 Posted April 1, 2015 Share Posted April 1, 2015 I made the same thing and just cancelled the explosion event But it had issues because the explosion was not cancelled for other players AND the new created missile was not synced with other clients, so I had a serious sync issue. I did not continue developing this since then due to lack of time but I will continue soon. 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