PaiN^ Posted March 1, 2013 Share Posted March 1, 2013 Hello everyone Today I finished my resource : Add / Del Account What does it do ? --> It's Add / Del accounts from your server .. --> All the players can add accounts, But only people in Console group can delete accounts .. --> Script is unencrypted, Modify it as you like but don't remove my name .. DOWNLOAD * It must be added to admin group .. *Notify me if any bugs are noticed .. Link to comment
TAPL Posted March 2, 2013 Share Posted March 2, 2013 *Notify me if any bugs are noticed .. https://community.multitheftauto.com/index.php?p=resources&s=comments&id=6587 Link to comment
PaiN^ Posted March 2, 2013 Author Share Posted March 2, 2013 Both add and del functions are working perfectly with me .. I don't see were the bug is Link to comment
iPrestege Posted March 2, 2013 Share Posted March 2, 2013 addEvent("add", true) addEventHandler("add", root, function (auser, pass) if string.len(auser) > 0 and string.len(pass) > 0 then local account = getAccount(duser) if account then outputChatBox("#3BB9FF#Account already exist ..!", source, 255, 0, 0, true) else addAccount(auser, pass) outputChatBox("#3BB9FF#Account is created ..!", source, 255, 0, 0, true) outputChatBox("#3BB9FF#Username : #FFFFFF"..auser.."#3BB9FF, #Password : #FFFFFF"..pass, source, 255, 0, 0, true) end else outputChatBox("#3BB9FF#Username was #FF0000not found #3BB9FF..!", source, 255, 0, 0, true) end end ) You Have To Get The Account !! Link to comment
PaiN^ Posted March 2, 2013 Author Share Posted March 2, 2013 addEvent("add", true) addEventHandler("add", root, function (auser, pass) if string.len(auser) > 0 and string.len(pass) > 0 then local account = getAccount(duser) if account then outputChatBox("#3BB9FF#Account already exist ..!", source, 255, 0, 0, true) else addAccount(auser, pass) outputChatBox("#3BB9FF#Account is created ..!", source, 255, 0, 0, true) outputChatBox("#3BB9FF#Username : #FFFFFF"..auser.."#3BB9FF, #Password : #FFFFFF"..pass, source, 255, 0, 0, true) end else outputChatBox("#3BB9FF#Username was #FF0000not found #3BB9FF..!", source, 255, 0, 0, true) end end ) You Have To Get The Account !! But i did that !!! addEvent("add", true) addEventHandler("add", root, function (auser, pass) if string.len(auser) > 0 and string.len(pass) > 0 then local check = getAccountName(auser) if check then outputChatBox("#3BB9FF#Account already exist ..!", source, 255, 0, 0, true) else addAccount(auser, pass) outputChatBox("#3BB9FF#Account is created ..!", source, 255, 0, 0, true) outputChatBox("#3BB9FF#Username : #FFFFFF"..auser.."#3BB9FF, #Password : #FFFFFF"..pass, source, 255, 0, 0, true) end else outputChatBox("#3BB9FF#Username was #FF0000not found #3BB9FF..!", source, 255, 0, 0, true) end end ) And the script works perfectly + No errors in debugscript !!! Link to comment
PaiN^ Posted March 2, 2013 Author Share Posted March 2, 2013 So ?? It still works without any errors or problems .. So i don't think you should call that a bug + Any way Thanx for the heads up ^^ Link to comment
iPrestege Posted March 2, 2013 Share Posted March 2, 2013 You will add account name only not account. Link to comment
TAPL Posted March 2, 2013 Share Posted March 2, 2013 LoL? outputChatBox("#3BB9FF#Account already exist ..!", source, 255, 0, 0, true) Have you ever saw this when you add an account already exist? because getAccountName will always return false and it will return it to the else. And btw, you are trigger the source as root, so everyone will see the outputChatBox, and this means the password will be in chat for everyone. Link to comment
iPrestege Posted March 2, 2013 Share Posted March 2, 2013 LoL? outputChatBox("#3BB9FF#Account already exist ..!", source, 255, 0, 0, true) Have you ever saw this when you add an account already exist? because getAccountName will always return false and it will return it to the else. And btw, you are trigger the source as root, so everyone will see the outputChatBox, and this means the password will be in chat for everyone. LooooooooooooL Link to comment
X-SHADOW Posted March 2, 2013 Share Posted March 2, 2013 It's Return string ! Returns a string containing the account's name, false if the account does not exist or an invalid argument was passed to the function Link to comment
iPrestege Posted March 2, 2013 Share Posted March 2, 2013 It's Return string !Returns a string containing the account's name, false if the account does not exist or an invalid argument was passed to the function As What "TAPL" Say LoooL ? Link to comment
TAPL Posted March 2, 2013 Share Posted March 2, 2013 It's Return string !Returns a string containing the account's name, false if the account does not exist or an invalid argument was passed to the function Ok don't tell anyone. I already know this, i was meaning false in his cause. He trying to get account name from account name <~ this funny. Link to comment
Castillo Posted March 2, 2013 Share Posted March 2, 2013 Instead of laughing of him, you should help him. Link to comment
iPrestege Posted March 2, 2013 Share Posted March 2, 2013 I know this, but we do not laugh we are helping him sorry for that. Link to comment
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