Xwad Posted March 12, 2015 Share Posted March 12, 2015 Hi I got a script that allows to demage the rhino with explosions but it does not work.. Why?is it client side? Link to comment
Castillo Posted March 12, 2015 Share Posted March 12, 2015 Show us the script, or else we can't help you. Link to comment
Xwad Posted March 13, 2015 Author Share Posted March 13, 2015 ohh yes i forgot it boom = { [35]=true, [36]=true, [37]=true, [38]=true, [16]=true, [17]=true, [18]=true, [39]=true, } addEventHandler( "onClientPlayerWeaponFire", root, function( weapon, ammo, clip, , , _, element ) local target = element if getElementType( target ) == "vehicle" then local model = getElementModel( target ) if model == 432 and boom[ weapon ] then blowVehicle( target ) end end end ) Link to comment
TAPL Posted March 13, 2015 Share Posted March 13, 2015 And you should use this event for explosive weapons. https://wiki.multitheftauto.com/wiki/OnClientExplosion And a trigger to server side to blow the rhino is required. Link to comment
Xwad Posted March 14, 2015 Author Share Posted March 14, 2015 is there server side correct? function onClientExplosion(x,y,z,theType) if (weapon == 35) or if (weapon == 36) then setElementHealth(source,getElementHealth(source) - 350) end addEvent("onClientPlayerWeaponFire", true) addEventHandler("onClientPlayerWeaponFire", getRootElement(), onClientExplosion) Link to comment
Mr.unpredictable. Posted March 14, 2015 Share Posted March 14, 2015 is there server side correct? function onClientExplosion(x,y,z,theType) if (weapon == 35) or if (weapon == 36) then setElementHealth(source,getElementHealth(source) - 350) end addEvent("onClientPlayerWeaponFire", true) addEventHandler("onClientPlayerWeaponFire", getRootElement(), onClientExplosion) This is client side + if (weapon == 35) or if (weapon == 36) It is wrong, rocket launcher is a projectile and it's id is 19 and Heat-Seeking RPG id is 20. 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