blacknedvertigo Posted September 15, 2011 Share Posted September 15, 2011 Hi! i need to delete some of accouts... where the accounts go with /register? Link to comment
0 Benevolence Posted September 15, 2011 Share Posted September 15, 2011 Yeah this is what I've asked before but never got a clear answer. I got this from wiki https://wiki.multitheftauto.com/wiki/RemoveAccount: function onCmdRemove ( playerSource, commandName, playerName ) -- Lets make sure they didn't put nothing for the playername if playerName ~= nil then -- Lets get the player from the nick provided local targetPlayer = getPlayerFromNick ( playerName ) -- Checking if the player actually exists if targetPlayer ~= nil then -- grab the accounts local sourceAccount = getPlayerAccount ( playerSource ) local targetAccount = getPlayerAccount ( targetPlayer ) -- Now check to see if the player has greater priviledges (or levels) if getAccountLevel ( sourceAccount ) > getAccountLevel ( targetAccount ) then removeAccount ( targetAccount ) outputChatBox ( getPlayerName ( playerSource ) .. " removed " .. playerName .. "'s account" ) else outputChatBox ( "You don't have authority to remove " .. playerName .. "'s account", playerSource ) end else outputChatBox ( "There is no player by the name of " .. playerName, playerSource ) end else outputChatBox ( "USAGE: /remove [playername]", playerSource ) end end addCommandHandler("remove",onCmdRemove To check what accounts exist, use this https://wiki.multitheftauto.com/wiki/GetAccounts: function printAmountOfAccounts ( thePlayer ) local accountTable = getAccounts () -- return the table over accounts if #accountTable == 0 then -- if the table is empty outputChatBox( "There are no accounts. \"{SMILIES_PATH}/icon_sad.gif\" alt=\"\" title=\"Sad\" />", thePlayer ) else -- table isn't empty outputChatBox( "There are " .. #accountTable .. " accounts in this server!", thePlayer ) end end addCommandHandler( "accountcount", printAmountOfAccounts ) -- add a command handler for command 'accountcount' Link to comment
0 Arran Posted September 16, 2011 Share Posted September 16, 2011 "start admin" Then /register will work. Link to comment
0 Benevolence Posted September 16, 2011 Share Posted September 16, 2011 "start admin"Then /register will work. I'm assuming he got it working since he hasn't replied. Link to comment
0 blacknedvertigo Posted September 17, 2011 Author Share Posted September 17, 2011 ty tank07 Link to comment
0 Benevolence Posted September 17, 2011 Share Posted September 17, 2011 ty tank07 Your welcome. Link to comment
Question
blacknedvertigo
Hi! i need to delete some of accouts... where the accounts go with /register?
Link to comment
5 answers to this question
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