Jump to content

CTCCoco

Members
  • Posts

    93
  • Joined

  • Last visited

Everything posted by CTCCoco

  1. I mean how I can add variables that was saved into the account and all? For example the money, something that the player buy, etc. They must save into the account, but How? Please help me . Thanks for all.
  2. Thanks for all, I don't see that fuction. Sorry for my noob question.
  3. Tell us what exactly is going wrong. Stil the logIn Function ? Now I have: function loginPlayer ( thePlayer, commandName, password1 ) if ( password1 ) then --[[local playerName = getPlayerName(thePlayer) local targetPlayer = getPlayerName ( playerName )--]] local targetAccount = getPlayerAccount ( thePlayer ) -- Checking if the player actually exists if(logIn(thePlayer, targetAccount, password1)) then outputChatBox( "Gracias " ..getPlayerName(thePlayer) ..", te has logueado con éxito.", thePlayer ) else outputChatBox ( "Ha ocurrido un error. Porfavor pide ayuda a un admin.", thePlayer ) end else outputChatBox ( "Usa /loguearse <contrasena>.", thePlayer ) end end addCommandHandler("loguearse", loginPlayer) -- Lo añade el comando Its only detect the account "guest" because its the default account. How I can put the nick of the player in the logIn fuction? ( getPlayerName and getPlayerFromName doesn't work ). Please help me an thanks.
  4. CTCCoco

    [Mysql] HELP

    Hey I'm new on MTA LUA and I don't know why you put "username" , "source" and "client" Where I can learn these? Thanks.
  5. Because that's what you did in your code. I didn't check the parameter for getPlayerName. This doesn't work yet only work the register but thanks for try help me ..
  6. Why you use thePlayer in some places and source in other? Thanks for the help.
  7. I use the command and have an error. In the console I see " Bad argument @ 'LogIn' - Line 23 " What's the problem? Thanks. function loginPlayer ( source, commandName, password ) -- local registrado = getAccount( getPlayerName(thePlayer), password) if ( password ~= "" and password ~= nil ) then local logueado = logIn( source, getPlayerName(source), password ) if ( logueado ) then outputChatBox( "Gracias " ..getPlayerName(source) ..", te has logueado con éxito.", source ) else outputChatBox ( "Ha ocurrido un error. Porfavor pide ayuda a un admin.", source ) end else outputChatBox ( "Usa /loguearse <contrasena>.", source ) end end addCommandHandler("loguearse", loginPlayer) -- Lo añade el comando
  8. 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.
  9. But not everybody can register on the server or what? Thanks.
  10. 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.
  11. Thansk for the help and for the manual! It is very usefull.
  12. password ~= "" and password ~= nil what means ~= ? and nil? Thanks for all.
  13. I'm a pawn scripter and I start learn LUA few days ago. I can do some comands now but ... Where I can learn how to do an account system? Thanks for all.
  14. I see you can disable a line with -- but how you can disable all like in pawno you can do /* */. Thanks
  15. CTCCoco

    Pawn and lua

    Thanks for the help. I start learn LUA right now.
  16. Yes I see all RP . You register on the server and you can choose the faction that you want it isn't a good roleplay.
  17. I hear people that know LUA and MTA and says that MTA its prepared only for stunt and DM. They say that is better SA:MP than MTA for a roleplay server. You can create a good RP server on MTA? Or only a RP when you choose a faction after you register on the server? Sorry for my stupid grammar. I'm from Spain. Thanks for all.
  18. CTCCoco

    Pawn and lua

    Hello all. I'am a pawn scripter on SA:MP but I see that MTA its more good than SA:MP... I only want to know. If you know pawn will be more easy learn LUA or LUA its totally different?
×
×
  • Create New...