diegofkda Posted March 25, 2011 Posted March 25, 2011 I was making this script function timers() setTimer ( playerinfo2, 50, 0) end addCommandHandler ("explosions", timers) function playerinfo2() local vehicle = getPedOccupiedVehicle (getLocalPlayer()) local x, y, z = getElementPosition ( vehicle ) if ( getElementVelocity(vehicle) == 100 ) then createExplosion ( x, y, z-4, 12 ) else end end Yes, it works correctly, as you can see, when the vehicle goes to 100, it will make an explosion near it. but i want to make the explosion when the vehicle goes MORE than 100, how to do it? "Everything exists, because otherwise nothing would", Bob Marley, 2015.
Kenix Posted March 25, 2011 Posted March 25, 2011 I was making this script function timers() setTimer ( playerinfo2, 50, 0) end addCommandHandler ("explosions", timers) function playerinfo2() local vehicle = getPedOccupiedVehicle (getLocalPlayer()) local x, y, z = getElementPosition ( vehicle ) if ( getElementVelocity(vehicle) == 100 ) then createExplosion ( x, y, z-4, 12 ) else end end Yes, it works correctly, as you can see, when the vehicle goes to 100, it will make an explosion near it. but i want to make the explosion when the vehicle goes MORE than 100, how to do it? try this function timers() setTimer ( playerinfo2, 50, 0) end addCommandHandler ("explosions", timers) function playerinfo2() local vehicle = getPedOccupiedVehicle (getLocalPlayer()) local x, y, z = getElementPosition ( vehicle ) if ( getElementVelocity(vehicle) >= 100 ) then createExplosion ( x, y, z-4, 12 ) else end end and translate this http://www.lua.ru/doc/2.5.2.html and read http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
diegofkda Posted March 25, 2011 Author Posted March 25, 2011 I was making this script function timers() setTimer ( playerinfo2, 50, 0) end addCommandHandler ("explosions", timers) function playerinfo2() local vehicle = getPedOccupiedVehicle (getLocalPlayer()) local x, y, z = getElementPosition ( vehicle ) if ( getElementVelocity(vehicle) == 100 ) then createExplosion ( x, y, z-4, 12 ) else end end Yes, it works correctly, as you can see, when the vehicle goes to 100, it will make an explosion near it. but i want to make the explosion when the vehicle goes MORE than 100, how to do it? try this function timers() setTimer ( playerinfo2, 50, 0) end addCommandHandler ("explosions", timers) function playerinfo2() local vehicle = getPedOccupiedVehicle (getLocalPlayer()) local x, y, z = getElementPosition ( vehicle ) if ( getElementVelocity(vehicle) >= 100 ) then createExplosion ( x, y, z-4, 12 ) else end end and translate this http://www.lua.ru/doc/2.5.2.html and read lol ok ty "Everything exists, because otherwise nothing would", Bob Marley, 2015.
Kenix Posted March 25, 2011 Posted March 25, 2011 this work? http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
diegofkda Posted March 25, 2011 Author Posted March 25, 2011 this work? Works but I'm seeing many getElementVelocity bugs. "Everything exists, because otherwise nothing would", Bob Marley, 2015.
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