Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Wich flag?
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- country = ""
- newRound = false
- function newFlag()
- flags = {"BR","PT","FR","TR","AR","DE","AF","ZA","AL","AD","AZ","BS","NL","BO","CV","KM","ES"}
- countries = {"brasil","portugal","frança","turquia","argentina","alemanha","afeganistão","africa do sul","albania","andorra","azerbaijão","bahamas","belgica","holanda","bolivia","cabo verde","camboja","espanha"}
- ID = math.random(#flags)
- choosenFlag = flags[ID]
- country = countries[ID]
- map = string.format('<C><P D="x_divers/x_drapeaux/%s.png,387,190" /><Z><S><S H="77" P="0,0,0.3,0.2,0,0,0,0" L="801" o="60606" X="399" Y="399" T="12" /><S H="10" P="0,0,0.3,0.2,0,0,0,0" L="60" o="60606" X="400" Y="225" T="12" /><S P="0,0,0.3,0.2,0,0,0,0" L="60" o="60606" H="10" X="400" Y="175" T="12" /><S P="0,0,0.3,0.2,90,0,0,0" L="60" o="60606" H="10" X="425" Y="200" T="12" /><S P="0,0,0.3,0.2,90,0,0,0" L="60" o="60606" H="10" X="374" Y="200" T="12" /></S><D><DS Y="358" X="389" /></D><O /></Z></C>', choosenFlag)
- tfm.exec.newGame(map)
- tfm.exec.setUIMapName("Descubra o país!")
- end
- function eventChatCommand(player,command)
- if command == country and newRound == false then
- tfm.exec.setUIMapName(string.format("%s descobriu a bandeira! Iniciando novo round!",player))
- newRound = true
- round = os.time()
- end
- end
- function eventLoop()
- if newRound then
- if round < os.time()-7000 then
- newFlag()
- round = os.time()
- newRound = false
- end
- end
- end
- newFlag()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement