Jump to content

DarkLink

Members
  • Posts

    610
  • Joined

  • Last visited

Everything posted by DarkLink

  1. Hmmm see... So the problem is the console.. =/ What can we do now? Call the application's support team ? Well i dont know..
  2. I try like.. local account = getAccount( source ) if account then outputChatBox ( "Login", source) else outputChatBox ( "Register", source) end And is still getting me an error... =/ I cant understand...what is wrong... =/ Thank you..
  3. string is string string is not userdata So username should be a string not an element. Ok i will try that! Thanks for the help! By the way...what you mean it.. "string is string string is not userdata So username should be a string not an element." I am a bit noobish in lua.. Thank you..
  4. Like this? local account = getAccount( getAccount (source) ) if account then outputChatBox ( "Login", source) else outputChatBox ( "Register", source) end I try that...still give me some error... Thank you...and can you help me again..? =/
  5. Are you sure, that script is right..? =/ I try it, and give me a error on the black screen (server) Then i try like this.. local account = getAccount( getClientName(source) ) if account then outputChatBox ( "login", source) else outputChatBox ( "register", source) end But still appear some bugs and warnings in the black screen of the server... Hmmm can you help..?? =/ Thank you..
  6. Thaaank you very much again!! 50p! Thank you!
  7. Hi guys again! ^^ I did like to know how i can put a function to players, need to register to spawn.. I mean, to play in the server they need to register.. I see this script: function registerPlayer ( source, 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( getClientName(source), password ) if ( accountAdded ) then -- Tell the user all is done outputChatBox ( "Thank you " .. getClientName(source) .. ", you're now registed, you can login with /login", source ) else -- There was an error making the account, tell the user outputChatBox ( "Error creating account, contact the server admin", source ) end else -- There was an error in the syntax, tell the user the correct syntax. outputChatBox ( "Error creating account, correct syntax: /register <password>", source ) end end addCommandHandler ( "register", registerPlayer ) -- add the command handler This is for players register in the server, but i want to make a obligator register, so they need to register to play.. How i do that..? Please help..
  8. THAAAAANK YOU VERY MUUUUCH!!! REALLY I APRECCIATE YOUR HELP! thank you 2 ^^
  9. Thank you!! For the reply!! How i run it? =/ Sorry i am noob.. =/ Thanks!
  10. First of all, sorry for my bad english Hi, i am new in scripting.. I read the scripting introduction, and try to do it.. So i end it this script: function createVehicleForPlayer(thePlayer, "createvehicle", "468") local x,y,z = getElementPosition(thePlayer) -- get the position of the player x = x + 5 -- add 5 units to the x position local createdVehicle = createVehicle(tonumber(468),x,y,z) -- check if the return value was ''false'' if (createdVehicle == false) then -- if so, output a message to the chatbox, but only to this player. outputChatBox("Failed to create vehicle.",thePlayer) end end addCommandHandler("createvehicle", createVehicleForPlayer) Then i save it, script.lua I do a meta.xml it this: <meta> <info author="DarkLink" description="A few simple commands" /> <script src="script.lua" /> </meta> Then put it together in one folder called "commands" to resourcecache and also zipped to resources! I open the server, and i saw the 101 resources loaded, then i enter in my server... Open the console and write createvehicle, and not happens...i also try the createvehicle 468.. And nothing.. Please...someone more expert try to help me...ok!? I did like to learn more of lua ^^ Thank you!
×
×
  • Create New...