MR.KFO Posted November 5, 2015 Share Posted November 5, 2015 السلام عليكم انا عملت زر جاي لما يضغط عليه يخليه يطير لمدة 5 دقائق وبعدين ما يطير انا محاولتي اني قفلت الزر لمدة 4 ساعات بس ما عرفت اخلي يطير لمدة 5 دقائق انا ابيه يطير بالسيارة لمدة 5 دقائق وبعدين ما يقدر يطير setWorldSpecialPropertyEnabled("aircars", true) مساعدة رجاءا Link to comment
YourMind Posted November 5, 2015 Share Posted November 5, 2015 setWorldSpecialPropertyEnabled("aircars", true) setTimer(function()setWorldSpecialPropertyEnabled("aircars", false)end,300000,1) Link to comment
z24d Posted November 5, 2015 Share Posted November 5, 2015 addEventHandler('onClientGUIClick',اسم الزر, function() setWorldSpecialPropertyEnabled("aircars", true) setTimer(setWorldSpecialPropertyEnabled,5*60*1000,1,"aircars", false) end ) -- | Link to comment
MR.KFO Posted November 5, 2015 Author Share Posted November 5, 2015 addEventHandler('onClientGUIClick',اسم الزر, function() setWorldSpecialPropertyEnabled("aircars", true) setTimer(setWorldSpecialPropertyEnabled,5*60*1000,1,"aircars", false) end ) -- | طيب انا مخلي الزر يطفي لمدة 2 ساعة بس لما الالمنت الاعب يطلع من السيرفر ويدخل الزر يرجع بدون ما يعدي 2 ساعات Link to comment
Rockyz Posted November 5, 2015 Share Posted November 5, 2015 addEventHandler('onClientGUIClick',اسم الزر, function() setWorldSpecialPropertyEnabled("aircars", true) setTimer(setWorldSpecialPropertyEnabled,5*60*1000,1,"aircars", false) end ) -- | ^ timeToEnd = 5 -- عدد الدقائق للانتهاء addEventHandler ( 'onClientGUIClick', button, function ( ) setWorldSpecialPropertyEnabled ( 'aircars', true ) setTimer ( setWorldSpecialPropertyEnabled, timeToEnd * 50000, 1, 'aircars', false ) end, false ) Link to comment
MR.KFO Posted November 5, 2015 Author Share Posted November 5, 2015 (edited) addEventHandler('onClientGUIClick',اسم الزر, function() setWorldSpecialPropertyEnabled("aircars", true) setTimer(setWorldSpecialPropertyEnabled,5*60*1000,1,"aircars", false) end ) -- | ^ timeToEnd = 5 -- عدد الدقائق للانتهاء addEventHandler ( 'onClientGUIClick', button, function ( ) setWorldSpecialPropertyEnabled ( 'aircars', true ) setTimer ( setWorldSpecialPropertyEnabled, timeToEnd * 50000, 1, 'aircars', false ) end, false ) انا قصدي لما عملت الزر يطفي لمدة ساعتين في (بق) انه اللاعب لو خرج ودخل الزر يفتح elseif ( source == ButtomName ) then guiSetEnabled(ButtomName, false) setTimer(guiSetEnabled, 600000*2, 1, ButtomName, true) Edited November 5, 2015 by Guest Link to comment
Rockyz Posted November 5, 2015 Share Posted November 5, 2015 (edited) جرب timeToEnd = 5 -- عدد الدقائق للانتهاء addEventHandler ( 'onClientGUIClick', resourceRoot, function ( ) if ( source == btnn2 ) then if ( getElementData ( localPlayer, 'Enbll' ) ~= true ) then guiSetEnabled ( btnn2, false ) setWorldSpecialPropertyEnabled ( 'aircars', true ) setElementData ( localPlayer, 'Enbll', true ) setTimer ( function ( ) guiSetEnabled ( btnn2, true ) setWorldSpecialPropertyEnabled ( 'aircars', false ) setElementData ( localPlayer, 'Enbll', nil ) end, timeToEnd * 50000, 1 ) end end end ) Edited November 5, 2015 by Guest Link to comment
MR.KFO Posted November 5, 2015 Author Share Posted November 5, 2015 elseif source == bttn5 then timeToEnd = 5 -- عدد الدقائق للانتهاء if ( getElementData ( localPlayer, 'Enbll' ) ~= true ) then guiSetEnabled ( btnn2, true ) setWorldSpecialPropertyEnabled ( 'aircars', true ) setElementData ( localPlayer, 'Enbll', true ) setTimer ( function ( ) guiSetEnabled ( btnn2, false ) setWorldSpecialPropertyEnabled ( 'aircars', false ) setElementData ( localPlayer, 'Enbll', nil ) end, timeToEnd * 50000, 1 ) end التايمر ما يظبط Link to comment
Rockyz Posted November 5, 2015 Share Posted November 5, 2015 addEventHandler ( 'onClientGUIClick', resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then if ( getElementData ( source, 'Enbll' ) ~= true ) then guiSetEnabled ( GUIEditor.button[1], false ) setWorldSpecialPropertyEnabled ( 'aircars', true ) setElementData ( source, 'Enbll', true ) setTimer ( function ( ) guiSetEnabled ( GUIEditor.button[1], true ) setWorldSpecialPropertyEnabled ( 'aircars', false ) setElementData ( source, 'Enbll', nil ) end, timeToEnd * 50000, 1 ) end end end ) 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