CTCCoco Posted February 19, 2010 Posted February 19, 2010 Why don't work this? function registerPlayer ( jugador, commandName, password ) -- Check if the password field is blank or not (only blank if they didnt enter one) if ( password ~= "" and password ~= nil ) then --Attempt to add the account, and save its value in a var local accountAdded = addAccount( getPlayerName(jugador), password ) if ( accountAdded ) then -- Tell the user all is done outputChatBox ( "Thank you " .. getPlayerName(jugador) .. ", you're now registed, you can login with /login", jugador ) else -- There was an error making the account, tell the user outputChatBox ( "Error creating account, contact the server admin", jugador ) end else -- There was an error in the syntax, tell the user the correct syntax. outputChatBox ( "Error creating account, correct syntax: /registrarse <contraseña>", jugador ) end end addCommandHandler ( "registrarse", registerPlayer ) -- add the command handler I take it from the MTA Wiki. In the console I see a WARNING that says Access denied. What I can do? Thanks for all. Pawn, PHP programmer. Training and learning LUA at the moment.
Jumba' Posted February 19, 2010 Posted February 19, 2010 You need to set the proper ACL permissions. I think it has the be Super Moderator or higher, not sure though
Wisin Posted February 19, 2010 Posted February 19, 2010 as jumba said just add this line in your admin group
CTCCoco Posted February 19, 2010 Author Posted February 19, 2010 as jumba said just add this line in your admin group But not everybody can register on the server or what? Thanks. Pawn, PHP programmer. Training and learning LUA at the moment.
Castillo Posted February 19, 2010 Posted February 19, 2010 that should allow players to register, did u tryed yet? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
CTCCoco Posted February 19, 2010 Author Posted February 19, 2010 (edited) that should allow players to register, did u tryed yet? Yes im not registered on the server and i am a regular player but when I put /register and password says error and in the console says Acces Denied and something else. EDIT: I solved the problem in the ACL.xml change the addacount to true. Edited February 19, 2010 by Guest Pawn, PHP programmer. Training and learning LUA at the moment.
Castillo Posted February 19, 2010 Posted February 19, 2010 ok good. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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