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.
|
|
|
3
|
Other / Trouble in Terrorist Town / Re: Spectator Cam
|
on: March 01, 2012, 12:30:18 AM
|
*** 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)?
|
|
|
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)
|
|
|
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)
|
|
|
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.
|
|
|
|
|