• Deathmatch- Gamemode
    13 replies, posted
I am working on a gamemode, its a deathmatch gamemode. So I decided to share a bit of what I got so far, this is my first time. So it doesn't look pro. the shared.lua [code] GM.Name = "Deathmatch" GM.Author = "James Roll" GM.Email = "easims3@yahoo.com" GM.Website = "http://rockandrollgaming.freeforums.org" DeriveGamemode( "base" ) team.SetUp( 1, "Blue", Color( 0, 0, 255, 255) ) team.SetUp( 2, "Red", Color( 255, 0, 0, 255) ) [/code] the init.lua [code] AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) function GM:PlayerInitialSpawn(ply) local teamn = math.random(1, 2) math.randomseed(os.time()) if team.NumPlayers(1) < team.NumPlayers(2) and teamn == 1 then ply:SetTeam(1) else ply:SetTeam(2) end end function GM:PlayerLoadout(ply) if (ply:Team() == 1) then ply:Give("weapon_crowbar") ply:Give("weapon_pistol") ply:Give("weapon_smg1") ply:Give("weapon_rpg") ply:GiveAmmo(2, "RPG_Round") ply:GiveAmmo(55, "smg1") ply:GiveAmmo(55, "pistol") else ply:Give("weapon_crowbar") ply:Give("weapon_pistol") ply:Give("weapon_smg1") ply:Give("weapon_rpg") ply:GiveAmmo(2, "RPG_Round") ply:GiveAmmo(55, "smg1") ply:GiveAmmo(55, "pistol") end end function GM:GetFallDamage( ply, speed ) return ( speed / 14 ) end [/code] the cl_init.lua [code] include( 'shared.lua' ) [/code]
I don't recommend deriving from sandbox if you're going to disable the spawnmenu.
What one should I use? Base? Base did make the scoreboard look nice.
Yeah, derive from base and remove the GM:SpawnMenuX hooks
Ok thats better, now time to get working on the HUD. [editline]4th April 2011[/editline] Who thinks this is a good HUD for the health? If not feel free to add or remove some things. [code] function myhud() local client = LocalPlayer() if !client:Alive() then return end if(client:GetActiveWeapon() == NULL or client:GetActiveWeapon() == "Camera") then return end draw.SimpleText(client:Health() .. "%", "healthhud", ScrW() / 2 - 435, ScrH() - 63, Color(0,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) local mag_left = client:GetActiveWeapon():Clip1() local mag_extra = client:GetAmmoCount(client:GetActiveWeapon():GetPrimaryAmmoType()) local secondary_ammo = client:GetAmmoCount(client:GetActiveWeapon():GetSecondaryAmmoType()) surface.CreateFont("coolvetica",150,900,false,false,"healthhud") surface.SetFont("healthhud") end hook.Add("HUDPaint", "myhud", myhud) [/code]
HUD, failed. Updates, just gonna remove the updates and keep what I have. I might make it super epic with a team of developers and sell it for like 5 bucks.
I loled so hard. No one is going to join a team to make a team deathmatch gamemode for you to sell a £5 budget gamemode.
why are you making a random number when the player joins for the first time? you could just use [url]http://wiki.garrysmod.com/?title=Team.BestAutoJoinTeam[/url] and then you could have even more teams. Also why put the exact same load out for each team in the if statement. what i would do is give the player everything you want everyone to have then go into team specific things. In your hud you don't creat fonts inside that hook. If i remember right it's in the initialize hook on client.
I just put a basic part of my script in there, I have a lot more done on it, pluss my developers are helping create it look even nicer. 5 bucks doesn't seem bad for, custom HUD's, Scoreboards, Weapons, Models, Maps, now does it?
are you.... kidding me... you have the slightest thought... of selling a gamemode for gmod? wow inb4ban btw
I'm sorry.. but nobody will spend 5$ to buy a Deathmatch gamemode that they could do by following the tutorial on gmodwiki... sorry. :/
@Marine I wish I knew what inb4ban meant, oh and. Apparently you haven't played Garrys Mod enough to know that there are some epic gamemodes out there that cost money... Like, 200 dollars, and the 900 dollars gamemode. So don't start complaining to me because I want to sell a gamemode for around 5 dollars. The gamemode will be advanced! Not some gay DarkRP gamemode, so stop complaining. You don't need to buy it first of all. And to add, I do not want a bunch of people using the gamemode, because then there will be like 100 servers with it, like DarkRP. There are so many DarkRP servers it makes DarkRP look stupid. Rant, done. [editline]8th April 2011[/editline] @Fatpanda Actually some people would, it will have lots of custom things. Such as player models, guns, maps, etc. Its not that simple how you think, its more advanced. Fyi that is a bit I pulled out of the gamemode. There will be money systems, kills, deaths, all that will be listed on the scoreboard, and will stay the same even after server restarts. So don't think of it as a crappy gamemode that any new scripter can throw together. I will take my time with the few people helping develop it. [editline]8th April 2011[/editline] Well, my pc got a virus and I restored it. So time to start it over. I might just delete this post in a few days then make a better thread with information on it and all that good stuff.
I'm gonna be straight up.. This just looks terrible. You're not really doing much editing, Add some cool feature's that make people wanna buy it. Anyone can make a deathmatch server. And the fact that you wanna sell this? Tsk Tsk. There's no :effort:
Yes I understand what your saying, but actually. My computer got a virus and I had to restart, the little I had. As of now, I have a few cool features on it, and a few things in mind to add. [b] Added[/b]- A money system [i]Thats really much it I have so far[/i] [b]To Add[/b]- A gun system, to buy custom system Money adds to your profile when you kill someone But thats just a few, I am going to work on a lot more with my two other friends helping me. Don't forget the map pack I will make for it, and all the custom guns being worked on, and the models. [editline]13th April 2011[/editline] Oh, and I will be making a thread, that has more information on it, some cool pictures, and in detail to it. I also add, I [b]MIGHT[/b] sell it, I never said I will. It's just a idea running through my head. If it turns out really good, I will. If it's to simple, I wont.
Sorry, you need to Log In to post a reply to this thread.