DarkByte Posted October 14, 2015 Share Posted October 14, 2015 Can someone help me to make a missile timer. When a player shoot a missle from hydra and then he will able to shoot after 5 seconds, how is this possible? Link to comment
LoOs Posted October 14, 2015 Share Posted October 14, 2015 Can someone help me to make a missile timer. When a player shoot a missle from hydra and then he will able to shoot after 5 seconds, how is this possible? addEventHandler 'onVehicleWeaponFire' cancelEvent setTimer removeEventHandler' Link to comment
DarkByte Posted October 14, 2015 Author Share Posted October 14, 2015 With a script please Link to comment
LoOs Posted October 14, 2015 Share Posted October 14, 2015 With a script please test :# addEventHandler('onVehicleWeaponFire',root, function () addEventHandler('onVehicleWeaponFire',root,cancelEvent) setTimer(function () removeEventHandler('onVehicleWeaponFire',root,cancelEvent) end ,5000,1) end ) Link to comment
Wumbaloo Posted October 14, 2015 Share Posted October 14, 2015 You forgot if getPedOccupiedVehicle == "Hydra" then Link to comment
TAPL Posted October 14, 2015 Share Posted October 14, 2015 onVehicleWeaponFire isn't mta native event, it's from useful function and this event cannot be cancelled. @Wumbaloo, getPedOccupiedVehicle return vehicle element, not string with vehicle name. @-Lemonade-, you will need toggleControl to disable the controls vehicle_fire and vehicle_secondary_fire when a player shoot from hydra and re-enable them after 5 secs. Link to comment
DarkByte Posted October 14, 2015 Author Share Posted October 14, 2015 Give me a script im not so advanced Link to comment
Noki Posted October 15, 2015 Share Posted October 15, 2015 Give me a script im not so advanced viewtopic.php?f=91&t=47897 NOTE: Please remember that this is not a forum for requests. We can help you with your code or question but we will not script for you. 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