; Mr.T76eM # Posted June 5, 2015 Share Posted June 5, 2015 السلام عليكم عندي مشكلة في عمل جداول لعدم خبرتي وما تعاملت معها كثير .. : ) اول شيء عندي سكربت طويل كل شيء تمام , صارت عندي مشكلة في عمل جدول بعطيكم الكود : اول شيء جربت على حساب واحد بدون جدول . local AccountName = getAccountName(getPlayerAccount(source)) if ( not isGuestAccount(getPlayerAccount(source)) and AccountName == "Test" ) and msg == "TT" then cancelEvent() تمام اشتغل 100% يوم جربت اسوي جدول ما ينفع معي ماعرف وش الخطأ لان ما عندي خبرة بالجداول , ولاهنتم اشرحوا لي عشان اتعلم من اخطائي .. else local AccountName = getAccountName(getPlayerAccount(source)) BlackListed = {"--","--","--"} for _,theAcc in ipairs(BlackListed) do if ( not isGuestAccount(getPlayerAccount(source)) and AccountName == "theAcc" ) and msg == "TT" then cancelEvent() والسلام عليكم ورحمة الله وبركآتهُ Link to comment
The Killer Posted June 5, 2015 Share Posted June 5, 2015 else local AccountName = getAccountName(getPlayerAccount(source)) BlackListed = {"--","--","--"} for _,theAcc in ipairs(BlackListed) do if ( not isGuestAccount(getPlayerAccount(source)) and AccountName == theAcc ) and msg == "TT" then cancelEvent() Link to comment
; Mr.T76eM # Posted June 5, 2015 Author Share Posted June 5, 2015 مشكور جداً كل المشكلة كانت اني حاطط سترنق ؟ ولا في شيء اخر خطأ . -- مشكلة ثانية يوم حطيت الجدول وتحققت شروط الكود (يعني اذا ما كان اسم الحساب كذا) الكلام يتكرر 3 مرات لكن بدون الجدول يكون عادي عندك حل ولا وش ؟ Link to comment
The Killer Posted June 6, 2015 Share Posted June 6, 2015 else local AccountName = getAccountName(getPlayerAccount(source)) BlackListed = {"--","--","--"} for _,theAcc in ipairs(BlackListed) do if ( not isGuestAccount(getPlayerAccount(source)) and AccountName == theAcc ) and msg == "TT" then cancelEvent() break Link to comment
M7MD# Posted June 6, 2015 Share Posted June 6, 2015 ما يشتغل المود لانها ما تصلح الــ break على ما اظن Link to comment
; Mr.T76eM # Posted June 6, 2015 Author Share Posted June 6, 2015 else local AccountName = getAccountName(getPlayerAccount(source)) BlackListed = {"--","--","--"} for _,theAcc in ipairs(BlackListed) do if ( not isGuestAccount(getPlayerAccount(source)) and AccountName == theAcc ) and msg == "TT" then cancelEvent() break جربت التعديل لكن ما نفع معي السكربت ما تشتغل نهائياً مدري ليه .. وش وظيفه الكلمة break Link to comment
N3xT Posted June 6, 2015 Share Posted June 6, 2015 else local AccountName = getAccountName(getPlayerAccount(source)) BlackListed = {"--","--","--"} for _,theAcc in ipairs(BlackListed) do if ( not isGuestAccount(getPlayerAccount(source)) and AccountName == theAcc ) and msg == "TT" then cancelEvent() break جربت التعديل لكن ما نفع معي السكربت ما تشتغل نهائياً مدري ليه .. وش وظيفه الكلمة break break توقف الوظيفة أو الأيفنت .. تقدر تستخدمها مع تايمر كل مثلا 10 ثواني يوقف الوظيفة وبعدها يشغلها Link to comment
; Mr.T76eM # Posted June 8, 2015 Author Share Posted June 8, 2015 شف نوعاً ما ما في مشكلة لكن خطأ صغير هذا الي طلبته تحقق اذا كان اسم الحساب كذا ما يصير المطلوب , ----- لكن اذا صار المطلوب اذا ما كان اسم الحساب يطلع في الشات شيء مُعين .. الي يطلع في الشات صار يتكرر 4 مرّات يوم سويت الجدول , لكن اذا ما سويت جدول يكون عادي .. # المشكلة ذي وش سببها , و وش حلّها ! على كُل حال اذا ما تعرف حل للمشكلة مشكور , بارك الله بكك .. Link to comment
The Killer Posted June 8, 2015 Share Posted June 8, 2015 المشكله مو مشكلة ماتعرف الحل المشكله هي انك ايش تبي تسوي بالضبط لأني ماني فهام عليك ايش تبي تسوي فعشان كذا سألتك لاكن الي فهمته منك انك تبي اذا حسابه بالجدول ما يقدر يتكلم بالشات واذا مب بالجدول يقدر يتكلم .. عموما هذا كود نوعا ما نفس طلبك واذا مب نفس طلبك تقدر تستفيد منه + لو عندك مود تاج حط الكود معه لو ما معك حطه لحاله عشان لا يتكرر الكلام مرتين local BlackListed = {"acc1", "acc2", "acc3"} addEventHandler ("onPlayerChat", root, function (text) if not isGuestAccount (getPlayerAccount (source)) then local acc = getPlayerAccount (source) for _,v in ipairs (BlackListed) do if getAccountName (acc) == v then cancelEvent () outputChatBox ("Error - You are not allowed to talk.", source, 255, 0, 0) break else cancelEvent () outputChatBox (getPlayerName (source) .. ": " .. text, root, 255, 255, 255) break end 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