Show Posts
|
Pages: [1] 2
|
3
|
Other / Trouble in Terrorist Town / Re: Trouble in Terrorist Town - a GMod gamemode
|
on: September 09, 2010, 07:25:09 PM
|
If a gamemode vote is displayed moments before a round ends, it is possible for the TTT Continue Vote to still appear and redo the gamemode vote, but the timer for the vote doesn't change so it's a bit messed up. To fix this, I just added an extra check to the StartContinueVote() function... if fretta_voting:GetBool() && !GetGlobalBool( "InGamemodeVote", false ) then
|
|
|
5
|
Other / Trouble in Terrorist Town / Re: [REQUEST] Lua script that auto-prints damage logs in console
|
on: September 08, 2010, 12:00:04 AM
|
Add the code below to the bottom of garrysmod/gamemodes/terrortown/gamemode/admin.luahook.Add( "TTTEndRound", "PrintDmgLog", function() for k, v in pairs( player.GetAll() ) do if (not ValidEntity(v)) or v:IsSuperAdmin() then v:ConCommand("ttt_print_damagelog") end end end )
When the round ends, this will force all Super Admins to use the ttt_print_damagelog console command. If you want this for players other than Super Admins, you're going to have to remove the check from the code above and the function "PrintDamageLog" in admin.lua
|
|
|
6
|
Other / Trouble in Terrorist Town / C4 Numpad [Clean]
|
on: September 06, 2010, 07:18:09 PM
|
I noticed that the C4 numpad had quite a few unused buttons, so I decided to clean it up myself. Here are some pictures: It's now cut down to only 11 buttons. The '0' key is smaller and there is a 'CLR' (or 'Clear') button for clearing the combination entered. DOWNLOAD: http://solidfiles.com/d/e161/INSALL:1. Place the contents into the garrysmod/gamemodes/terrortown/ folder and overwrite existing files. 2. Open terrortown/gamemode/init.lua and add AddCSLuaFile( "vgui/DNumPadC4.lua" ) at the top. 3. Open terrortown/gamemode/cl_init.lua and add include( "vgui/DNumPadC4.lua" ) at the top. If you could add this into the official TTT gamemode, Bad King Urgrain, that would be great.
|
|
|
9
|
Other / Trouble in Terrorist Town / Re: How do i translate that gamemode
|
on: August 31, 2010, 04:28:12 PM
|
Translateing the code wouldn't be very good idea. Of course you wouldn't translate the code, but you would have to look through all of the code to find text that is displayed in the code. Then you would edit that, so... as I said before, all of them.
|
|
|
10
|
Other / Trouble in Terrorist Town / Re: Need help on a karma code for my self
|
on: August 31, 2010, 03:43:39 PM
|
hey sam thank you for an update, im still not able to test it, if you want please add my steam Dueagleseye if you ever have time to join up in the server maybe you can give some suggestions as well You should be able to test it by yourself. Just type in console bot a couple of times and get your karma low. Also, I will not be able to test with you as I am busy coding my own edit of TTT.
|
|
|
12
|
Other / Trouble in Terrorist Town / Re: Changing Gun Model
|
on: August 31, 2010, 12:38:10 PM
|
What would i rename it to? Renaming it wouldn't do anything?
I renamed it to weapon_zm_crowbars still a crowbar. Renaming it will allow you to create a new weapon. To replace the crowbar, you're going to have to either overwrite it or change the gamemode code to give players your new weapon instead of the crowbar. To test that the weapon you added works, type in console sv_cheats 1 give weapon_zm_crowbars
|
|
|
13
|
Other / Trouble in Terrorist Town / Re: Adding new weapons
|
on: August 31, 2010, 12:35:09 PM
|
Add weapon scripts to garrysmod/gamemodes/terrortown/entities/weapons/weapon_ttt_<weaponname>/shared.lua
It will be automatically detected and should work as long as the script is correct. To edit the sound files in the lua script, look for a file path with the extension .mp3 or .wav and change the value within the quotes.
|
|
|
14
|
Other / Trouble in Terrorist Town / Re: Help with coloured names?
|
on: August 30, 2010, 08:46:44 PM
|
simmerdown, Lua is case-sensitive, so make sure that the user group you created in settings/users.txt has the exact same name in as in the IsUserGroup() function.
Also make sure that you named the file scoreboardcolors.lua
|
|
|
15
|
Other / Trouble in Terrorist Town / Re: Need help on a karma code for my self
|
on: August 30, 2010, 08:43:58 PM
|
Why not just test it out and not tamper with the code I wrote for you? Don't you think I would complete the code for you before I posted it? If you're curious, why not look it up on the GMod Lua wiki? http://wiki.garrysmod.com/?title=Usermessage.HookNot everything in Lua has the "function Name() <code> end" format. EDIT: Fixed the code, if you had errors they may be fixed now. //karma.lua - at the end of the KARMA.ApplyKarma function if ply:GetBaseKarma() <= 700 then umsg.Start( "LowKarmaWarning", ply ) umsg.Entity( ply ) umsg.End() end
//cl_init.lua - at the end of the script local function WarningReceived( data )
local ply = data:ReadEntity() if !IsValid( ply ) then return end
local color_red = Color(255,0,0) local color_gold = Color(255,165,0)
chat.AddText( color_red, "Warning", ply:Nick(), color_gold, " Low Karma: ", color_red, ply:GetBaseKarma(), color_gold, " Be Careful Autokick is at ", color_red, GetConVarString( "ttt_karma_low_amount" ) ) end usermessage.Hook( "LowKarmaWarning", WarningReceived )
|
|
|
16
|
Other / Trouble in Terrorist Town / Re: Changing Gun Model
|
on: August 30, 2010, 08:41:17 PM
|
Check to make sure there aren't any other model paths set that may be causing the issue. Also, check to make sure you didn't make a simple mistake such as saving to the wrong folder, it happens.
|
|
|
20
|
Other / Trouble in Terrorist Town / Re: Need help on a karma code for my self
|
on: August 30, 2010, 06:41:12 PM
|
I haven't tested, but this should work. //karma.lua - at the end of the KARMA.ApplyKarma function if ply:GetBaseKarma() <= 700 then umsg.Start( "LowKarmaWarning", ply ) umsg.Entity( ply ) umsg.End() end
//cl_init.lua - at the end of the script local function WarningReceived( data )
local ply = data:ReadEntity() if !IsValid( ply ) then return end
local color_red = Color(255,0,0) local color_gold = Color(255,165,0)
chat.AddText( color_red, "Warning", ply:Nick(), color_gold, " Low Karma: ", color_red, ply:GetBaseKarma(), color_gold, " Be Careful Autokick is at ", color_red, GetConVarString( "ttt_karma_low_amount" ) ) end usermessage.Hook( "LowKarmaWarning", WarningReceived )
Add the code to the files and location specified. If you get an error, post the exact error message you receive.
|
|
|
|
|