MYSOTO Posted August 6, 2017 Share Posted August 6, 2017 (edited) Hi believe this rs what happens is that the effects are only seen on the side of the user osea client and the others can not see it I would like to help me to turn it server side x, y, z = getElementPosition(player) fx2 = createEffect("flame", x, y, z-1000) fx3 = createEffect("flame", x, y, z-1000) fx4 = createEffect("flame", x, y, z-1000) function fire() setEffectDensity(fx2, 2) setEffectSpeed(fx2, 1) setObjectScale ( fx2, 0.5) attachElements (fx,localPlayer, 0, 0, 5 ) setWeaponProperty(8, "damage", 100) end addCommandHandler("fire", fire) function disableMinigunOnSwitch ( player, prevSlot, newSlot ) if getPedWeapon(player(),newSlot) == 8 then --if the switched weapon is the minigun exports.bone_attach:attachElementToBone(fx2,player,12,0,0,0.1,0,0,0) exports.bone_attach:attachElementToBone(fx3,player,12,-1,0,0.1,0,0,0) exports.bone_attach:attachElementToBone(fx4,player,12,-0.5,0,0.1,0,0,0) else --if it isnt the minigun exports.bone_attach:detachElementFromBone(fx) exports.bone_attach:detachElementFromBone(fx2) exports.bone_attach:detachElementFromBone(fx3) exports.bone_attach:detachElementFromBone(fx4) setElementPosition ( fx2, x, y, z-1000 ) setElementPosition ( fx3, x, y, z-1000 ) setElementPosition ( fx4, x, y, z-1000 ) end end addEventHandler ( "onClientPlayerWeaponSwitch", getRootElement(), disableMinigunOnSwitch ) function stopMinigunDamage ( attacker, weapon, bodypart ) if ( weapon == 8 ) then --if the weapon used was the minigun createFire(x, y, z, 2) --cancel the event end end addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), stopMinigunDamage ) Edited August 6, 2017 by MystoganScripter Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 (edited) Wrong language section mate. Edited August 6, 2017 by NeXuS™ Link to comment
MYSOTO Posted August 6, 2017 Author Share Posted August 6, 2017 3 minutes ago, NeXuS™ said: Wrong language section mate. Sorry I already put it in the correct language Link to comment
MYSOTO Posted August 6, 2017 Author Share Posted August 6, 2017 2 minutes ago, NeXuS™ said: Use [ code] tags please. ready Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 (edited) You'll have to use custom events and then trigger them from the server-side. Edited August 6, 2017 by NeXuS™ Link to comment
MYSOTO Posted August 6, 2017 Author Share Posted August 6, 2017 3 minutes ago, NeXuS™ said: You'l have to use custom events and then trigger them from the server-side. If I use triggerclientvent you think it will look server side Link to comment
NeXuS™ Posted August 6, 2017 Share Posted August 6, 2017 You'll need to make the script server-sided, edit it so it works fine and then create the effects on client-side, make a custom event on client-side and then trigger that event from server-side. Link to comment
MYSOTO Posted August 6, 2017 Author Share Posted August 6, 2017 1 hour ago, MystoganScripter said: Link to comment
MisterQuestions Posted August 6, 2017 Share Posted August 6, 2017 Simple, retrigger to everyone and thats it. 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