GetClientAccount: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(No difference)

Revision as of 21:11, 7 September 2006

This function returns the specified client's account object.

Syntax

account getClientAccount ( client theClient )

Required Arguments

  • theClient: The client element (player or admin) you want to get the account of.

Returns

Returns the client's account object, or false if the client passed to the function is invalid.

Example

This example sets a client's account's 'money' value

addCommandHandler ( "setmoney", "setMoney" )
function setMoney ( thePlayer, key, ammount )
  account = getClientAccount ( thePlayer )
  if ( account ) then
    setAccountData ( account, "money", ammount )
  end
end

See Also

BEFORE VERSION 1.0 :