yasin0 Posted May 30, 2017 Share Posted May 30, 2017 (edited) شباب الحين انا سويت ذي الكلمات aTable = { "سبحان الله وبحمده سبحان الله العظيم", "لا اله الا الله" } for _,v in ipairs (aTable) do function a (player) givePlayerMoney(source,99) end end addEventHandler("onPlayerChat",root,a) السؤال الحين كيف اسوي outputchatbox لكل كلمة يعني اول شيء يكتب الكلمة سبحان الله وبحمده وبعد كم ثانية يكتب لا اله الا الله واول مايكتبوهم يسوون destoryElment بالجداول بس كيف ؟ يعني اول واحد يكتب الكلمة يسويله destroyElement بعدين تطلع الكلمة الثانية بعد كم ثانية ويكرر الحركة كيف ؟ Edited May 30, 2017 by yasin0 Link to comment
#BrosS Posted May 30, 2017 Share Posted May 30, 2017 aTable = nil or aTable = {} setTimer والكود فوق كله غلط Link to comment
yasin0 Posted May 30, 2017 Author Share Posted May 30, 2017 انا مجربه ويضبط ومافي خطاء بالدي بق كيف خطاء طيب عطني مثال كيف احط قيمة الجدول لا شيء Link to comment
#BrosS Posted May 30, 2017 Share Posted May 30, 2017 addEventHandler("onPlayerChat",root, function(msg) for _,v in ipairs (aTable) do if msg == v then givePlayerMoney(source, 2000) aTable = {} end end end) Link to comment
yasin0 Posted May 30, 2017 Author Share Posted May 30, 2017 ماضبط aTable = { "سبحان الله وبحمده سبحان الله العظيم", "لا اله الا الله" } for _,v in ipairs (aTable) do setTimer( function (aMessage, aType) outputChatBox(v) if aType == 0 and aMessage == v then end givePlayerMoney(source,99) aTable = {} end end,1000,0 addEventHandler("onPlayerChat",root,a) Link to comment
iKSApro Posted May 30, 2017 Share Posted May 30, 2017 (edited) 27 minutes ago, yasin0 said: ماضبط aTable = { "سبحان الله وبحمده سبحان الله العظيم", "لا اله الا الله" } for _,v in ipairs (aTable) do setTimer( function (aMessage, aType) outputChatBox(v) if aType == 0 and aMessage == v then end givePlayerMoney(source,99) aTable = {} end end,1000,0 addEventHandler("onPlayerChat",root,a) انت مو معرفها وتحت معرفها في a الوظيفه وناقصتك كم end Edited May 30, 2017 by iKSApro Link to comment
^iiEcoo'x_) Posted May 31, 2017 Share Posted May 31, 2017 aTable = { "سبحان الله وبحمده سبحان الله العظيم", "لا اله الا الله" } for _,v in ipairs (aTable) do function a (aMessage, aType) setTimer ( function ( ) outputChatBox(v) if aType == 0 and aMessage == v then givePlayerMoney(source,99) aTable = {} end end , 1000*3 , 0 ) end addEventHandler("onPlayerChat",root,a) end Link to comment
MR.StoRm Posted May 31, 2017 Share Posted May 31, 2017 2 hours ago, #_iMr.[E]coo said: aTable = { "سبحان الله وبحمده سبحان الله العظيم", "لا اله الا الله" } for _,v in ipairs (aTable) do function a (aMessage, aType) setTimer ( function ( ) outputChatBox(v) if aType == 0 and aMessage == v then givePlayerMoney(source,99) aTable = {} end end , 1000*3 , 0 ) end addEventHandler("onPlayerChat",root,a) end مو المفروض يكون الحدث آخر سطر ذذ ! ؟ Link to comment
^iiEcoo'x_) Posted May 31, 2017 Share Posted May 31, 2017 54 minutes ago, MR.StoRm 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