Yea, i've just finished recreating a simple TeamDeathmatch fretta gamemode,rebels Vs. Combine.
I've modified it quite a bit, added a new class, and i've had some ideas with this i'd love to implement. Sadly, i have no idea how to even start with them, nor where to put them as they seem a bit advanced to me.
1: The mode is now CS-styled. Teambased, and round ends when one team is still alive. I'd like to make it so that the people who die, can respawn two times, then they're completely dead untill next round.
2: After 1 is completed, and the last team standing wins, it makes it so that the survivors of the winning team now have to fight and kill eachother for some extra points. Round ends if there's only one man left.
This seems pretty advanced, and have no idea how to start with it, so all input and constructive criticism is welcome :biggrin:
I realize this may be too hard for a newbie like me, bit i'd like atleast to be set in the right direction, or to be given some hints as to how i should approach this, and start with it. :frown:
Well, for the first one. I would set it like this.
[lua]function PlayerDead(ply, attacker, dmginfo)
if ( ply:GetNWInt("deaths") != 2 ) then
ply:SetNWInt("deaths", ply:GetNWInt("deaths") + 1)
else
//If their NWInt deaths is set to 2, don't allow them to spawn.
end
end
hook.Add( "DoPlayerDeath", "PDeath", PlayerDead )[/lua]
[editline]07:59PM[/editline]
For the second one I would just set everybody that is alive having the ability to hurt each other, through [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerShouldTakeDamage]Gamemode.PlayerShouldTakeDamage [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook, and just respawn all of the alive players in random spawn points with something like this.
[lua]SpawnPoints{
"random spawn point",
"random spawn point2"
}
ply:SetPos(math.random(SpawnPoints))[/lua]
Of course it'd be more complex than that, you've have to check if a player is in that spawn position already, Or you could just check for the entities of info_terrorist entities and place random spawn points there. Up to you.
Sorry, you need to Log In to post a reply to this thread.