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