tfm.exec.disableAutoNewGame() tfm.exec.disableAutoTimeLeft() tfm.exec.disableAfkDeath() system.disableChatCommandDisplay("m") results={} players={} adm="Tortuegreen" tmr=0 function eventNewGame() tmr=120 results={} players={} for name in pairs(tfm.get.room.playerList) do table.insert(players, name) results[name]={vote="", comment=""} end end function eventChatCommand(name, cmd) if cmd:sub(0,3)=="m @" and cmd:sub(4)~="" then tfm.exec.newGame(cmd:sub(3)) end end function addAreas(name) heightBase = 400 weightBase = 250 xBase = math.ceil((800-heightBase)/2) yBase = math.ceil((400-weightBase)/2) ui.addTextArea(1, "", name, xBase, yBase, heightBase, weightBase, 0x2D211A, 0x2D211A, 0.8, true) ui.addTextArea(2, "", name, tonumber(xBase+1), tonumber(yBase+1), tonumber(heightBase-2), tonumber(weightBase-2), 0x986742, 0x986742, 1, true) ui.addTextArea(3, "", name, tonumber(xBase+4), tonumber(yBase+4), tonumber(heightBase-8), tonumber(weightBase-8), 0x171311, 0x171311, 1, true) ui.addTextArea(4, "", name, tonumber(xBase+5), tonumber(yBase+5), tonumber(heightBase-10), tonumber(weightBase-10), 0x0C191C, 0x0C191C, 1, true) ui.addTextArea(5, "", name, tonumber(xBase+6), tonumber(yBase+6), tonumber(heightBase-12), tonumber(weightBase-12), 0x24474D, 0x24474D, 1, true) ui.addTextArea(6, "", name, tonumber(xBase+7), tonumber(yBase+7), tonumber(heightBase-14), tonumber(weightBase-14), 0x183337, 0x183337, 1, true) ui.addTextArea(7, "", name, tonumber(xBase+8), tonumber(yBase+8), tonumber(heightBase-16), tonumber(weightBase-16), 0x122528, 0x122528, 1, true) end function addVotes() addAreas(nil) votes="

Le moment est venu de donner une note à la map !


Choix possibles :
Bien
A modifier
Nul

Commentaire : (facultatif)


" ui.addTextArea(8, votes, name, tonumber(xBase+8), tonumber(yBase+8), tonumber(heightBase-16), tonumber(weightBase-80), 0, 0, 0, true) ui.addPopup(15, 2, "", name, tonumber(xBase+8), tonumber(yBase+178), 385, true) end function eventPopupAnswer(pId, name, anw) if results[name].vote~="" then results[name].comment=anw for i=1,8 do ui.removeTextArea(i, name) end else votes="

Le moment est venu de donner une note à la map !


Choix possibles : Veuillez voter
Bien
A modifier
Nul

Commentaire : (facultatif)


" ui.updateTextArea(8, votes, name) ui.addPopup(15, 2, "", name, tonumber(xBase+8), tonumber(yBase+178), 385, true) end end function eventTextAreaCallback(tAId, name, cb) if cb:sub(0,4)=="vote" then if cb:sub(5)=="1" then votes="

Le moment est venu de donner une note à la map !


Choix possibles :
Bien
A modifier
Nul

Commentaire : (facultatif)


" results[name].vote="Bien" elseif cb:sub(5)=="2" then votes="

Le moment est venu de donner une note à la map !


Choix possibles :
Bien
A modifier
Nul

Commentaire : (facultatif)


" results[name].vote="A modifier" elseif cb:sub(5)=="3" then votes="

Le moment est venu de donner une note à la map !


Choix possibles :
Bien
A modifier
Nul

Commentaire : (facultatif)


" results[name].vote="Nul" end ui.updateTextArea(8, votes, name) elseif cb:sub(0,5)=="clRes" then for i=1,11 do ui.removeTextArea(i) end end end function eventLoop(t1, t2) if tmr>=0.5 then tmr=tmr-0.5 end if tmr==30.5 then addVotes() elseif tmr==0.5 then for name in pairs(tfm.get.room.playerList) do if name~=adm then for i=1,8 do ui.removeTextArea(i, name) end end end local res="" for k,v in pairs(players) do if results[v].comment~="" then res=res..v..": "..results[v].vote.." - "..results[v].comment.."
" elseif results[v].vote~="" then res=res..v..": "..results[v].vote.."
" else ui.addPopup(15, 0, "", name, -5000, -5000, 200, true) res=res..v..": /
" end end addAreas(adm) stats="

Carte @"..tfm.get.room.xmlMapInfo.mapCode.."


" .."

"..res.."


" ui.addTextArea(8, stats, adm, tonumber(xBase+8), tonumber(yBase+8), tonumber(heightBase-16), tonumber(weightBase-50), 0, 0, 0, true) ui.addTextArea(9, "", name, tonumber(xBase+16), tonumber(yBase+weightBase-33), tonumber(heightBase-34), 18, 0x5D7D90, 0x5D7D90, 1, true) ui.addTextArea(10, "", name, tonumber(xBase+18), tonumber(yBase+weightBase-31), tonumber(heightBase-34), 18, 0x11171C, 0x11171C, 1, true) ui.addTextArea(11, "

Fermer cette fenêtre

", name, tonumber(xBase+17), tonumber(yBase+weightBase-32), tonumber(heightBase-34), 18, 0x3C5064, 0x3C5064, 1, true) tfm.exec.newGame() end end