Welcome, Guest. Please login or register.
Did you miss your activation email?
November 27, 2024, 02:16:09 AM
Home Help Login Register
News: Zombie Master 2 discussion

  Show Posts
Pages: [1] 2 3 4 ... 20
1  Other / Trouble in Terrorist Town / Re: TTT custom commands on: March 04, 2012, 09:19:46 AM
The rest is bog standard gmod Lua. If you're looking to learn Lua you picked a horrible time, because garry has replaced the wiki with a version that does not contain any information, because the old one was "messy" or something.

He can still use the mirror.
2  Other / Trouble in Terrorist Town / Re: Help! on: March 02, 2012, 01:26:28 AM
-snip- Sorry, nevermind.
3  Other / Trouble in Terrorist Town / Re: Spectator Cam on: March 01, 2012, 12:30:18 AM
Quote from:  "Bigcot"
*** Issue fix ***

Something simple that was wrong on my part, for some reason there was a cvar command on my serverconfig that was there when I bought the server called,

mp_fixedcamera, or something along those lines I removed that a poof instant magic.
[/quote]
4  Other / Trouble in Terrorist Town / Re: TTT Icon Issue on: February 28, 2012, 10:57:55 PM
The gun is still trying to play it from the sound/ folder. You need to change the code to play it from sound/LA/ (then again probably just LA/ since it already reads it from the sound/ directory), as for the materials, did you change the lua file that has the resource.AddFile lines to download the materials from the other directory (materials/vgui/LA)?
5  Other / Trouble in Terrorist Town / Re: TTT Icon Issue on: February 28, 2012, 09:05:47 PM
It's because you put them in "vgui/ttt/". Take them out of the "ttt" folder and put them somewhere else, then it should work.
6  Other / Trouble in Terrorist Town / Re: Garry's Mod 13 on: February 19, 2012, 05:39:40 AM
Does that mean TTT won't be in Gmod 13?

