I’m working on a party system and I’m making the logic functions right now.
This is what I have so far:
sv_party.lua local plyMeta = FindMetaTable( "Player" ) --[GetParty] function plyMeta:GetParty() return --Get players party name here, this is where I'm stuck. I don't know how to actually create the party framework. end --[isInParty] function plyMeta:IsInParty() if self:GetParty() then return true --if GetParty returns NIL then we conclude they aren't in a party and IsInParty returns false. end end
As shown above, I kind of have an idea of what I’m doing, I just don’t know where to even start on making a framework for this. I have a Create Party button on my Derma menu".
I think I should use tables to generate the party, and then for each party it has specific values like who the owner is, and who is in the party.
However, I don’t have any idea how to construct the table at all, let alonst so that there can be more than 1 party. If i remember correctly you have to assign the table to the player so that there can be more than one and i won’t just be grabbing info from the same first party that’s created.
On top of that, how would I go about using these functions on the clientside part so it doesn’t return an “Attempt to call method IsInParty” error when I use it on the client?
Thanks for reading.