Scripting Posted April 27, 2012 Share Posted April 27, 2012 Hi People, I want just a code to set Bullets weapon (Rocket Luncher) don t explod or hit and thx. Link to comment
Al3grab Posted April 27, 2012 Share Posted April 27, 2012 function ClientExplosionFunction(x,y,z,theType) if ( theType and theType == 2 or theType == 3 ) then cancelEvent() end end addEventHandler("onClientExplosion",getRootElement(),ClientExplosionFunction) Link to comment
Kenix Posted April 27, 2012 Share Posted April 27, 2012 (edited) function ClientExplosionFunction(x,y,z,theType) if ( theType and theType == 2 or theType == 3 ) then cancelEvent() end end addEventHandler("onClientExplosion",getRootElement(),ClientExplosionFunction) This event not canceled. Edited April 27, 2012 by Guest Link to comment
Scripting Posted April 27, 2012 Author Share Posted April 27, 2012 and How i can not cancelEvent() ? This code exist in gameMode BaseMode? How i can change it??! Link to comment
Al3grab Posted April 27, 2012 Share Posted April 27, 2012 since you don't want to use rockets just remove it from the creation addEventHandler("onClientProjectileCreation",root,function(creator) --- this event cannot be canceled too. local nType = getProjectileType(source) --- get the projectile type if ( nType == 19 or nType == 20 ) then --- if its a rocket launcher , or a heat seek then setTimer(setElementPosition,50,1,source,0,0,999*999) --- since it cant be canceled , move it up to the sky [ you can remove the timer i just used it to see the rocket creation ] end --- end end ) -- end and to close event ) 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