Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----------------BanTribe - By Toonney--------------
- bans = {}
- times = os.date()
- --fonctions de bases
- function main()
- tfm.exec.disableAutoNewGame(true);
- system.disableChatCommandDisplay("ban", true)
- end
- --commandes
- function eventChatCommand(playerName,message)
- if message=="ban" and playerName=="Toonney" then
- ui.addPopup(1,2,"<font color='#BABD2F' size='13'>Qui veux-tu ban ?</font>",playerName,120,120,500);
- elseif message=="unban" and playerName=="Toonney" then
- unban()
- elseif message=="banlist" then
- ui.addPopup(3,0, table.concat(bans,'\n'),playerName,200,100,400)
- elseif playerName~="Toonney" then
- ui.addPopup(2,0,"<p align='center'><font color='#EB1D51' size='15'>Vous n'êtes pas autorisé ces fonctions</font></p>",playerName,150,120,500);
- end
- end
- function eventPopupAnswer(popupID,playerName,answer)
- if popupID==1 and playerName=="Toonney" then
- table.insert(bans, answer)
- local str = "<font color='#D21723' size='13'><i>"..answer.."</i> a été banni le <b>"..times.."</b> par <b>"..playerName.."</font>"
- str = str .. "<br><br><br>"
- str = str .. "<font color='#B5E655' size='13'><b>Listes des bannis :</b></font>"
- str = str .. "<br><br><i><font color='#ADCF4F' size='11'>" .. table.concat(bans,'\n') .. "</font></i>"
- ui.addPopup(4,0, str, playerName,200,100,400)
- ui.addTextArea(1,"<p align='center'><font color='#96CA2D' size='20'><br><br><br><br><br><br><br><br>Vous êtes banni</font></p><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>", answer,5,10,792,400,0x669900,0x669900,1)
- end
- end
- function unban()
- for i,v in ipairs(bans) do table.remove(bans, i) end
- ui.removeTextArea(1,answer)
- end
Advertisement
Add Comment
Please, Sign In to add comment