Smart. Posted March 25, 2014 Author Share Posted March 25, 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) I have no clue, haven't played MTA in ages. whaat is the exported function to get the turf color? i mean the function that returns with r,g,b? r,g b = getGroupChatColor(groupString) Thanks for the positive feedback! Link to comment
-stolka- Posted March 25, 2014 Share Posted March 25, 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) I have no clue, haven't played MTA in ages. whaat is the exported function to get the turf color? i mean the function that returns with r,g,b? r,g b = getGroupChatColor(groupString) Thanks for the positive feedback! is the argument the group name? Link to comment
MoeezKhan Posted April 2, 2014 Share Posted April 2, 2014 can you add group level.. nice works Link to comment
Smart. Posted April 3, 2014 Author Share Posted April 3, 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) I have no clue, haven't played MTA in ages. whaat is the exported function to get the turf color? i mean the function that returns with r,g,b? r,g b = getGroupChatColor(groupString) Thanks for the positive feedback! is the argument the group name? yep Link to comment
Mr_Moose Posted April 13, 2014 Share Posted April 13, 2014 is there any turf system which works with this groups sysstem? Take a look at this one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9056. Specially made to work with this group system and open source as well. Just remember to verify that the exported functions to get turf color and team color are in the meta.xml file of the group system. <export function="getGroupChatColor" type="server"/> <export function="getGroupTurfColor" type="server"/> It's currently in an early beta state and has only been quickly scripted and tested so there are some configuration to do to make it work, like a few variable names and other exports, but except for that it seems to be pretty appreciated after all. For some reason the whole inspiration for the turf system came from this group system so a special thanks to Smart for the group system. Link to comment
Smart. Posted April 14, 2014 Author Share Posted April 14, 2014 can you add group level..nice works Group level? There's group ranks already where you can modify the rank permissions? I'm also planning on improving this system or writing some of the missing functions such as making the group logs or perhaps something else you'd like to see? Link to comment
-stolka- Posted April 20, 2014 Share Posted April 20, 2014 is there any turf system which works with this groups sysstem? Take a look at this one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9056. Specially made to work with this group system and open source as well. Just remember to verify that the exported functions to get turf color and team color are in the meta.xml file of the group system. <export function="getGroupChatColor" type="server"/> <export function="getGroupTurfColor" type="server"/> It's currently in an early beta state and has only been quickly scripted and tested so there are some configuration to do to make it work, like a few variable names and other exports, but except for that it seems to be pretty appreciated after all. For some reason the whole inspiration for the turf system came from this group system so a special thanks to Smart for the group system. co thanks.. can you give me a working link for the resource 'ac-message' ? Link to comment
Mr_Moose Posted April 20, 2014 Share Posted April 20, 2014 @-stolka- https://community.multitheftauto.com/index.php?p=resources&s=details&id=8620, there you go, just remember to change the name in either export or the actual filename so it matches. Link to comment
-stolka- Posted April 20, 2014 Share Posted April 20, 2014 @-stolka- https://community.multitheftauto.com/index.php?p=resources&s=details&id=8620, there you go, just remember to change the name in either export or the actual filename so it matches. thanks, i couldn't find it cause i searched for ac-message and not ac_message.. Link to comment
-stolka- Posted April 21, 2014 Share Posted April 21, 2014 is there any turf system which works with this groups sysstem? Take a look at this one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9056. Specially made to work with this group system and open source as well. Just remember to verify that the exported functions to get turf color and team color are in the meta.xml file of the group system. <export function="getGroupChatColor" type="server"/> <export function="getGroupTurfColor" type="server"/> It's currently in an early beta state and has only been quickly scripted and tested so there are some configuration to do to make it work, like a few variable names and other exports, but except for that it seems to be pretty appreciated after all. For some reason the whole inspiration for the turf system came from this group system so a special thanks to Smart for the group system. I have a question about your turf system.. it works but when i create a turf and i capture it, then i restart the resource the turf gets created but the owner is set to 'none' Link to comment
Smart. Posted April 21, 2014 Author Share Posted April 21, 2014 is there any turf system which works with this groups sysstem? Take a look at this one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9056. Specially made to work with this group system and open source as well. Just remember to verify that the exported functions to get turf color and team color are in the meta.xml file of the group system. <export function="getGroupChatColor" type="server"/> <export function="getGroupTurfColor" type="server"/> It's currently in an early beta state and has only been quickly scripted and tested so there are some configuration to do to make it work, like a few variable names and other exports, but except for that it seems to be pretty appreciated after all. For some reason the whole inspiration for the turf system came from this group system so a special thanks to Smart for the group system. I have a question about your turf system.. it works but when i create a turf and i capture it, then i restart the resource the turf gets created but the owner is set to 'none' Ask questions about that resource on it's own page, this thread is for the group system only. Link to comment
roaddog Posted April 27, 2014 Share Posted April 27, 2014 How can I show gang and rank on the scoreboard? 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) Link to comment
Noki Posted April 28, 2014 Share Posted April 28, 2014 You just use: setElementData(player, "scoreboard-column-name-here", getPlayerGroup(player)) Link to comment
Sande Posted April 28, 2014 Share Posted April 28, 2014 Create groupbank, it will be nice Link to comment
NanOo Posted May 2, 2014 Share Posted May 2, 2014 is there getGroupTurfColor in that code ?? Link to comment
Mr_Moose Posted May 3, 2014 Share Posted May 3, 2014 is there getGroupTurfColor in that code ?? In the server lua, I feel stupid now since I can't remember if I added these by myself or if they where included from the beginning, anyway these 2 functions can be used to get turf color and chat color, if they not in the system already it's easy to add. function getGroupChatColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][3]) return color[1], color[2], color[3] end function getGroupTurfColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][6]) return color[1], color[2], color[3] end And secondly, there is a security bug in the function attemptMakeGroup(), it's explained here: http://mta.albonius.com/index.php?topic=457.0, and a solution is included as well. I recommend you all to see it if you want to prevent special characters from being used to steal existing groups. Remember to backup your database first, and it's already commonly exploited by many players. Link to comment
Smart. Posted June 11, 2014 Author Share Posted June 11, 2014 is there getGroupTurfColor in that code ?? In the server lua, I feel stupid now since I can't remember if I added these by myself or if they where included from the beginning, anyway these 2 functions can be used to get turf color and chat color, if they not in the system already it's easy to add. function getGroupChatColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][3]) return color[1], color[2], color[3] end function getGroupTurfColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][6]) return color[1], color[2], color[3] end And secondly, there is a security bug in the function attemptMakeGroup(), it's explained here: http://mta.albonius.com/index.php?topic=457.0, and a solution is included as well. I recommend you all to see it if you want to prevent special characters from being used to steal existing groups. Remember to backup your database first, and it's already commonly exploited by many players. Tjenare, They were included. Link to comment
Smart. Posted August 18, 2014 Author Share Posted August 18, 2014 After many many many many days I've added group balance which lets you store money in the group. Obviously the amount will be saved using sql. It has NOT been tested too thoroughly so if you find a bug let me know and I'll fix it. This means there is a new export which is: getGroupBankAmount(group) which returns the balance (I recommend using groupTable[group][7] inside the script because it's basically the same thing). You can also decide who's able to withdraw money using the rank editor and everybody is able to deposit and if the logging is enabled it's logged. In-fact I've made all group outputs logged (only if it's turned on) Link to comment
xTanKx Posted November 3, 2014 Share Posted November 3, 2014 I can't use /turfcolor or /groupchatcolor Link to comment
Wisam Posted January 18, 2015 Share Posted January 18, 2015 Help!! i type /gc but the message don't output in the chatbox The group bank too, when i deposit money in the bank my money descrase but the money balance stays nil and i cant withdraw Link to comment
Noki Posted January 19, 2015 Share Posted January 19, 2015 Help!! i type /gc but the message don't output in the chatboxThe group bank too, when i deposit money in the bank my money descrase but the money balance stays nil and i cant withdraw Have you configured it to work with a SQL database of some sort? Also, what does your debugscript say when you attempt to chat, or withdraw money? Link to comment
Wisam Posted January 19, 2015 Share Posted January 19, 2015 Have you configured it to work with a SQL database of some sort? Also, what does your debugscript say when you attempt to chat, or withdraw money? if you mean MySQL then no i didn't Here's the debug: When i click deposit: http://i.imgur.com/ZYCm3v3.png When i click Withdraw: http://i.imgur.com/u39C78R.png And when i type /gc : http://i.imgur.com/uGXI27l.png Also, i thought smart added the log feature, why it says in chat that its not available yet? Link to comment
Noki Posted January 20, 2015 Share Posted January 20, 2015 The group system is designed to work with an SQL database system of some sort. That's probably why a lot of features aren't working for you. Link to comment
Wisam Posted January 20, 2015 Share Posted January 20, 2015 The group system is designed to work with an SQL database system of some sort. That's probably why a lot of features aren't working for you. Oh SQL, then where i have to put my SQL details in the script (hostname, username, password) ?? 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