Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- admin = "Isco#5327" -- اسم الادمن
- password = "8910" -- كلمة السرّ
- players={} -- لا تكتب أي شئ هنا
- system.disableChatCommandDisplay("password")
- function pw(name)
- print("<font color='#ffffff'> ! تم تفعيل كلمة السر فى بيت القبيلة")
- for name,player in pairs(tfm.get.room.playerList) do
- if name == admin then
- for poups, k in pairs({"1","2","3","4","5","6"}) do
- ui.removeTextArea(k, admin)
- end
- else
- ui.addTextArea(1, "", name, -1499, -1500, 3000, 3000, 0x000001, 0x000001, 1, true)
- ui.addTextArea(2, "", name, 5, 28, 789, 367, 0x544731, 0xffffff, 1, true)
- ui.addTextArea(3, "", name, 8, 31, 783, 361, 0x324650, 0x000000, 1, true)
- ui.addTextArea(4, "\n<p align='center'><font color='#babd2f' size='25' face='Comic Sans MS'><b>بيت القبيلة مُغلقٌ بكلمةِ سرّ</b>\n\n<p align='center'><font color='#babd2f' size='25' face='Comic Sans MS'>ادخِل كلمة السرّ هنا", name, 11, 34, 777, 355, 0x523d25, 0xc4621c, 1, true)
- ui.addTextArea(5, "<p align='center'><font color='#babd2f' size='25' face='Comic Sans MS'><b>"..players[name].txt.."", name, 231, 202, 344, 71, 0x324650, 0x000000, 0, true)
- ui.addTextArea(6, "<font color='#ffffff'>", name, 679, 359, 106, 27, 0x523d25, 0x000000, 1, true)
- ui.updateTextArea(6,"<font color='#009D9D'> "..players[name].try.." <font color='#ffffff'> : المحاولات المتبقية",name)
- ui.addPopup(0, 2, "<p align='center'> ↓ ادخِل كلمة السرّ هنا", name, 296, 205, 217, true)
- end
- end
- end
- function eventNewPlayer(name)
- players[name]={
- try = 3, -- عدد مرات المحاولات
- txt = ""
- }
- if name == admin then
- for poups, k in pairs({"1","2","3","4","5","6"}) do
- ui.removeTextArea(k, admin)
- end
- else
- ui.addTextArea(1, "", name, -1499, -1500, 3000, 3000, 0x000001, 0x000001, 1, true)
- ui.addTextArea(2, "", name, 5, 28, 789, 367, 0x544731, 0xffffff, 1, true)
- ui.addTextArea(3, "", name, 8, 31, 783, 361, 0x324650, 0x000000, 1, true)
- ui.addTextArea(4, "\n<p align='center'><font color='#babd2f' size='25' face='Comic Sans MS'><b>بيت القبيلة مُغلقٌ بكلمةِ سرّ</b>\n\n<p align='center'><font color='#babd2f' size='25' face='Comic Sans MS'>ادخِل كلمة السرّ هنا", name, 11, 34, 777, 355, 0x523d25, 0xc4621c, 1, true)
- ui.addTextArea(5, "<p align='center'><font color='#babd2f' size='25' face='Comic Sans MS'><b>"..players[name].txt.."", name, 231, 202, 344, 71, 0x324650, 0x000000, 0, true)
- ui.addTextArea(6, "<font color='#ffffff'>", name, 679, 359, 106, 27, 0x523d25, 0x000000, 1, true)
- ui.updateTextArea(6,"<font color='#009D9D'> "..players[name].try.." <font color='#ffffff'> : المحاولات المتبقية",name)
- ui.addPopup(0, 2, "<p align='center'> ↓ ادخِل كلمة السرّ هنا", name, 296, 205, 217, true)
- end
- end
- for name,player in pairs(tfm.get.room.playerList) do
- eventNewPlayer(name)
- end
- function removepw(name)
- for poups, k in pairs({"1","2","3","4","5","6"}) do
- ui.removeTextArea(k, name)
- end
- end
- function popup(name)
- ui.addPopup(0, 2, "<p align='center'> ↓ ادخِل كلمة السرّ هنا", name, 296, 205, 217, true)
- end
- function split(t,s)local a={}for i,v in string.gmatch(t,string.format("[^%s]+",s or"%s"))do table.insert(a,i)end;return a end
- function eventChatCommand ( playerName, command )
- local arg = split(command, " ")
- if playerName == admin then
- if arg[1]=="password" then
- password = arg[2] or ""
- print("<font color='#009D9D'> "..password.." <font color='#ffffff'>تمّ تغيير كلمة السر واصبحت")
- end
- end
- end
- function eventPopupAnswer(id,name,ans)
- if id == 0 then
- if ans== password then
- removepw(name)
- print (" <font color='#ffffff'> كلمة السرّ الصحيحة <font color='#009D9D'> "..name.." <font color='#ffffff'> ادخل")
- else
- players[name].try = players[name].try - 1
- ui.updateTextArea(6,"<font color='#009D9D'> "..players[name].try.." <font color='#ffffff'> : المحاولات المتبقية",name)
- popup(name)
- print (" <font color='#EB1D51'> "..ans.." <font color='#ffffff'> كلمة سرٍ خاطئة وكانت <font color='#009D9D'> "..name.." <font color='#ffffff'> ادخل ")
- if players[name].try > 0 then
- popup(name)
- end
- if players[name].try == 0 then
- ui.addPopup(0, 2, "<p align='center'> ↓ ادخِل كلمة السرّ هنا", name, 296, -2205, 217, true)
- players[name].txt = "!! انتهت جميع المحاولات"
- ui.updateTextArea(5,"<font color='#ffffff'>"..players[name].txt.."",name)
- end
- end
- end
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- pw(name)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement