AR/getAccounts: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
No edit summary  | 
				No edit summary  | 
				||
| Line 1: | Line 1: | ||
__NOTOC__  | __NOTOC__  | ||
{{Server function}}  | {{Server function}}  | ||
| Line 31: | Line 30: | ||
[[ar:addAcount]]  | [[ar:addAcount]]  | ||
Latest revision as of 23:30, 26 September 2016
internal.db هذه الوظيفة تقوم بالرد بجدول يحتوي على جميع الحسابات الموجودة في السيرفر في الملف
(1.0.4 لم يعد يستخدم في الأصدارات الأحدث من accounts.xml ملاحظة: الملف)
Syntax
table getAccounts()
Returns
قد يكون الجدول فارغاً . internal.db يحتوي على جميع الحسابات الموجودة في السيرفر في الملف table جدول
مـــثال
يستخدم هذا المثال في معرفة عدد الحسابات المسجلة في السيرفر
function printAmountOfAccounts(thePlayer)
    local accountTable = getAccounts() -- الجدول الذي يحتوي على الحسابات
    if #accountTable == 0 then -- إذا كان الجدول فارغاً
        outputChatBox("There are no accounts. :(", thePlayer)
    else -- إذا كان الجدول غير فارغاً
        outputChatBox("There are "..#accountTable.." accounts in this server!", thePlayer)
    end
end
addCommandHandler("accountcount", printAmountOfAccounts) -- نظيف امر جديد وهو 'accountcount'