Jump to content

getPlayerAccount


Anubhav

Recommended Posts

It would be better to get the account outside the loop.

Arnold told me to increase the performance by that and I did it. Anyways thanks to you too.

He was wrong then, it is better performance to get the account outside the loop.

addCommandHandler("duty", function(p) 
    local acc = getPlayerAccount(p) 
    for k,v in ipairs(players) do 
        -- loop code 
    end 
  
    -- rest of your code 
end ) 
  
  

Link to comment

Arnold told me to increase the performance by that and I did it. Anyways thanks to you too.

He was wrong then, it is better performance to get the account outside the loop.

addCommandHandler("duty", function(p) 
    local acc = getPlayerAccount(p) 
    for k,v in ipairs(players) do 
        -- loop code 
    end 
  
    -- rest of your code 
end ) 
  
  

Damn you misunderstood that. I was telling TAPL is correct, he told me to take it of loop anyways.

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