MR_Mahmoud Posted July 9, 2018 Share Posted July 9, 2018 السلام عليكم اخوتي هاد مود فلشر يشتغل لما تكتب شي في اف8 vehicles = {} function toggleFlashingLights ( thePlayer, key, keyState ) if getPlayerOccupiedVehicleSeat ( thePlayer ) == 0 then if vehicles[getPlayerOccupiedVehicle ( thePlayer )] then killTimer ( vehicles[getPlayerOccupiedVehicle ( thePlayer )] ) vehicles[getPlayerOccupiedVehicle ( thePlayer )] = nil else vehicles[getPlayerOccupiedVehicle ( thePlayer )] = setTimer ( toggleVehicleLights, 500, 0, getPlayerOccupiedVehicle ( thePlayer ) ) end end end addCommandHandler ( "flash", toggleFlashingLights ) function toggleVehicleLights ( car ) if ( getVehicleOverrideLights ( car ) ~= 2 ) then setVehicleOverrideLights ( car, 2 ) else setVehicleOverrideLights ( car, 1 ) end end هاد يشغل فلشر بطيء بدي لما اضغط علا زر معين يشتغل بطيئ ولما اضغط مره ثانية يشتغل سريع ولما اضغط الثالثة يطفى حاولت ماصار معي Link to comment
MR_Mahmoud Posted July 9, 2018 Author Share Posted July 9, 2018 (edited) vehicles = {} function toggleFlashingLights ( thePlayer, key, keyState ) if getPlayerOccupiedVehicleSeat ( thePlayer ) == 0 then if vehicles[getPlayerOccupiedVehicle ( thePlayer )] then killTimer ( vehicles[getPlayerOccupiedVehicle ( thePlayer )] ) vehicles[getPlayerOccupiedVehicle ( thePlayer )] = nil else vehicles[getPlayerOccupiedVehicle ( thePlayer )] = setTimer ( toggleVehicleLights, 500, 0, getPlayerOccupiedVehicle ( thePlayer ) ) end end end addCommandHandler ( "flash", toggleFlashingLights ) function toggleVehicleLights ( car ) if ( getVehicleOverrideLights ( car ) ~= 2 ) then setVehicleOverrideLights ( car, 2 ) else setVehicleOverrideLights ( car, 1 ) end end ---------------------2 vehicles = {} function toggleFlashingLights2 ( thePlayer, key, keyState ) if getPlayerOccupiedVehicleSeat ( thePlayer ) == 0 then if vehicles[getPlayerOccupiedVehicle ( thePlayer )] then killTimer ( vehicles[getPlayerOccupiedVehicle ( thePlayer )] ) vehicles[getPlayerOccupiedVehicle ( thePlayer )] = nil else vehicles[getPlayerOccupiedVehicle ( thePlayer )] = setTimer ( toggleVehicleLights22, 100, 0, getPlayerOccupiedVehicle ( thePlayer ) ) end end end addCommandHandler ( "flash2", toggleFlashingLights2 ) function toggleVehicleLights22 ( car ) if ( getVehicleOverrideLights ( car ) ~= 2 ) then setVehicleOverrideLights ( car, 2 ) else setVehicleOverrideLights ( car, 1 ) end end 8 hours ago, Rakan# said: محاولتك طيب؟ Edited July 9, 2018 by MR_Mahmoud Link to comment
Mr.Mostafa Posted July 9, 2018 Share Posted July 9, 2018 تبيه زر من لوحة ولآ زر من آلكيبورد؟ 1 Link to comment
MR_Mahmoud Posted July 10, 2018 Author Share Posted July 10, 2018 4 hours ago, Mr.Mostafa said: تبيه زر من لوحة ولآ زر من آلكيبورد؟ الكيبورد من زر z Link to comment
MR_Mahmoud Posted July 14, 2018 Author Share Posted July 14, 2018 On 09.07.2018 at 21:37, Mr.Mostafa said: تبيه زر من لوحة ولآ زر من آلكيبورد؟ للحين استناك ذذ Link to comment
SycroX Posted July 14, 2018 Share Posted July 14, 2018 addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do bindKey(player, "z", "down", toggleFlashingLights, player) end end ) addEventHandler("onPlayerJoin", root, function() bindKey(source, "z", "down", toggleFlashingLights, source) end ) ضيفهم لكودك Link to comment
MR_Mahmoud Posted July 14, 2018 Author Share Posted July 14, 2018 (edited) Just now, #َxLysandeR said: addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do bindKey(player, "z", "down", toggleFlashingLights, player) end end ) addEventHandler("onPlayerJoin", root, function() bindKey(source, "z", "down", toggleFlashingLights, source) end ) ضيفهم لكودك اي بس انا بدي لما اضغط اول مره يشغل الفلشر الي فوق يعني البطيء ولما اضغط مره ثانية يطفي الأول ويشغل الفلشر الثاني السريع + ممكن تشرحلي ليش عند الدخول لسيرفر الي حاطه انت لو سمحت addEventHandler("onPlayerJoin", root, function() bindKey(source, "z", "down", toggleFlashingLights, source) end ) Edited July 14, 2018 by MR_Mahmoud Link to comment
#Sn[i]pêŘ Posted July 30, 2018 Share Posted July 30, 2018 On 14/7/2018 at 13:57, MR_Mahmoud said: للحين استناك ذذ مسكين هرب عليك ههههههه 1 Link to comment
MR_Mahmoud Posted July 30, 2018 Author Share Posted July 30, 2018 1 minute ago, #SnpêŘ said: مسكين هرب عليك ههههههه اصلا الفكرة كلها تسوي لاق ذذ 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