| |
| 0 | ||
| function eventTextAreaCallback(id,name,callback) if callback=="anunt" then ui.addPopup(1, 2, "Write Here!", name, 250, 200) function eventPopupAnswer(id, playerName, answer) ui.addTextArea(0,..answer..,name,250,200,250,200,nil,nil,nil,true) end end end Can you help me with something?I don't know how to make it so PopUp's answer will appear like a text area for all Also I need an exampple for turning all the mice in different photos (I know it is just for rooms) Dernière modification le 1438925460000 |
| « Citoyen » 1438938480000
| 0 | ||
Cosmincreato a dit : I'm not entirely sure if this will work because I don't have your full script. function eventTextAreaCallback(id,name,callback) if callback=="anunt" then ui.addPopup(1, 2, "Write Here!", name, 250, 200) end end function eventPopupAnswer(id, playerName, answer) if id==1 then ui.addTextArea(0,answer,nil,250,200,250,200,nil,nil,nil,true) end end The issues were you were trying to define a function inside another function and you only need to use concatenation operators when you're trying to merge variables. For example: "some text "..answer.." some more text". Cosmincreato a dit : I assume you want all players to show as random/different images. Obviously you'd need an image list the same size or larger than the playerlist for everyone to have a different image assigned to them. images={"1By6M7j.png","MTilyuW.png","rrTB5vd.png","Tx1bLur.png","FTcao0T.png"} for name in pairs(tfm.get.room.playerList) do tfm.exec.addImage(images[math.random(#images)],"%"..name,-40,-40) end |
| 0 | ||
| you saved my script thanks :0 |
| « Citoyen » 1439088300000
| 0 | ||
| When the players cry in the position X: 80 ~ Y: 170, he would be teleported to the position X: 160 ~ Y: 170. Each second, a pumpkin (the collectable) would be invoked at position X: 350 ~ Y: 180 and at position X: 120 ~ Y: 65. When the players laugh in the position X: 160 ~ Y: 170, he dies. The players can invoke small boxes pressing space. Dernière modification le 1439140680000 |
| 0 | ||
| Is there any way to disable skills in tribehouse |
| « Citoyen » 1439134500000
| 0 | ||
| #football scrip? edit force for ball Dernière modification le 1439135520000 |
| « Consul » 1439206500000
| 0 | ||
nixai a dit : tfm.exec.disableAllShamanSkills(true); |
| « Consul » 1439211780000
| 0 | ||
| Is it possible to make a moudle like the track map ? It would be a good moudle |
| « Citoyen » 1439318280000
| 0 | ||
Martinmuller a dit : My only concern with this is that the co-ordinates that they have to cry at are so exact that it'll be very hard to actually be at that point. interval = 0 function eventEmotePlayed(name, id) local player = tfm.get.room.playerList[name] if id == 1 and player.x == 160 and player.y == 170 then tfm.exec.killPlayer(name) elseif id == 2 and player.x == 70 and player.y == 170 then tfm.exec.movePlayer(name, 160, 170, false) end end function eventNewPlayer(name) tfm.exec.bindKeyboard(name, 32, true, true) end function eventKeyboard(name, key, down, x, y) if key == 32 then tfm.exec.addShamanObject(1, x, y+10) end end function eventLoop(time) interval=interval+1 if interval%2==0 and time>3000 then tfm.exec.addShamanObject(89, 350, 180) tfm.exec.addShamanObject(89, 180, 85) end end for name in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end Bugembo a dit : I'm sure this could be made through some way or another but it would not be as good. The running animation cannot be forced through lua and the movement would overall be a lot more jerky. |
| « Consul » 1439321880000
| 0 | ||
Jamesqwartz a dit : Oh k. |
| « Citoyen » 1439342520000
| 0 | ||
Jamesqwartz a dit : Thanks ^-^ |
| « Citoyen » 1439577540000
| 0 | ||
| Hello, I need help I want to edit this script Show XML map a dit : But I do not know how, I want to change the "print" to something like this
The important thing is to show the code and can be copied :v Dernière modification le 1439606100000 |
| « Consul » 1439606100000
| 0 | ||
| There's no way you can do that other than the chat - text areas and popups don't allow you to select or copy from them. |
| « Citoyen » 1439607780000
| 0 | ||
| ok, thank you Sha :) I did not know you could not xd! |
| « Citoyen » 1439631660000
| 0 | ||
| How can i use remove image |
| « Citoyen » 1439631960000
| 0 | ||
| Only module team members can. Dernière modification le 1439634180000 |
| « Citoyen » 1439654340000
| 0 | ||
Alexunutrei a dit : No i will open it to module team. But how to use? |
| « Citoyen » 1439654760000
| 0 | ||
| When you add a image will be returned an image id. You use this id to remove. example: id=tfm.exec.addImage(image,target,x,y,targetPlayer) tfm.exec.removeImage(id) The image will be removed. |
| « Censeur » 1439823780000
| 0 | ||
| I need a script that will continuously play maps in this specific way. Script plays @666666, then 10 seconds later it attempts to play @6666667 (which is a single digit above) If the map exist, it plays, if the map doesn't exist, another 10 seconds goes by and it tries again. Once the said map exist and plays sucessfully, 10 seconds later it will attempt to play @6666668 (again one single digit above), and again if the map doesn't exist yet, it would simply wait another 10 seconds before attempting to play the map again. |
| « Citoyen » 1440291120000
| 0 | ||
Mousechris a dit : map=666666 timer=0 function eventNewGame(pname) timer=-220 tfm.exec.disableAfkDeath(true) tfm.exec.disableAutoNewGame(true) end function eventLoop() if timer<20 then timer=timer+1 elseif timer==20 then timer=0 map=map+1 tfm.exec.newGame(map) end print(timer) end I'm not too good at using Lua. This might work, but I don't know really. If not, maybe you can use it as a base and make it work properly. |