×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 16 / 38 › »
Module API FAQ
Zutto
« Citoyen »
1380405720000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#301
  0
Shamousey i have a problem whit the popups

How i can inplement:

function eventChatCommand(name,command)
if name=="Aritxy" or name=="Shamousey" or name=="Tigrounette" then
if command=="example" then
print("Here you'd put any command you only want the admins to be able to use.")
end
end
if command=="exampletwo" then
print("Anyone would be able to use this command.")
end
end


In:

function eventChatCommand(name,command)
if command=="ayuda" then
ui.addPopup(0,0,"<b>Conjugation</b> es un mini juego con la rotación de los mapas de vanilla y en los mapas, no hay chamán, pero los ratones, podéis conjugar dando un click en el sitio que queráis conjugar. <b>Comandos:</b> <b>!mort</b> - Es lo mismo que /mort, mueres.",name,270,200,300)
elseif command=="mort" then
tfm.exec.killPlayer(name) --Kills player if !mort
end
end
Shamousey
« Consul »
1380405840000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#302
  0
a dit :
function eventChatCommand(name,command)
if name=="Aritxy" or name=="Shamousey" or name=="Tigrounette" then
if command=="example" then
print("Here you'd put any command you only want the admins to be able to use.")
end
end

if command=="ayuda" then
ui.addPopup(0,0,"&lt;b&gt;Conjugation&lt;/b&gt; es un mini juego con la rotación de los mapas de vanilla y en los mapas, no hay chamán, pero los ratones, podéis conjugar dando un click en el sitio que queráis conjugar. &lt;b&gt;Comandos:&lt;/b&gt; &lt;b&gt;!mort&lt;/b&gt; - Es lo mismo que /mort, mueres.",name,270,200,300)
elseif command=="mort" then
tfm.exec.killPlayer(name) --Kills player if !mort
end
end

 
Epicshawty
« Citoyen »
1380406140000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#303
  0
Dharakoid a dit :
No Arixty's code works?

OCD wrong ;)
Shamousey
« Consul »
1380406260000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#304
  0
Epicshawty a dit :
OCD wrong ;)

Don't tell people that their code is wrong just if you want to format it differently. It'll put people off, you'll make them think that something is wrong with their syntax when there isn't.
Zutto
« Citoyen »
1380406260000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#305
  0
Shamousey i fixed thanks very much!!

---
Epicshawty
« Citoyen »
1380407040000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#306
  0
Shamousey a dit :
Don't tell people that their code is wrong just if you want to format it differently. It'll put people off, you'll make them think that something is wrong with their syntax when there isn't.

Okay, but it'll look much neater and more organized if all the syntaxes were the same. I'm sorry if I ticked you off :/
Shamousey
« Consul »
1380407280000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#307
  0
Aritxy a dit :
I want put the command for thee admins, the command !cheese but don't work:

You have an end in the wrong place. Your if command=="cheese" is inside the if command=="equipecommands" scope.

Epicshawty a dit :
Okay, but it'll look much neater and more organized if all the syntaxes were the same. I'm sorry if I ticked you off :/

It doesn't tick me off, I'm just worried that you're going to confuse people into thinking their code was wrong when it's perfectly fine. I'm all for organised code, I find it to be a pain rummaging through hundreds of lines of un-indented code with no formatting. That doesn't mean that the code is wrong though, it's just personal preference and you're in the wrong by saying their code is wrong :P
Epicshawty
« Citoyen »
1380407520000
    • Epicshawty#0000
    • Profil
    • Derniers messages
    • Tribu
#308
  0
Shamousey a dit :
It doesn't tick me off, I'm just worried that you're going to confuse people into thinking their code was wrong when it's perfectly fine. I'm all for organised code, I find it to be a pain rummaging through hundreds of lines of un-indented code with no formatting. That doesn't mean that the code is wrong though, it's just personal preference and you're in the wrong by saying their code is wrong :P

Okay. Well time to not correct people when they're already correct :D
Zutto
« Citoyen »
1380409560000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#309
  0
Someone know the code to the !np code ?
Shamousey
« Consul »
1380409800000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#310
  0
a dit :
if command:sub(1,2)=="np" then
tfm.exec.newGame(command:sub(3))
end

Again, there's better ways of doing this, but this should help you get started.
Manacer
« Citoyen »
1380416100000
    • Manacer#0000
    • Profil
    • Derniers messages
    • Tribu
#311
  0
How to add a second page in a pop up lua please?
(utility help)
Shamousey
« Consul »
1380416460000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#312
  0
Manacer a dit :
How to add a second page in a pop up lua please?
(utility help)

#utility's help isn't actually a popup - it's lots of separate text areas. I'll post the code for it some time soon.
Manacer
« Citoyen »
1380416640000
    • Manacer#0000
    • Profil
    • Derniers messages
    • Tribu
#313
  0
Shamousey a dit :
#utility's help isn't actually a popup - it's lots of separate text areas. I'll post the code for it some time soon.

Okay thank ! :)
Fluffyshine
« Citoyen »
1380416760000
    • Fluffyshine#0000
    • Profil
    • Derniers messages
    • Tribu
#314
  0
How can I disable sham skills?
Byenamo
« Citoyen »
1380417240000
    • Byenamo#0000
    • Profil
    • Derniers messages
    • Tribu
#315
  0
Help with:
a dit :

function eventKeyboard(name,key,down,x,y)
if key==66 then
tfm.exec.setVampirePlayer(name,0,0,true,0,-50,false)
end
end

.
Shamousey
« Consul »
1380418020000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#316
  0
Fluffyshine a dit :
How can I disable sham skills?

You can't disable shaman skills, however anyone made a shaman with tfm.exec.setShaman() doesn't have any skills, so you can use that.

Byenamo a dit :
Help with

You need to bind the key for it to work. Try adding tfm.exec.bindKeyboard("Byenamo",66,true,true)
Byenamo
« Citoyen »
1380418920000
    • Byenamo#0000
    • Profil
    • Derniers messages
    • Tribu
#317
  0
Shamousey a dit :
You can't disable shaman skills, however anyone made a shaman with tfm.exec.setShaman() doesn't have any skills, so you can use that.
You need to bind the key for it to work. Try adding tfm.exec.bindKeyboard("Byenamo",66,true,true)

no was
Edit : get!
Ethanrockz
« Citoyen »
1380473340000
    • Ethanrockz#0000
    • Profil
    • Derniers messages
    • Tribu
#318
  0
When will the module tutoruial thing happen? e.e
Zutto
« Citoyen »
1380473700000
    • Zutto#4451
    • Profil
    • Derniers messages
    • Tribu
#319
  0
Can i put in Lua music mp3 code?
Bengalstar
« Citoyen »
1380473820000
    • Bengalstar#0000
    • Profil
    • Derniers messages
#320
  0
hi for some reason I can't load anything at my tribe house with the lua command even though I was given the powers
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 16 / 38 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27