Jump to content

[REL]Group System


Smart.

Recommended Posts

Releasing a group system I made for a project that never was finished and instead of it taking up space on my hdd and doing no good I decided to release it.

The group system comes with:

Group List

Custom Ranks

Group Chat (/gc text)

Group Info

Group Invites

Group Warnings (100+ warning level = kick)

Ability to change turf and/or group color (/chatcolor R G B /turfcolor R G B)

It works well with both sqlite and MySQL.

Export functions:

viewWindow(player) -- opens the group window for the player 
  
getGroupRankCount(rank) -- returns an integer of how many things the rank has access to 
  
getPermissionCount(player) -- returns an integer of how many things the player has access to 
  
checkGroupAccess(player, actionID or actionString) -- checks if the player has access to the action. I'll provide you with a table later, either the number or the string works well. 
  
outputGroupMessage(message, group) -- outputs a message to every player in the group with the group color 
  
getPlayerJoinDate(player) -- get the date when the player joined his group 
  
getPlayerWarningLevel(player) -- get the current warning level of the player 
  
getPlayerGroupRank(player) -- get the rank string of the player 
  
getPlayerGroup(player) -- get the group string of the player 
  
getGroupMembers(group) -- returns a table of the player(s) inside that group (not entirely sure whether I finished this function, if not I will soon) 
  
isRank(string) -- checks if the rank exists 
  
removeRank(group, rank) -- removes the given rank from the group 
  
getGroupChatColor(group) -- returns a R G B with the chat color. 
  
-- The permission table: 
  
local permToTable = { 
    [1] = "invite", 
    [2] = "promote", 
    [3] = "demote", 
    [4] = "kick", 
    [5] = "warn", 
    [6] = "delete", 
    [7] = "deposit", -- -- Irrelevant because feature is not made, yet. 
    [8] = "withdraw", -- -- Irrelevant because feature is not made, yet. 
    [9] = "editInfo", 
    [10] = "viewLog", -- Irrelevant because feature is not made, yet. 
    [11] = "viewBlacklist", -- -- Irrelevant because feature is not made, yet. 
    [12] = "addBlacklist", -- Irrelevant because feature is not made, yet. 
    [13] = "changeTurfColor", 
    [14] = "modifyAlliance", -- Irrelevant because feature is not made, yet. 
    [15] = "modifyRanks", 
} 

Download Link: https://community.multitheftauto.com/index.php?p= ... ls&id=8291

Couple of screenshots:

d8e66e7955b87bdcab0a51131ea06750.png

007b0550b3a3e285740779274d2bc812.png

5409d17fa11ea82780f359e455989839.png

fb4a98d84491aa72a9b89cb38513b2d1.png

6b9c33eb1c93c34bc26a8e3cc5ee3122.png

