Jump to content

set AccountData For All Accounts Register


HoLsTeN

Recommended Posts

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)

Link to comment

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.

Link to comment
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 :)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...