Author Topic: Redirect Code help  (Read 2156 times)

0 Members and 2 Guests are viewing this topic.

Offline SSJ2 Vegeta

  • Newbie
  • *
  • Posts: 14
  • Karma: -5
Redirect Code help
« on: August 13, 2015, 08:40:37 AM »
Hi, i have a little bit of code i edited from another post here, and i had a member try it and it didnt work. Little help?



hook.Add( "PlayerSay", "TTN Chat Commands", function(ply, text)
   if (string.lower(text) == "!purebuild" ) then --Did the player say the specific command?
      ply:SendLua("LocalPlayer():ConCommand('connect 192.223.29.20:27015')")
      return "" --Keeps chat box from printing command
   end
   if (string.lower(text) == "!buildkill" ) then --Did the player say the specific command?
      ply:SendLua("LocalPlayer():ConCommand('connect 192.223.29.40:27015')")
      return "" --Keeps chat box from printing command
   end
   if (string.lower(text) == "!prophunt" ) then --Did the player say the specific command?
      ply:SendLua("LocalPlayer():ConCommand('connect 74.91.114.71:27015')")
      return "" --Keeps chat box from printing command
   end
end)

Offline SSJ2 Vegeta

  • Newbie
  • *
  • Posts: 14
  • Karma: -5
Re: Redirect Code help
« Reply #1 on: August 13, 2015, 08:42:55 AM »
disregard this, he fixed it. he didnt tell me he could do some lua.