| |
| « Citoyen » 1440354000000
| 0 | ||
| My request is something similar to the snake game (example http://patorjk.com/games/snake/) Each time you eat the cheese your mouse gets longer or something im not really sure how it could/would be done but this would be a great module to play with tribe members |
| 0 | ||
| When a player enters the room, I want the Welcoming popup to show for just them only. At the moment, whenever someone enters the room, it shows for everyone. And whenever someone types !help the Help popup shows for everyone. I just want both of those to show up for the player only. Thanks! |
| « Citoyen » 1440448560000
| 0 | ||
Bradmouser a dit : system.disableChatCommandDisplay("help") tables={ help={ "<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>", "<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>", "<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>", "<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>", "<p align='center' style=''><font face='soopafresh' size='26'>Header:</font></p><p align='center' style=''><font size='18'>Subheader</font></p><p>Text</p>", }, } players={} textarea=ui.addTextArea function ui.addTextArea(id,text,targetPlayer,x,y,width,height,backgroundColor,borderColor,backgroundAlpha,emboss) --if not backgroundColor then backgroundColor=0x324650 end --if not borderColor then borderColor=0x000001 end if emboss then textarea(6969+id,"",targetPlayer,x,y+1,width,height,0x000001,0x000001,backgroundAlpha) textarea(7979+id,"",targetPlayer,x,y-1,width,height,0x6A8FA2,0x6A8FA2,backgroundAlpha) end textarea(id,text,targetPlayer,x,y,width,height,backgroundColor,borderColor,backgroundAlpha) end function tbls(mes) return tables[mes] end function eventNewPlayer(pname) players[pname]={helpid=1} ui.addTextArea(0,"<p align='center'><a href='event:help'><b>?</b></a></p>",pname,780,374,16,16,nil,0x324650,nil,true) tfm.exec.respawnPlayer(pname) ui.addTextArea(6,"<font size='18'><p align='center'><b>Welcome, <font color='#1177AA'>"..pname.."</font>!</b></p></font><p align='center'>Welcome to the tribe house.</p><p align='center'>You can use !help for a list of commands.</p>",pname,245,150,300,80,nil,0x324650,nil,true); end for name,player in pairs(tfm.get.room.playerList) do eventNewPlayer(name) end function eventChatCommand(pname,msg) if msg=="help" then ui.addTextArea(1,tbls("help")[players[pname].helpid],pname,250,50,300,300,nil,0x324650,nil,true) ui.addTextArea(2,"<p align='center'><a href='event:previous'><</a></p>",pname,500,365,16,16,nil,0x324650,nil,true) ui.addTextArea(3,"<p align='center'><a href='event:next'>></a></p>",pname,532,365,16,16,nil,0x324650,nil,true) ui.addTextArea(4,"<p align='center'><a href='event:close'>Close</a></p>",pname,442,365,42,16,nil,0x324650,nil,true) ui.addTextArea(5,"<p align='center'>"..players[pname].helpid.."/"..#tbls("help").."</p>",pname,250,365,42,16,nil,0x324650,nil,true) end end function eventTextAreaCallback(id,pname,callback) if callback=="help" then eventChatCommand(pname,callback) ui.removeTextArea(6,pname) ui.removeTextArea(6969+6,pname) ui.removeTextArea(7979+6,pname) elseif callback=="close" then players[pname].helpid=1 for id=1,5 do ui.removeTextArea(id,pname) ui.removeTextArea(6969+id,pname) ui.removeTextArea(7979+id,pname) end elseif callback=="next" and players[pname].helpid<#tbls("help") then players[pname].helpid=(players[pname].helpid)+1 ui.updateTextArea(1,tbls("help")[players[pname].helpid],pname) ui.updateTextArea(5,"<p align='center'>"..players[pname].helpid.."/"..#tbls("help").."</p>",pname) elseif callback=="previous" and players[pname].helpid>1 then players[pname].helpid=players[pname].helpid-1 ui.updateTextArea(1,tbls("help")[players[pname].helpid],pname) ui.updateTextArea(5,"<p align='center'>"..players[pname].helpid.."/"..#tbls("help").."</p>",pname) end end This uses Shamousey's help menu. Hope it works for you, sorry if I didn't understand what you meant. :x Dernière modification le 1440448740000 |
| 0 | ||
| Sorry for being a bother. :x How do I get the Welcome popup to go away without having to open the Help popup? |
| « Citoyen » 1440478800000
| 0 | ||
| i have a idea but im not good at lua but here it is when someone does the confetti thing it could be... function eventEmotePlayed(player, emote) if emote==9 then ui.addTextArea(0, player,, "Is happy! :D) Yeah that was kinda my first lua thing please tell me if i did something wrong! |
| 0 | ||
supaelijah a dit : timer = 0 despawnTime = 5 function eventEmotePlayed(player, emote) if emote == 9 then ui.addTextArea(0, player .. " is happy! :D*") timer = 0 end end function eventLoop(curTime, timeR) if timer == despawnTime * 2 then ui.removeTextArea(0, NIL) else timer = timer + 1 end end |
| « Citoyen » 1440520800000
| 0 | ||
| Can Somone Help Make Me A Gmod Murder-like Minigame? Here is What i want in it There Are 3 Teams 1 Of Innocents That Run From The Killer A Team Of 1 player as the sherrif (Has a gun/rune that can kill only the Killer) A Team Of 1 player as the killer (Tries To Kill every player in the game) ------------------------------------------------------------------------------------------------------- The murderer can be indentified if somones saw him killing a mice,the mices will tell in the chat who is the killer and the sherif will try to shot him I want just one more thing (I hope i don't want to much xD) If the sherif gets killed another mice will be selected as a sherif,until all the players are death (The gun can be made if u use duck a rune will shot and if touches the killer,the killer would die) Thats all! Hope It Isn't Too much! xD PS:Sorry for bad english |
| 0 | ||
| function eventChatCommand(player,c,pname) if c:sub(0,4) == [[help]] then ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah"); end end Whenever one person types !help, it goes to all players. How do I fix this? |
| 0 | ||
Bradmouser a dit : function eventChatCommand(player,c,pname) if c:sub(0,4) == [[help]] then ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah",name,name); end end Dernière modification le 1440576420000 |
| « Citoyen » 1440594420000
| 0 | ||
| Look at the script I posted, and compare the eventChatCommand section to yours. See that you have to add "pname" to ui.addPopup. ui.addPopup(0, 6,"all of that other stuff, blah, blah, blah",pname) If pname is nil, it sends to all players. |
| « Citoyen » 1440687780000
| 0 | ||
| There are 8 viprin-made cheeses,if a mouse touches all the cheeses will get the real cheese,like in bafflua. Dernière modification le 1440689040000 |
| « Citoyen » 1440709140000
| 0 | ||
Bradmouser a dit : code a dit : there is no 3rd argument in that event, so a less confusing code would be like this: code a dit : Dernière modification le 1440709260000 |
| « Citoyen » 1440837720000
| 0 | ||
Eshkation a dit : This doesn't happen for me. Perhaps it's an issue with your computer's font? |
| « Citoyen » 1441904940000
| 0 | ||
| How to kill someone who is near me (not a specific player)? |
| « Citoyen » 1442007600000
| 0 | ||
| Removed Dernière modification le 1442076000000 |
| « Citoyen » 1442074860000
| 0 | ||
dianliar a dit : The following function kills the players near(distance is less than 60) you. function killNear(yourname) local range = 60^2 -- if "near me" means that the distance between you and another is less than 60 local you = tfm.get.room.playerList[yourname] if you then for name, player in pairs(tfm.get.room.playerList) do if name~=yourname and (player.x - you.x)^2 + (player.y - you.y)^2 < range then tfm.exec.killPlayer(name) end end end end Dernière modification le 1442076540000 |
| « Citoyen » 1442212980000
| 0 | ||
| Thanks! :3 |
| « Citoyen » 1442864220000
| 0 | ||
| Can I have a code that when you double tap in a direction, a token spawns under you and allows you to boost in that direction with a .5 second cooldown. Also a tiny guide on how to use the script for tribe house :P |
| « Citoyen » 1443263040000
| 0 | ||
| [/quote] hpocks a dit : Hey so I had to tweak the request a bit but I have made what you were essentially asking, just without the tokens due to the fact that (AFAIK) it's not possible. interval = 2 data = { name = "Jamesqwartz", -- Replace this with your username clicked = true, timestamp = os.time() } system.bindMouse(data.name, true) function eventMouse(name, x, y) data.clicked = not data.clicked if data.clicked and data.timestamp < os.time()-500 then if x-tfm.get.room.playerList[data.name].x > 0 then tfm.exec.movePlayer(name, 0, 0, false, 85, 0, true) else -- These values control power, (positive numbers for -->, negative numbers for <--). Change them to whatever you want! tfm.exec.movePlayer(name, 0, 0, false, -85, 0, true) end data.timestamp = os.time() end end function eventLoop() if not data.clicked then interval = interval - 1 if interval == 0 then data.clicked = not data.clicked interval = 2 end end end As for how to use it, type /lua when you are in your tribehouse and paste the script above into the box that pops up, press submit and you're done. Dernière modification le 1443263160000 |
| « Citoyen » 1443275700000
| 0 | ||
Jamesqwartz a dit : hpocks a dit : Hey so I had to tweak the request a bit but I have made what you were essentially asking, just without the tokens due to the fact that (AFAIK) it's not possible. interval = 2 data = { name = "Jamesqwartz", -- Replace this with your username clicked = true, timestamp = os.time() } system.bindMouse(data.name, true) function eventMouse(name, x, y) data.clicked = not data.clicked if data.clicked and data.timestamp < os.time()-500 then if x-tfm.get.room.playerList[data.name].x > 0 then tfm.exec.movePlayer(name, 0, 0, false, 85, 0, true) else -- These values control power, (positive numbers for -->, negative numbers for <--). Change them to whatever you want! tfm.exec.movePlayer(name, 0, 0, false, -85, 0, true) end data.timestamp = os.time() end end function eventLoop() if not data.clicked then interval = interval - 1 if interval == 0 then data.clicked = not data.clicked interval = 2 end end end As for how to use it, type /lua when you are in your tribehouse and paste the script above into the box that pops up, press submit and you're done.[/quote] Doesnt seem to be functioning at all... Are there some variables I have to change? I dont understand that "These Values Control Power..". What are "these values"? |