Little Extra: If you use it with MySQL which I suggest then you can do fun things like a group list on a website using this php code (Note: Isn't tested might not work but it should) :

<?php$con=mysqli_connect("localhost","root","password","name");// Check connectionif (mysqli_connect_errno())  {  echo "Failed to connect to MySQL: " . mysqli_connect_error();  } $result = mysqli_query($con,"SELECT * FROM groups ORDER BY date DESC"); while($row = mysqli_fetch_array($result))  {  echo "Group Name: " . $row["name"] . " - Leader: " . $row["leader"] . " - Created: " . $row["date"];  echo "
";  } mysqli_close($con);?>

Edited by Guest
Link to comment
  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

i can't create a group i got this error:

[18:46:27] ERROR: Client ................ triggered serverside event groupSystem. but event is no added serverside

what's that ??

Not entirely sure, seems like I fucked up something when I added the log option yesterday and I'm currently on my mac which i need to install windows on, will take a look at it later. Is there any debug about the .slua file not being loaded?

Link to comment
[19:01:10] SCRIPT ERROR: groups_system\group.slua:155: 'end' expected near 'return'

[19:01:10] ERROR: Loading script failed: groups_system\group.slua:155: 'end' expected near 'return'

^^

Replace line 157 in group.slua with this:

if (not groupTable[group]) then return 255, 255, 255 end 

Link to comment

Little Extra: If you use it with MySQL which I suggest then you can do fun things like a group list on a website using this php code (Note: Isn't tested might not work but it should) :

<?php$con=mysqli_connect("localhost","root","password","name");// Check connectionif (mysqli_connect_errno())  {  echo "Failed to connect to MySQL: " . mysqli_connect_error();  } $result = mysqli_query($con,"SELECT * FROM groups ORDER BY date DESC"); while($row = mysqli_fetch_array($result))  {  echo "Group Name: " . $row["name"] . " - Leader: " . $row["leader"] . " - Created: " . $row["date"];  echo "
";  } mysqli_close($con);?>

Important ?????

ERROR: exports: Call to non-running server resources (CEDmisc) [string "?"]

you should upload CEDmisc :redhotevil:

ERROR: groupsys/group.slua253: attempt to concatenate local 'time' (a nil value)
Link to comment

Little Extra: If you use it with MySQL which I suggest then you can do fun things like a group list on a website using this php code (Note: Isn't tested might not work but it should) :

<?php$con=mysqli_connect("localhost","root","password","name");// Check connectionif (mysqli_connect_errno())  {  echo "Failed to connect to MySQL: " . mysqli_connect_error();  } $result = mysqli_query($con,"SELECT * FROM groups ORDER BY date DESC"); while($row = mysqli_fetch_array($result))  {  echo "Group Name: " . $row["name"] . " - Leader: " . $row["leader"] . " - Created: " . $row["date"];  echo "
";  } mysqli_close($con);?>

Important ?????

ERROR: exports: Call to non-running server resources (CEDmisc) [string "?"]

you should upload CEDmisc :redhotevil:

ERROR: groupsys/group.slua253: attempt to concatenate local 'time' (a nil value)

I'll have it updated asap for now the resource does NOT work. (Can't update it right now as I've changed computer and seems like I lost couple of resources but will fix it asap as I said)

Link to comment
  • 1 month later...

How do I get it to work I have to put it in acl admin? or create an acl named Group?

Please make a tutorial step by step how to make it work, I have a server with more than 90 players and I want to put a group system for personal fun, and this seems to be your cool.

notice: No one on my server is getting to create group

ERROR: Client <#000000Nick> triggered serverside event group pSystem.attemptMakeGroup, but event is not added serverside

Link to comment
  • 2 weeks later...

I've fixed all errors and it should now work perfectly.

How do I get it to work I have to put it in acl admin? or create an acl named Group?

Please make a tutorial step by step how to make it work, I have a server with more than 90 players and I want to put a group system for personal fun, and this seems to be your cool.

notice: No one on my server is getting to create group

ERROR: Client <#000000Nick> triggered serverside event group pSystem.attemptMakeGroup, but event is not added serverside

No it doesn't require ACL rights there was a few errors with the resource that I've fixed.

Link to comment
  • 2 weeks later...

A really good job man. Just a suggestion: Are there some way to put the clan name linked with the default group system that the scoreboard has? Like:

-----------------------------------------------

PlayerNoclan |

PlayerNoclan2 |

ClanName [3Players] |

Player1 |

Player2 |

Player3 |

ClanName2 [3Players]--------------------|

Player10 |

Player11 |

Plauer12 |

------------------------------------------------

PD:I tried my best :cry:

Link to comment
I've fixed all errors and it should now work perfectly.
How do I get it to work I have to put it in acl admin? or create an acl named Group?

Please make a tutorial step by step how to make it work, I have a server with more than 90 players and I want to put a group system for personal fun, and this seems to be your cool.

notice: No one on my server is getting to create group

ERROR: Client <#000000Nick> triggered serverside event group pSystem.attemptMakeGroup, but event is not added serverside

No it doesn't require ACL rights there was a few errors with the resource that I've fixed.

download link?

Link to comment
  • 3 weeks later...

I'm testing this system in my server and sometimes the players lose his team (the founder) so the team is deleted, any bug there? No errors in the debugscript, sometimes the bug is in this line:

function printManagment(player) 
    if (player) then player = client end 
    local group = getPlayerGroup(client) 
    for ind, data in pairs(GAC) do 
        if (data[1] == group) then 
            local rank, warning, joined, lastTime = GAC[ind][2], GAC[ind][3],GAC[ind][4], GAC[ind][5] 
            triggerClientEvent(client, "groupSystem.addToList", client, tostring(ind), rank, warning, joined, lastTime, "N/A", getAccountPlayer(getAccount(ind))) --Here is the error (Bad Argument @ getAccountPlayer) 
        end 
    end 
end 
addEvent("groupSystem.print", true) 
addEventHandler("groupSystem.print", root, printManagment) 

Link to comment

@stolka, you can just use the exports. getPlayerGroup returns the group they're in, and you can use it in conjunction with a turf system. It's open source, hence easily editable. That also means you can add more features to it.

There is probably some all-in-one turf + group system on community.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...