Guest User

Untitled

a guest
Jan 19th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. /*if CLIENT then return end
  2.  
  3. if IsValid(TESTNPC) then
  4. TESTNPC:Remove()
  5. end
  6.  
  7. local npc = ents.Create("speaking_npc")
  8. TESTNPC = npc
  9. npc:SetPos(Vector(0,0,0))
  10. npc:Spawn()
  11.  
  12. npc.Language = "pl"
  13.  
  14. local d = npc:GetDialogue()
  15. d:AddCustomText("Srać panię w dupę się łotrowi chciało")
  16. d:AddCustomText("You don't really have to do anything there, but you can for example test his addons.")
  17. d:AddCustomText("What would you like to know?")
  18.  
  19. local loop = Dialogue()
  20. d:AddDialogueChange(loop)
  21.  
  22. local whois = loop:AddOption("Who is Szymekk?")
  23. whois:AddCustomText("Szymekk is a developer.")
  24. whois:AddCustomText("He makes addons for Garry's Mod.")
  25.  
  26. local profile = loop:AddOption("Show me his profile")
  27. profile:AddCustomText("Here you go!")
  28. profile:AddFunction(function(npc, ply)
  29. ply:SendLua("gui.OpenURL('http://steamcommunity.com/profiles/76561198017720556/')")
  30. end)
  31.  
  32. local pretty = loop:AddOption("You're pretty")
  33. pretty:AddFunction(function(npc)
  34. npc:SetFlexWeight(42,1)
  35. end)
  36. pretty:AddDelay(1)
  37. pretty:AddCustomText("Thank you my boy!")
  38. pretty:AddDelay(1)
  39. pretty:AddFunction(function(npc)
  40. npc:SetFlexWeight(42,0)
  41. end)
  42.  
  43. local pretty = loop:AddOption("Kill me")
  44. pretty:AddCustomText("Why?")
  45. pretty:AddDelay(1)
  46. pretty:AddCustomText("Actually, why not.")
  47. pretty:AddFunction(function(npc, ply)
  48. ply:Kill()
  49. end)
  50. pretty:AddDelay(1)
  51. pretty:AddCustomText("Haha. You wanted that.")
  52. pretty:AddExit()
  53.  
  54. local exit = loop:AddOption("Thank you")
  55. exit:AddCustomText("Bye!")
  56. exit:AddExit()
  57. */
  58.  
  59. if CLIENT then return end
  60.  
  61. if IsValid(TESTNPC) then
  62. TESTNPC:Remove()
  63. end
  64.  
  65. hook.Add("InitPostEntity", "SpeakingNPCSpawn", function()
  66. timer.Simple(20, function()
  67. local npc = ents.Create("speaking_npc")
  68. TESTNPC = npc
  69. npc:SetPos(Vector( 1184, 2938, -660))
  70. npc:SetAngles(Angle(0,90,0))
  71. //npc:SetPos(player.GetAll()[1]:GetPos())
  72. npc:Spawn()
  73.  
  74. npc.Language = "pl"
  75.  
  76. local d = npc:GetDialogue()
  77. d:AddCustomText("Cześc przyjacielu!.", "http://rage-gaming.pl/@/v/przyjaciel.mp3")
  78. d:AddCustomText("Na utrzymanie serwera wydajemy ponad 300 zł miesięcznie, może byś nam pomógł w jego utrzymaniu.", "http://rage-gaming.pl/@/v/utrzymanie.mp3")
  79.  
  80. local loop = Dialogue()
  81. d:AddDialogueChange(loop)
  82.  
  83.  
  84.  
  85. local vip = loop:AddOption("Ranga VIP")
  86. vip:AddCustomText("Świetnie!", "http://rage-gaming.pl/@/v/swietnie.mp3")
  87. vip:AddCustomText("VIP pozwala na używanie zablokowanych prac, takich jak: ", "http://rage-gaming.pl/@/v/uzywanie.mp3")
  88. vip:AddCustomText("SWAT", "http://rage-gaming.pl/@/v/swat.mp3")
  89. vip:AddCustomText("DJ", "http://rage-gaming.pl/@/v/dj.mp3")
  90. vip:AddCustomText("HITMAN", "http://rage-gaming.pl/@/v/hitman.mp3")
  91. vip:AddCustomText("Dodatki typu: Adv. Dup. 2 oraz E2", "http://rage-gaming.pl/@/v/dodatki.mp3")
  92. vip:AddCustomText("To jak skusisz się?", "http://rage-gaming.pl/@/v/skusisz.mp3")
  93. local yes = vip:AddOption("Tak")
  94. yes:AddCustomText("Dzieki!", "http://rage-gaming.pl/@/v/dzieki.mp3")
  95. yes:AddFunction(function(npc, ply)
  96. net.Start("vip_show")
  97. net.Send(ply)
  98. end)
  99. yes:AddExit()
  100. local no = vip:AddOption("Nie")
  101. no:AddCustomText("Nie, wracaj!", "http://rage-gaming.pl/@/v/wracaj.mp3")
  102. no:AddDialogueChange(loop)
  103.  
  104. local group = loop:AddOption("Grupa Steam")
  105. group:AddCustomText("Dołącz do naszej grupy Steam, aby otrzymywać najnowsze powiadomienia o serwerze.", "http://szymekk.info/@/v/23.mp3")
  106. group:AddFunction(function(npc, ply)
  107. ply:SendLua("gui.OpenURL('http://steamcommunity.com/groups/ragegangs')")
  108. end)
  109.  
  110.  
  111. local exit = loop:AddOption("Zamknij")
  112. exit:AddExit()
  113. end)
  114. end)
Add Comment
Please, Sign In to add comment