| |
| « Citizen » 1645135260000
| 0 | ||
| Can you guys do it when I write !map it gives me a random map? |
| « Censor » 1645168620000
| 1 | ||
| Documentation Documentation said: You can do this Lua code 1 2 3 4 5 eventChatCommand = function(name, command) |
| « Citizen » 1645223280000
| 0 | ||
King_seniru said: It doesn't work it gives me just the map #0. |
| « Censor » 1645258440000
| 1 | ||
| Sorry I forgot it doesn't really work in tribe houses. The script below will load a random map from a random category instead. Not sure if there's a better way for it, but if so tell me :P Lua code 1 2 3 4 5 6 7 local permCats = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 21, 22, 23, 24, 32, 38, 41, 42, 87 } Last edit on 1645287900000 |
| « Citizen » 1645443840000
| 0 | ||
| How to make mouse speedometer? |
| « Censor » 1645457760000
| 1 | ||
| Use tfm.get.room.playerList[name].vx and tfm.get.room.playerList[name].vy and update the display in event loop |
| « Censor » 1650716940000
| 0 | ||
| Hi! I have three questions: 1) How can I make an event happen if a key is pressed double? 2) How can I set time to use a command? 3) How can I make someone use a command once a day or only once? |
| « Censor » 1650789420000
| 2 | ||
said: Lua code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 do said: Can you specify more with an example scenario said: Not sure how you used to handle commands usually, but I think this would need a more sophisticated way to deal with stuff with ease later. Here's something I'd do Lua code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 local string_split = function(s, delimiter) Like I said this is just a simple way I might use for something like this. All you need to do is to flag if a player used that command and check it the next time. Feel free to use this same logic in the code you have rn without replacing the entire thing with this Last edit on 1650789540000 |
| « Censor » 1650835740000
| 0 | ||
| @King_seniru Thanks for your answers ^^ And about the 2nd question, it is something like some Discord bots' vote command (which make us able to vote or do something else each 12 hours etc.) but what I had in my mind doesn't look nice at all anymore. I would like to learn how to set 30 seconds waiting time though (Also sorry for my awful explanation lol) |
| « Censor » 1650866520000
| 3 | ||
| Oh I see, you can do something similar for what we did with one-time use commands. I'm just gonna extend my previous example a bit for this one. You can get the idea from that and implement it your own way I guess. Lua code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 local string_split = function(s, delimiter) Didn't test this time, but it should work (please), even if didn't work, get the idea from the lines I have highlighted. |
| « Citizen » 1678458300000
| 0 | ||
| can you program a bot (the bot dont attractive with other player make it just stopped charachter) and want it dressing that 251;0,0,0,73,0,0,0,0,0 if you can pls do it |
| « Citizen » 1679861100000
| 0 | ||
Shamousey said: |
| « Citizen » 1681512180000
| 0 | ||
Mehdi said: tfm.exec.addNPC("Name", { title = 1, x = 100, y = 305, look = "251;0,0,0,73,0,0,0,0,0", female = false, lookAtPlayer = true}) Last edit on 1706547300000 |