+Source|> Posted November 9, 2017 Share Posted November 9, 2017 كيف اسوي تايمر للشات يعني لما احد يمسح الشات لازم تنتظر 5 ثواني بعدين تمسح Link to comment
MR.StoRm Posted November 9, 2017 Share Posted November 9, 2017 table isTimer setTimer Link to comment
Doffy Posted November 9, 2017 Share Posted November 9, 2017 Just now, MR.StoRm said: table isTimer setTimer ايضا يمكن تستخدم الداتا بدل الجداول 1 Link to comment
+Source|> Posted November 9, 2017 Author Share Posted November 9, 2017 2 minutes ago, #Himoo said: ايضا يمكن تستخدم الداتا بدل الجداول ممكن شرح Link to comment
' A F . Posted November 9, 2017 Share Posted November 9, 2017 local t = { } addCommandHandler ( "exm" , function (plr) if ( isTimer ( t[plr] ) ) then outputChatBox("* إنتظر",plr) return end t[plr] = setTimer ( function ( ) end,3000,1) outputChatBox("Hi",plr) end) مثآل بسيط . 1 Link to comment
Rockyz Posted November 10, 2017 Share Posted November 10, 2017 مثال آخر من دون استعمال تيبل ولا تايمر local waitingTime = 3 -- الثواني addCommandHandler ( 'justAtest', function ( plr, cmd ) if ( getTickCount ( ) - ( lastTick or 0 ) >= ( waitingTime * 1000 ) ) then outputChatBox ( 'Done', plr, 0, 255, 0, true ) lastTick = getTickCount ( ); else outputChatBox ( 'Please wait ', plr, 255, 0, 0 , true ) 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