×

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
  • /
  • Modules
  • /
  • Script Requests
« ‹ 33 / 160 › »
Script Requests
Abdeltif
« Citoyen »
1387034880000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#641
  0
Here : !input
Whrite something(because of html can used that's why ^^)
press sumbit

insert the answer in string table
Safwanrockz
« Censeur »
1387036620000
    • Safwanrockz#0095
    • Profil
    • Derniers messages
    • Tribu
#642
  0
Haha, I found what's wrong in your code. x)
You wrote the eventPopupAnswer as eventPopupAnwer. xD
a dit :
ui.addTextArea(0, "thing", nil, nil, nil, nil, nil, nil, nil, 0.5, true)

string = {}


function eventChatCommand(playerName, cmd)
if cmd:sub(0,1)=="p" then
table.insert(string, "<font color='#0880fe' size='16'><b>"..playerName.."</b></font> : <font size='16'>"..cmd:sub(3).."</font>")
elseif cmd=="reset" then
ui.updateTextArea(0, "<font size='18' color='#008000f'>Updated for the longest</font>")
elseif cmd=="input" then
ui.addPopup(1, 2, "<font color='#00800f' size='15.4'>Input</font>", playerName, 400, 50)
end
end

function eventLoop()
ui.updateTextArea(0, table.concat(string, "\n"))
end

function eventPopupAnswer(iD, playerName, ans)
if iD==1 then
table.insert(string, "<font color='#0880fe' size='16'><b>"..playerName.."</b></font> : <font size='16'>"..ans.."</font>")
end
end


system.disableChatCommandDisplay("p", true)
system.disableChatCommandDisplay("input", true)
system.disableChatCommandDisplay("reset", true)

 
Abdeltif
« Citoyen »
1387038060000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#643
  0
Safwanrockz a dit :
Haha, I found what's wrong in your code. x)
You wrote the eventPopupAnswer as eventPopupAnwer. xD
 

LOOOOOOOOOOOL , I am so stupid ...
E : STILL NOT WORKING :ccccccccccccc
E2 : Okay now it does lol
Thetroz
« Citoyen »
1387158360000
    • Thetroz#0000
    • Profil
    • Derniers messages
    • Tribu
#644
  0
What is the script that if a player clicks on a player, leave a textArea?

TextArea: " You gave click Player "..playerName.." "
Jordy
« Consul »
1387188060000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#645
  0
Thetroz a dit :
What is the script that if a player clicks on a player, leave a textArea?

TextArea: " You gave click Player "..playerName.." "

Do you have the x and y value where you want the textarea to be spawned?
Maxxzinnn
« Citoyen »
1387201920000
    • Maxxzinnn#0000
    • Profil
    • Derniers messages
    • Tribu
#646
  0
Is it possible to have a script where it says a message above the person name after you click in him/her?
Thetroz
« Citoyen »
1387207140000
    • Thetroz#0000
    • Profil
    • Derniers messages
    • Tribu
#647
  0
Jordynl a dit :
Do you have the x and y value where you want the textarea to be spawned?

in the x and y where did click

would be as

ui.addTextArea(0, "You gave click Player "..playerName.."", p, x, y ,250 , 50,16777215, 16777215, 0)
Abdeltif
« Citoyen »
1387229280000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#648
  0
Maxxzinnn a dit :
Is it possible to have a script where it says a message above the person name after you click in him/her?

For clicking on him/her , It is sooooooooo hard to code :c
Issey
« Citoyen »
1387229280000
    • Issey#0000
    • Profil
    • Derniers messages
#649
  0
Maxxzinnn a dit :
Is it possible to have a script where it says a message above the person name after you click in him/her?

[quote='stuff']
id={}

function eventNewPlayer(name)
system.bindMouse(name,true)
end

for name in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventMouse(name,x,y)
for player in pairs(tfm.get.room.playerList) do
player_x=tfm.get.room.playerList[player].x
player_y=tfm.get.room.playerList[player].y
if x<player_x+20 and x>player_x-20 then
if y<player_y+20 and y>player_y-20 then
textBubble(name,'<font face="tahoma" size="12" color="#FFFAE6"><b><p align="center">'..player)
end
end
end
end

function textBubble(name,text)
name_x=tfm.get.room.playerList[name].x
name_y=tfm.get.room.playerList[name].y
text_id=math.random(1200)
table.insert(id,text_id)
ui.addTextArea(text_id,text,nil,name_x-40,name_y-100,80,23,0x3B4452,0x3C4860)
end

function eventChatCommand(name,c)
if c:sub(1,5)=='clear' then
for _,idd in pairs(id) do
ui.removeTextArea(idd)
end
end
end[/quote]

idk how u want the text areas altered, but u can use !clear to remove them for now
Abdeltif
« Citoyen »
1387229280000
    • Abdeltif#0000
    • Profil
    • Derniers messages
    • Tribu
#650
  0
Issey a dit :
idk how u want the text areas altered, but u can use !clear to remove them for now

aww , GJ lol
Jordy
« Consul »
1387229520000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#651
  0
Well done Issey. Here is my version:

a dit :

function eventMouse(playerName, xPos, yPos)
player = tfm.get.room.playerList[playerName]
if tfm.pythag(xPos, yPos, player.x, player.y, 15) then
ui.addTextArea(0, "You gave click Player "..playerName, playerName, xPos, yPos ,250 , 50,16777215, 16777215, 0)
else
ui.removeTextArea(0, playerName)
end
end

function eventNewPlayer(name)
system.bindMouse(name, true)
end

function tfm.pythag(x1,y1,x2,y2,r)
local x=x2-x1
local y=y2-y1
local r=r+r
return x*x+y*y&lt;r*r
end

for n,p in pairs(tfm.get.room.playerList) do
eventNewPlayer(n)
end

I hope that it helped you.
Maxxzinnn
« Citoyen »
1387230420000
    • Maxxzinnn#0000
    • Profil
    • Derniers messages
    • Tribu
#652
  0
Thank you both, but can you make it so I can change the message that appears? q.q
Jordy
« Consul »
1387230720000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#653
  0
Maxxzinnn a dit :
Thank you both, but can you make it so I can change the message that appears? q.q

This part: "You gave click Player "..playerName" ?
Maxxzinnn
« Citoyen »
1387232340000
    • Maxxzinnn#0000
    • Profil
    • Derniers messages
    • Tribu
#654
  0
Sorry, was talking about issey script, can't find a way to change the message q.q
Jordy
« Consul »
1387232760000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#655
  0
Maxxzinnn a dit :
Sorry, was talking about issey script, can't find a way to change the message q.q

a dit :

textBubble(name,'<font face="tahoma" size="12" color="#FFFAE6"><b><p align="center">'..player)

Right here.
Maxxzinnn
« Citoyen »
1387232760000
    • Maxxzinnn#0000
    • Profil
    • Derniers messages
    • Tribu
#656
  0
I mean that there is no way to change the word what appears there
Jordy
« Consul »
1387232880000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#657
  0
Maxxzinnn a dit :
I mean that there is no way to change the word what appears there

Yes there is.

Replace it with this:
a dit :

textBubble(name,'<font face="tahoma" size="12" color="#FFFAE6"><b><p align="center"> You clicked: '..player)

Try this :P
Maxxzinnn
« Citoyen »
1387233120000
    • Maxxzinnn#0000
    • Profil
    • Derniers messages
    • Tribu
#658
  0
Oh, thank you very much :p
Jordy
« Consul »
1387233120000
    • Jordy#0015
    • Profil
    • Derniers messages
    • Tribu
#659
  0
Maxxzinnn a dit :
Oh, thank you very much :p

You're welcome. :)
Thetroz
« Citoyen »
1387238220000
    • Thetroz#0000
    • Profil
    • Derniers messages
    • Tribu
#660
  0
*deleted*
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • Script Requests
« ‹ 33 / 160 › »
© Atelier801 2018

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

Version 1.27