Smart. Posted November 25, 2013 Share Posted November 25, 2013 (edited) 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: 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 February 11, 2014 by Guest Link to comment
Spajk Posted November 25, 2013 Share Posted November 25, 2013 Nice work, a big amount of people will use it for sure Link to comment
xXMADEXx Posted November 25, 2013 Share Posted November 25, 2013 Looks really good! Nice job. Link to comment
Chronos Posted November 25, 2013 Share Posted November 25, 2013 i can't create a group i got this error: [18:46:27] ERROR: Client ................ triggered serverside event groupSystem.attemptMakeGroup, but event is no added serverside what's that ?? Link to comment
Smart. Posted November 26, 2013 Author Share Posted November 26, 2013 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
Chronos Posted November 26, 2013 Share Posted November 26, 2013 [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' ^^ Link to comment
xXMADEXx Posted November 27, 2013 Share Posted November 27, 2013 [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
Snow-Man Posted November 28, 2013 Share Posted November 28, 2013 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 ERROR: groupsys/group.slua253: attempt to concatenate local 'time' (a nil value) Link to comment
Smart. Posted November 29, 2013 Author Share Posted November 29, 2013 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 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
Smart. Posted January 22, 2014 Author Share Posted January 22, 2014 (edited) In case you haven't realized yet, I'm not fixing this if you want to use it you'll have to fix it yourself. Edited February 8, 2014 by Guest Link to comment
Bilal135 Posted January 25, 2014 Share Posted January 25, 2014 Great Job! Keep It Up! Link to comment
Henn Posted January 27, 2014 Share Posted January 27, 2014 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
Smart. Posted February 8, 2014 Author Share Posted February 8, 2014 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
Chaz-CR Posted February 23, 2014 Share Posted February 23, 2014 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 Link to comment
Henn Posted February 25, 2014 Share Posted February 25, 2014 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
Spajk Posted February 25, 2014 Share Posted February 25, 2014 @Chaz It's called teams and yes, using the exported functions provided by this system it can be easly done. @Henn It's in the first post. Link to comment
xXMADEXx Posted February 26, 2014 Share Posted February 26, 2014 I couldn't help myself but to post this when I saw it lol. Link to comment
Chaz-CR Posted March 22, 2014 Share Posted March 22, 2014 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- Posted March 23, 2014 Share Posted March 23, 2014 is there any turf system which works with this groups sysstem? Link to comment
Noki Posted March 23, 2014 Share Posted March 23, 2014 @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
Lumia Posted March 23, 2014 Share Posted March 23, 2014 Nice job man, looks good, no one has ever released a group system this good. Link to comment
-stolka- Posted March 24, 2014 Share Posted March 24, 2014 whaat is the exported function to get the turf color? i mean the function that returns with r,g,b? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now