ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. isGuestAccount

Function

isGuestAccount

ServerAccountsIdentical to MTA:SA

Checks whether the account is a guest account, i.e. the player is not logged in.

Syntax

bool isGuestAccount(account theAccount)

Arguments

theAccountaccount
The account.

Returns

true for a guest.

Example

addCommandHandler("zapisz", function(player)
    local account = getPlayerAccount(player)
    if isGuestAccount(account) then
        outputChatBox("Najpierw się zaloguj.", player, 255, 0, 0)
        return
    end
    setAccountData(account, "money", getPlayerMoney(player))
end)