GetGuestPlayers: Difference between revisions
Jump to navigation
Jump to search
Abdul KariM (talk | contribs) (Created page with "==Syntax== <syntaxhighlight lang="lua">table getGuestPlayers ( )</syntaxhighlight> ===Returns=== Returns All Players not Login or All Players Guest Account , And vice false") |
Abdul KariM (talk | contribs) (→Syntax) |
||
Line 4: | Line 4: | ||
===Returns=== | ===Returns=== | ||
Returns All Players not Login or All Players Guest Account , And vice false | Returns All Players not Login or All Players Guest Account , And vice false | ||
==Code== | |||
<section name="Server" class="server" show="true"><syntaxhighlight lang="lua"> | |||
function getGuestPlayers ( ) | |||
local Guest = { } ; | |||
for _ , players_ in ipairs ( getElementsByType ( "player" ) ) do | |||
local playerAcc = getPlayerAccount ( players_ ) | |||
if isGuestAccount ( playerAcc ) then | |||
table.insert ( Guest , players_ ) | |||
end | |||
end | |||
return Guest | |||
end | |||
</syntaxhighlight></section> |
Revision as of 02:28, 20 August 2016
Syntax
table getGuestPlayers ( )
Returns
Returns All Players not Login or All Players Guest Account , And vice false
Code
Click to collapse [-]
Serverfunction getGuestPlayers ( ) local Guest = { } ; for _ , players_ in ipairs ( getElementsByType ( "player" ) ) do local playerAcc = getPlayerAccount ( players_ ) if isGuestAccount ( playerAcc ) then table.insert ( Guest , players_ ) end end return Guest end