×

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
« ‹ 31 / 38 › »
Module API FAQ
Laagaadoo
« Citoyen »
1390997880000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#601
  0
Is possible to load a translation using system.loadFile?

I know that normal users can't use this function.
Shamousey
« Consul »
1391374680000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#602
  0
Laagaadoo a dit :
Is possible to load a translation using system.loadFile?

I know that normal users can't use this function.

It is possible, some official minigames already do this to save space in the main script.
Laagaadoo
« Citoyen »
1391382240000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#603
  0
What is the difference between $playerName and %playerName in the tfm.exec.addImage ?
Shamousey
« Consul »
1391383500000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#604
  0
Laagaadoo a dit :
What is the difference between $playerName and %playerName in the tfm.exec.addImage ?

$ places an image relative to the player's sprite.
% replaces the player's sprite completely.
Laagaadoo
« Citoyen »
1391388240000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#605
  0
Shamousey a dit :
$ places an image relative to the player's sprite.
% replaces the player's sprite completely.

And the #mobileId?
Shamousey
« Consul »
1391419080000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#606
  0
Laagaadoo a dit :
And the #mobileId?

That attaches to shaman objects.
Laagaadoo
« Citoyen »
1391423700000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#607
  0
Shamousey a dit :
It is possible, some official minigames already do this to save space in the main script.

Shamousey a dit :
$ places an image relative to the player's sprite.
% replaces the player's sprite completely.

Shamousey a dit :
That attaches to shaman objects.

Thanks!

#Edit:

I made that to list the admins in the room:
a dit :

admins = {}

function admins()
local onlineadms = {};

for all in pairs(tfm.get.room.playerList) do
for _,v in pairs(admins) do
if(all == v) then
table.insert(onlineadms, #onlineadms+1, all);

return "<font size='14' color='#BABD2F'>Admins list</font><BR>"..table.concat(onlineadms, "<BR>• ");
end
end
end

return "<font size='14' color='#BABD2F'>Admins list</font><BR>No admins online";
end

ui.addPopup(0, 0, admins(), nil, 300, 175, 200, true)

But don't work, where is my error?
Cactusjack
« Citoyen »
1391831520000
    • Cactusjack#4408
    • Profil
    • Derniers messages
    • Tribu
#608
  0
Error a dit :


admins = {}

function admins()
local onlineadms = {};

for all in pairs(tfm.get.room.playerList) do
for _,v in pairs(admins) do
if(all == v) then
table.insert(onlineadms, #onlineadms+1, all);
return "<font size='14' color='#BABD2F'>Admins list</font><BR>"..table.concat(onlineadms, "<BR>• ");
end
end
end

return "<font size='14' color='#BABD2F'>Admins list</font><BR>No admins online";

end
ui.addPopup(0, 0, admins(), nil, 300, 175, 200, true)

The reason of the error is that the name of the table is equivalent to the function's, so when you call "admins" it will return the function, as it was the last thing in the code. Rename one of them to fix the error.
Kasdaya
« Citoyen »
1391886720000
    • Kasdaya#0000
    • Profil
    • Derniers messages
    • Tribu
#609
  0
Hello!

I want a script like a simple leaderboard.
And the users when they win a round, more points they have.

Someone knows?
Abdeltif
« Citoyen »
1391941200000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#610
  0
Tweetis a dit :
The reason of the error is that the name of the table is equivalent to the function's, so when you call "admins" it will return the function, as it was the last thing in the code. Rename one of them to fix the error.

Yeah , I guess you're right !
Johncenajaz
1391951340000
    • Johncenajaz#0000
    • Profil
    • Derniers messages
#611
[Modéré par Mausibiene]
Ronan
1391977680000
    • Ronan#3434
    • Profil
    • Derniers messages
#612
[Modéré par Icewolfbob, raison : off topic / spam]
Afarthur
« Citoyen »
1392231000000
    • Afarthur#0000
    • Profil
    • Derniers messages
    • Tribu
#613
  0
I would like to sign up
Shamousey
« Consul »
1392233160000
    • Shamousey#0095
    • Profil
    • Derniers messages
    • Tribu
#614
  0
Afarthur a dit :
I would like to sign up

You're more than free to apply! Topic-615060
Pawgold
« Citoyen »
1392330600000
    • Pawgold#0000
    • Profil
    • Derniers messages
    • Tribu
#615
  0
Quick question.
How do I make a text bubble (tfm.exec.ui.addTextArea) on the top of the room like in fight when they have a timer, then after a few seconds it disappears?
Safwanrockz
« Censeur »
1392370260000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#616
  0
Pawgold a dit :
Quick question.
How do I make a text bubble (tfm.exec.ui.addTextArea) on the top of the room like in fight when they have a timer, then after a few seconds it disappears?

I doubt that they use system.newTimer() to that one, however, you can try using eventLoop() timers.
a dit :

timer=10
ui.addTextArea(0, "Type your text here...", name, 255, 19)
function eventLoop()
timer = timer - 1
if timer<=0 then
ui.removeTextArea(0)
timer=10
end
end

 
Laagaadoo
« Citoyen »
1393074540000
    • Laagaadoo#0000
    • Profil
    • Derniers messages
    • Tribu
#617
  0
a dit :
## Init Error : 15498
## Init Error : 15497
## Init Error : 15503

What is it?
Uditya
« Citoyen »
1393074660000
    • Uditya#0000
    • Profil
    • Derniers messages
    • Tribu
#618
  0
Laagaadoo a dit :
What is it?

Same here its not working if i put right code then also ;-;
Kmlcan
« Citoyen »
1393150440000
    • Kmlcan#0000
    • Profil
    • Derniers messages
    • Tribu
#619
  0
Uhm, it's been 2 weeks since I applied for the Module Team, I've read that you'll reply in 2 weeks and tell if I'm accepted or denied. Didn't you get my application?
Benbirkralm
« Citoyen »
1393153020000
    • Benbirkralm#0000
    • Profil
    • Derniers messages
    • Tribu
#620
  0
Laagaadoo a dit :
What is it?

Uditya a dit :
Same here its not working if i put right code then also ;-;

Lua Broken.
  • Forums
  • /
  • Transformice
  • /
  • Archives
  • /
  • Module API FAQ
« ‹ 31 / 38 › »
© Atelier801 2018

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

Version 1.27