It means BKU will fix it when he wants to, it seems the beta is still in the early stages, so I doubt he'll be doing anything yet.
7  Other / Trouble in Terrorist Town / Re: Playing sounds if player leaves mid round on: February 19, 2012, 02:18:18 AM
surface.PlaySound already reads from the sound/ directory (meaning it's trying to play the file sound/sound/ragequit.mp3). Just change sound/ragequit.mp3 to ragequit.mp3. (Leave the resource.AddFile as it is.)


resource.AddFile("sound/ragequit.mp3")

local function PlaySound( )
  if GetRoundState() == ROUND_ACTIVE then
      BroadcastLua('surface.PlaySound("ragequit.mp3")')
  end
end
hook.Add("PlayerDisconnected", "GuyLeft", PlaySound)
8  Other / Trouble in Terrorist Town / Re: Playing sounds if player leaves mid round on: February 18, 2012, 05:31:53 AM
garrysmod/lua/autorun/server/filename.lua
9  Other / Trouble in Terrorist Town / Re: Playing sounds if player leaves mid round on: February 18, 2012, 01:59:05 AM
Gamemode.PlayerDisconnected

Something like this should work,

local function PlaySound( )
if GetRoundState() == ROUND_ACTIVE then
BroadcastLua('surface.PlaySound("your/sound.mp3")')
end
end
hook.Add("PlayerDisconnected", "GuyLeft", PlaySound)


Assuming that's what you meant.
10  Other / Trouble in Terrorist Town / Re: lua - determine if player is traitor on: February 11, 2012, 11:29:41 PM
-snip-
11  Other / Trouble in Terrorist Town / Re: Two lua files. Neither work. on: February 11, 2012, 02:31:28 AM

if SERVER then
  AddCSLuaFile("colours.lua")
else
  function OwnerColors(ply)
if ply:SteamID() == "STEAM_0:0:9310913" then -- Charrax
return Color( 5, 181, 225 )
end
end
hook.Add( "TTTScoreboardColorForPlayer", "OwnerColors", OwnerColors )
end


As for the music, are you getting any errors? (And you don't need to check the round state in the TTTBeginHook, it won't be getting called at any other time.) Try putting the sound files in somewhere other than /ttt/.
12  Other / Trouble in Terrorist Town / Re: Command help on: February 10, 2012, 02:48:17 AM
Something like this should work, not the best code so feel free to edit however you want.

hook.Add("PlayerInitialSpawn", "SitOut_Joined", function( ply )
       ply.SOCount = 0 -- Yes, they can avoid it by rejoining.
end)

local function SitOut(ply, cmd, args)
if !args[1] then return "" end
if ply:IsAdmin() then
local target
for k,v in pairs(player.GetAll()) do
if string.find(string.lower(v:Nick()), string.lower(args[1])) then
target = v
break
end
end

if target and target:IsValid() then
target.SOCount = target.SOCount+1
for k,v in pairs(player.GetAll()) do
if target.SOCount == 1 then
v:ChatPrint( target:Nick().." is sitting out one round!")
else
v:ChatPrint( target:Nick().." is sitting out the next "..target.SOCount.." rounds!")
end
end
else
ply:ChatPrint( args[1].." not found!")
end
else
ply:ChatPrint( "This is not the console command you are looking for.")
end
end
concommand.Add("ttt_sitout", SitOut)

local function SitOut2(ply, cmd, args)
if !args[1] then return "" end
if ply:IsAdmin() then
local target
for k,v in pairs(player.GetAll()) do
if string.find(string.lower(v:Nick()), string.lower(args[1])) then
target = v
break
end
end

if target and target:IsValid() then
if target.SOCount > 0 then
target.SOCount = target.SOCount-1
for k,v in pairs(player.GetAll()) do
if target.SOCount == 1 then
v:ChatPrint( target:Nick().." is sitting out one round!")
elseif target.SOCount > 1 then
v:ChatPrint( target:Nick().." is sitting out the next "..target.SOCount.." rounds!")
elseif target.SOCount == 0 then
v:ChatPrint( target:Nick().." is no longer sitting out any rounds!")
end
end
else
ply:ChatPrint( target:Nick().." doesn't have to sit out any rounds!")
end
else
ply:ChatPrint( args[1].." not found!")
end
else
ply:ChatPrint( "This is not the console command you are looking for.")
end
end
concommand.Add("ttt_nositout", SitOut2)

hook.Add("TTTBeginRound", "SitOut_Begin", function()
for k,v in pairs(player.GetAll()) do
if v.SOCount > 0 then
if not v:IsSpec() then
           v:Kill()
       end
       
       v:SetTeam(TEAM_SPEC)
       v:SetRole(ROLE_INNOCENT)
       v:Spawn()
       v.SOCount = v.SOCount-1
       if v.SOCount == 1 then
        v:ChatPrint( "You must sit out this round and the following round!" )
       elseif v.SOCount > 1 then
        v:ChatPrint( "You must sit out this round and the next "..v.SOCount.." rounds!" )
       elseif v.SOCount < 1 then
        v:ChatPrint( "You must sit out this round!" )
       end
   end
end
end)
13  Other / Trouble in Terrorist Town / Re: not owner with source mod on: January 28, 2012, 02:52:21 AM
Or use 2 systems... but thats just a bunch of extra work.

Or make a system to control/create groups in-game... But again, it's just a bunch of extra work.
14  Other / Trouble in Terrorist Town / Re: not owner with source mod on: January 28, 2012, 12:50:24 AM
Sourcemod isn't in lua, to have TTT recognize you as a superadmin you'll have to edit <garrysmod dir>/settings/users.txt and add your SteamID to the superadmin list.
15  Other / Trouble in Terrorist Town / Re: TTT Content help on: January 27, 2012, 06:23:50 AM
I'll help you out. I was thinking of doing community weapons, but in my opinion it's actually really easy once you get the hang of it.

Funny. This coming from the guy who just takes cache from other servers.
16  Other / Trouble in Terrorist Town / Re: Gamemode is considerably broken on: January 25, 2012, 10:12:00 AM
-snip
17  Other / Trouble in Terrorist Town / Re: pp_PixelRender on: January 19, 2012, 04:59:45 AM
useful, I'm sure alot of people have already learned about this thou.

Thread didn't need to be bumped.
18  Other / Trouble in Terrorist Town / Re: So, just got a TTT server through Artofwarcentral. on: January 14, 2012, 02:14:24 AM
Figured out where to put it.. but it won't let me edit the commandline, only the map.


AoWC is pretty horrible, OP.
19  Other / Trouble in Terrorist Town / Re: sGl Trouble in Terrorist Town on: January 11, 2012, 07:29:43 PM
LOL, You guys accused me and my community of DoSing you. Remember that you stupid mindfuck?

Yeah, Get lost sG belongs in the ground, Worst Fucking Shit Ever.

Please leave.

And don't come back.
20  Other / Trouble in Terrorist Town / Re: VGUI Issues. on: December 17, 2011, 10:36:29 PM
Getting the same issue.

(And interestingly enough with the Jihad bomb, too.)
Pages: [1] 2 3 4 ... 20


Login with username, password and session length

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines
Page created in 0.014 seconds with 18 queries.