Jump to content

MySQL database and ACL?


Recommended Posts

@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

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
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? :roll:

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

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.

:wink:

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

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...