Ulysses

General => Developers Corner => Topic started by: SSJ2 Vegeta on August 13, 2015, 08:40:37 AM

Title: Redirect Code help
Post by: SSJ2 Vegeta 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)
Title: Re: Redirect Code help
Post by: SSJ2 Vegeta on August 13, 2015, 08:42:55 AM
disregard this, he fixed it. he didnt tell me he could do some lua.