Advertisement
Hachem16

Talking pane :D

Dec 14th, 2013
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. ui.addTextArea(0, "thing", nil, nil, nil, nil, nil, nil, nil, 0.5, true)
  2.  
  3. string = {}
  4.  
  5.  
  6. function eventChatCommand(playerName, cmd)
  7. if cmd:sub(0,1)=="p" then
  8. table.insert(string, "<font color='#0880fe' size='16'><b>"..playerName.."</b></font> : <font size='16'>"..cmd:sub(3).."</font>")
  9. elseif cmd=="reset" then
  10. for i=0,#string do
  11. table.remove(string, i)
  12. end
  13. table.insert(string, "<font size='18' color='#008000f'>Updated for the longest</font>")
  14. elseif cmd=="input" then
  15. ui.addPopup(0, 2, "<font color='#00800f' size='15.4'>Input</font>", playerName, 400, 50)
  16. end
  17. end
  18.  
  19. function eventLoop()
  20. ui.updateTextArea(0, table.concat(string, "\n"))
  21. end
  22.  
  23. function eventPopupAnswer(iD, playerName, ans)
  24. if iD==0 then
  25. table.insert(string, "<font color='#0880fe' size='16'><b>"..playerName.."</b></font> : <font size='16'>"..ans.."</font>")
  26. end
  27. end
  28.  
  29.  
  30. system.disableChatCommandDisplay("p", true)
  31. system.disableChatCommandDisplay("input", true)
  32. system.disableChatCommandDisplay("reset", true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement