HoLsTeN Posted February 2, 2013 Posted February 2, 2013 hi .. did any one have idea how to set account data for all players online on server or not ? i dont't have idea ?? how to do it this is the data "ADmoney" xxx = getAllPlayersAccount _ i know there are no function for this but i want you to know what i mean for example : setAccountData(xxx , "ADmoney", 0) I Am HoLsTeN !
Puma Posted February 2, 2013 Posted February 2, 2013 This loops through all players and the money on their accounts to 0. for i, p in pairs ( getElementsByType("player") ) do local account = getPlayerAccount(p) if account and not isGuestAccount(account) then setAccountData(account, "ADmoney", 0) end end Put it in your script where you need it to be. "The total IQ of the world is a constant. The more people, the more idiots." - Anonymous.
Fury Posted February 2, 2013 Posted February 2, 2013 xxx = getAllPlayersAccount _ i know there are no function for this but i want you to know what i mean actually there is one; https://wiki.multitheftauto.com/wiki/GetAllAccountData Destruction Derby
Castillo Posted February 2, 2013 Posted February 2, 2013 That's not what he's talking about, what Puma posted is what he's looking for. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Fury Posted February 2, 2013 Posted February 2, 2013 That's not what he's talking about, what Puma posted is what he's looking for. he was asking about function that gets all account. he says "i know there isnt any function like that" so i show him. i know he's looking for puma's code. im trying to help newbies Destruction Derby
Anderl Posted February 2, 2013 Posted February 2, 2013 Yes, he's asking for a function to get all accounts but the function you're talking about gets all data in a specific account, not a list of account elements. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
TAPL Posted February 2, 2013 Posted February 2, 2013 He's wants to get all registered accounts in the server. for i, account in ipairs(getAccounts()) do setAccountData(account , "ADmoney", 0) end
Puma Posted February 2, 2013 Posted February 2, 2013 He's wants to get all registered accounts in the server. I quote: "for all players online on server". His English is quite butt though. "The total IQ of the world is a constant. The more people, the more idiots." - Anonymous.
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