Jump to content

getaplayeraccount error


Monty

Recommended Posts

what's wrong with this function?

function arrestNumber() 
  playeraccount = getPlayerAccount( source ) 
  arrestnumber = getAccountData( playeraccount, "arrestn" ) 
  outputChatBox( "you got"..arrestnumber.."arrests", source,  100, 149, 237 ) 
end 
addCommandHandler( "arrest" , arrestNumber ) 
  
  

Link to comment
Guest Guest4401
function arrestNumber(player) 
      playeraccount = getPlayerAccount( player ) 
      arrestnumber = getAccountData( playeraccount, "arrestn" ) 
      outputChatBox( "you got"..arrestnumber.."arrests", player,  100, 149, 237 ) 
    end 
    addCommandHandler( "arrest" , arrestNumber ) 
      
  

Link to comment
what's wrong with this function?
function arrestNumber() 
  playeraccount = getPlayerAccount( source ) 
  arrestnumber = getAccountData( playeraccount, "arrestn" ) 
  outputChatBox( "you got"..arrestnumber.."arrests", source,  100, 149, 237 ) 
end 
addCommandHandler( "arrest" , arrestNumber ) 
  
  

You don't have 'source' defined anywhere.

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