- Documentation
- Server functions
- isGuestAccount
Function
isGuestAccount
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)