Lua Snippets |
![]() « Citoyen » 1380678600000
| 0 | ||
I need help with this script, i just need to add like, a callers table so instead of adding, name == "Gonzahook" i just put the table value in there, function eventChatCommand(name, cmd) local cmd_args = {} for arg in cmd:gmatch("%S+") do table.insert(cmd_args, arg) end if cmd_args[1] == "kill" then tfm.exec.killPlayer(cmd_args[2]) elseif cmd_args[1] == "cheese" then tfm.exec.giveCheese(cmd_args[2]) --etc.. end end |
![]() ![]() « Consul » 1380680700000
| 0 | ||
Firstly define your table. a dit : Then loop through it, and check if the value of the item in the table is the same as the name in eventChatCommand. a dit : |
![]() « Citoyen » 1380837480000
| 0 | ||
Shamousey as i didn't learn about tables so much, how would you insert the cmd_args[2] into the table admins? |
![]() ![]() « Citoyen » 1380837840000
| 0 | ||
Shamousey a dit : I suggest using this for better performance: example a dit : |
![]() ![]() « Citoyen » 1380838620000
| 0 | ||
Makinit a dit : Oh dang, you go gurl. Tell that Shamoo whos boss! |
![]() ![]() « Citoyen » 1380843360000
| 0 | ||
does anyone know why this won't work? tfm.exec.disableAfkDeath() error: [•] tfm.exec.disableAfkDeath : argument 1 can't be NIL. does it have to do with the "()" part or.. |
![]() ![]() « Consul » 1380844020000
| 0 | ||
You need to put either true or false as the argument. |
![]() ![]() « Citoyen » 1380846960000
| 0 | ||
Shamousey a dit : ok ty shamoo |
![]() ![]() « Citoyen » 1380872400000
| 0 | ||
How to: Make baloon go certain directions Play a map automatically when lua script is entered |
![]() ![]() « Citoyen » 1380874980000
| 0 | ||
Championrs a dit : Use xSpeed in moveObject: balloon = tfm.exec.addShamanObject(28, 400, 300) tfm.exec.moveObject(balloon, 0, 0, true, 50, 0, false) --right tfm.exec.moveObject(balloon, 0, 0, true, -50, 0, false) --left Championrs a dit : Use tfm.exec.newGame in the main scope: outisde any functions. |
![]() ![]() « Citoyen » 1380876240000
| 0 | ||
i would like a tribe war with lua |
![]() ![]() « Consul » 1380898140000
| 0 | ||
Alishakouri a dit : Several people are already working on tribewar style minigames, just wait ;) |
![]() ![]() « Citoyen » 1380898800000
| 0 | ||
a dit : Example of use |
![]() ![]() « Consul » 1380899040000
| 0 | ||
a dit : Bare in mind that this function is only available for Lua Team members. |
![]() ![]() « Citoyen » 1380904140000
| 0 | ||
I need an inderstandable intro please in this a dit : I need a complex commande as "!apm x y" like : !amp 50 50 About the apple and stuff that you may say it's not like thatto use "tfm.exec.moveObject" i took care about it(apple = tfm.exec...) So ... Help |
![]() ![]() « Citoyen » 1380904140000
| 0 | ||
I sewar down apple was 39 and not apple... |
![]() ![]() « Citoyen » 1380904320000
| 0 | ||
Hophipmice a dit : Did any one listen ._. they don't use Objext id like that but answear me please i will quote ! I need an inderstandable intro please in this a dit : I need a complex commande as "!apm x y" like : !amp 50 50 |
0 | ||
I need an example of a dit : please ^^ |
![]() ![]() « Citoyen » 1380907860000
| 0 | ||
Here is an exapmple of popup with commandes and the coolest is you won't worry for text closing and commande won't be show for others ! do !pop text for text a dit : . |
![]() ![]() « Citoyen » 1380928200000
| 0 | ||
i'm too lazy to do this but can someone switch the FFA coding with spirits instead of cannons? ty i mean not on that thread can someone give me the code though instead of me having to go through everything and switching it to spirits |