• Team Table
    10 replies, posted
Ok. Quick brief explanation of what I want. I want to setup table with variables on teams something like darkrp jobs.
Are you expecting someone to write this for you? That normally requires you pay them.
https://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index2584.html Says it's outdated but I believe it's still all correct information.
Does all that go through your head is money? How would someone improve without someone giving examples. No wonder the standard of coding is so low if people think "I won't help you unless you give me money" I would use a simple system like this, this is just an example. But it shows you one way to do it. Please note you will need to setup networking and so on. But its an example which will point you in the right direction. You could setup actual teams and do it through there. But in general that's only if you are doing things with are player vs player. local teams = { ["team1"] = { Health = 100, Speed = 1, Armor = 25, Model = "models/player/kleiner.mdl", Weapons = {"weapon_fist"}, }, ["team2"] = { Health = 10, Speed = 1, Armor = 25, Model = "models/player/kleiner.mdl", Weapons = {"weapon_physgun"}, }, } hook.Add("PlayerSpawn", "basic_team_frame", function(ply) if ply.Team then LoadOut(ply, ply.Team) else ply.Team = "team1" LoadOut(ply, ply.Team) end end) function LoadOut(ply, index) local tem = teams[index] ply:SetModel(tem.Model) ply:SetArmor(tem.Armor) ply:SetHealth(tem.Health) ply:SetMaxHealth(tem.Health) for _,str in pairs( tem.Weapons) do ply:Give(str) end end
I've actually looked thru darkrp code (which is shit btw) and found what I was looking for. For future people: local TeamIndex = 1 function CreateFaction( name, color, joinable, table ) team.SetUp( TeamIndex, name, color, joinable ) TeamIndex = TeamIndex + 1 return ourtable end And then simply FACTION_CITIZEN = CreateFaction( "Citizen", Color(255,255,255), true, { playermodel="playermodel", speed=100, someotherstuff=0 } )
Oh, no, I don't have a singular thing running through my head at any given moment. But it seems the general consensus around here is, if you're not willing to put in the initial effort, not many around here will do it for you. It was commentary about the forum mentality and not a suggestion about me wanting to be paid before I did anything.
see: undocumented jailbreak gamemode whose last update was 2016 and afaik is used by a number of the larger Jailbreak servers (not that there are many left, especially compared to DarkRP)
You are very right there, I don't use darkrp because its a frame killer, and your net graph looks really bad. Compared to a custom gamemode which gets over 2 double the frames (for me)
No, you have a misconception that the "standard of coding" is low - this is not the case because of money. If anything it's because people expect to be spoonfed code, and you end up just giving them the answers. People should be expected to put some effort into solving their own problem first.
There is a difference between spoon feeding code and pointing in the right direction. The guy literally said nothing helpful. And I am going to end it here or otherwise this might turn into an argument and I don't want that to happen.
Difference between an argument and a discussion, but if you don't have a point to stand on that happens I suppose. Anyway it was legit asking for spoon fed code, and you gave it. Just facts.
Sorry, you need to Log In to post a reply to this thread.