Luke_Ferrara Posted August 11, 2010 Share Posted August 11, 2010 Hello again everyone I have another quick question. I have created a login system with a MySQL database (with the MySQL Plugin) and I was wondering how I could involve my ACL in it so I could still use the admin system....thanks guys Link to comment
simstosh Posted August 11, 2010 Share Posted August 11, 2010 I think u gonna need to do a big job involving all... Also I recommend to use the sqlitedb included on mta, cause is too much easy to manage, and you don't need to use third-party resources... Well, u gonna need to use MySQL to link the stats to a website? Link to comment
dzek (varez) Posted August 11, 2010 Share Posted August 11, 2010 @simstosh: Personally, I would use MySQL even if I won't make stats on website or something - cause MySQL is more powerful, and I'm missing few features in SQLite, but tbh - for most users here SQLite should be enough. Link to comment
simstosh Posted August 11, 2010 Share Posted August 11, 2010 @varez Yeah, I haven't use MySQL on MTA, I think it his use is only on extreme cases (too much data for a server, or espcially for web use). On my case, i'm using the SQLite, cause is a simple server. On SA-MP I do a fully integrated server/website, but SA-MP's MySQL plugin uses too much resources (memory leaks), so for SA-MP I don't recommend MySQL. Link to comment
Luke_Ferrara Posted August 11, 2010 Author Share Posted August 11, 2010 so how would I combine the two? example? function adminRights() local thePlayer = getPlayerName(playerSource) if (TAGS[player] == "4") then aclGroupAddObject (aclGetGroup("Admin"), "user."..thePlayer) end end Link to comment
dzek (varez) Posted August 12, 2010 Share Posted August 12, 2010 it will be good if you give more explanations what do you want to do, as im not sure Link to comment
Luke_Ferrara Posted August 12, 2010 Author Share Posted August 12, 2010 well I am using cannons user system....and in the resource he uses classes like class 2 = member class 4 = admin however it is all MySQL so what can I do do when I make an account class 4 it also goes into the acl so I can use lil toady admin panel? Link to comment
Mini Posted August 12, 2010 Share Posted August 12, 2010 You know the User System script in resources? Doesn't it use that?... From UserSystem: function onJoin() if( not connect_mysql ) then outputChatBox( no_connect_sql_message ) else local colour = mysql_query( connect_mysql, "SELECT * FROM `players` WHERE serial='" .. getPlayerSerial( source ) .. "'" ) if( colour ) then while true do local row = mysql_fetch_assoc( colour ) if ( not row ) then if( not TAGS[source] ) then nameJoined = getPlayerName( source ) setPlayerNametagColor ( source, 255, 255, 0 ) createBlipAttachedTo( source, 0, 2, 255, 255, 0) end break end nameJoined = getPlayerName( source ) name = row['login'] money = row['money'] local class = row['class'] TAGS[source] = class bindKey(source, 'F4', 'down', openPanelForUsers) bindKey( source, 'm', 'down', secure ) -- [[ Admin ]] -- if( TAGS[source] == "4" ) then setPlayerNametagColor ( source, 255, 0, 0 ) createBlipAttachedTo( source, 0, 2, 255, 0, 0) setPlayerMoney( source, money ) if( setUpdateMessage == "1" ) then outputChatBox("#FF0000*USER: #FFFF00"..updateMessage.."", source, 0, 0, 0, true ) end -- [[ Moderator ]] -- elseif( TAGS[source] == "3" ) then setPlayerNametagColor ( source, 0, 0, 255 ) createBlipAttachedTo( source, 0, 2, 0, 0, 255) setPlayerMoney( source, money ) if( setUpdateMessage == "1" ) then outputChatBox("#FF0000*USER: #FFFF00"..updateMessage.."", source, 0, 0, 0, true ) end -- [[ Member ]] -- elseif( TAGS[source] == "2" ) then setPlayerNametagColor ( source, 0, 255, 0 ) createBlipAttachedTo( source, 0, 2, 0, 255, 0) setPlayerMoney( source, money ) if( setUpdateMessage == "1" ) then outputChatBox("#FF0000*USER: #FFFF00"..updateMessage.."", source, 0, 0, 0, true ) end end end end mysql_free_result( colour ) end end And further down into the script i believe it uses the "class" field once again... Link to comment
Luke_Ferrara Posted August 13, 2010 Author Share Posted August 13, 2010 no, he created his own admin panel which is very limited to toady's admin panel for example cannon's has no admin chat, or ability to start and stop resources or give admin rights.....see? limited. So is it possible to combine it with the acl so toady's panel will work? Link to comment
Mini Posted August 13, 2010 Share Posted August 13, 2010 ...You misunderstood me I believe. I meant look at that script, and see how it loads it the 'class'. Also... Link to comment
Luke_Ferrara Posted August 13, 2010 Author Share Posted August 13, 2010 yeah......maybe you shouldn't post in threads you have no clue what your talking about. Try re-reading my other post again and try again. Class and ACL are different therefore how would a script that bases it's scripts on an ACL work on a script that runs on created custom classes? Link to comment
Mini Posted August 13, 2010 Share Posted August 13, 2010 yeah......maybe you shouldn't post in threads you have no clue what your talking about. Try re-reading my other post again and try again. Class and ACL are different therefore how would a script that bases it's scripts on an ACL work on a script that runs on created custom classes? Damn girl you got me good with your 5th grade education. I didn't know. I just got MTA. So excuse me girlfriend. Also I just thought that user system used some other admin panel too. I never looked at it that close. Edit: I'm all lost... You want to use a different panel for the UserSystem resource? Information on the other panel please? Link to comment
AeroXbird Posted August 13, 2010 Share Posted August 13, 2010 I suggest you make a new panel, i did the exact same with this system. Altough i did modify it and rewrote a lot of functions because the system works very slow on some parts, especially the main parts like class assignment kepth bugging me, so i rewrote the whole thing. PS: I suggest you to add this in your class assignment script: setElementData(source, "class", TAGS[source]) because that will make it possible for you to use the classes outside of the usersystem. Link to comment
Luke_Ferrara Posted August 13, 2010 Author Share Posted August 13, 2010 SetElementData? Would that get logged in the database or use the account database that comes with mta Link to comment
dzek (varez) Posted August 13, 2010 Share Posted August 13, 2010 automatically - no, but you can script that Link to comment
Luke_Ferrara Posted August 13, 2010 Author Share Posted August 13, 2010 How would I go about doing that? Is there a wiki page or could someone explain it to me? Thank you in advance Link to comment
50p Posted August 13, 2010 Share Posted August 13, 2010 https://wiki.multitheftauto.com/wiki/Ser ... _functions 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